Always CTD when running wasm compiled in Debug version

Whenever I put Debug compiled version of my .wasm the sim always crash (
CTD ) on loading the flight (same with fast wasm compilation on or off)
but if I compile my .wasm in Release mode its just running fine (but
obviously I can’t debug)

  • I use Visual Studio 2019 on Windows 10 latest update
  • project created using Visual Studio MSFS wasm project wizard.
  • I don’t attach visual studio debugger to FlightSimulator.exe
  • Project build inside msfs project editor is fine
  • msfs version 1.21.13.0 same with previous versions
  • Last message in console window (related to my project) is “WASM: Compiling module my.wasm” , then just crash after a while without any log after
  • Tried re-installing the whole msfs to no effect
  • Community Folder is empty and no addon installed other than official asobo stuff

anyone has this issue, or is there something i need to check?, I can submit
msfs crash dump but its 8GB

When I tried to do it with the Rust language about 2-3 month ago I had the
same problem but I thought that the problem was because I used Rust. Now it
seems the Rust was not the reason. Will follow your question.

also it seems it happen only if I did heavy use of c++ standard libary, if its
just plain C, it has no problem, just like wasm demo from sdk can be run in
debug mode too

Hello @uraymeiviar This crash comes from one of the libc function being
misinterpreted by WebAssembly. This will be fixed in upcoming updates (No
precise ETA but not before SU9). In the meantime, the workaround is to remove
any include of ****and any usage of the LoggerFile class. Regards, Sylvain

wow glad to know, will check… thank you very much