WASM issues with latest SDK and SU11

Hi, if I compile in debug, with optimization disabled, I’m not able anymore to
debug. If I check with the Wasm Debug Window, it says that there is a
discrepancy between the WASM in DEBUG and the DLL in RELEASE. If I compile the
WASM in release mode with full optimization, to some of our betatester it
freeze the aicraft (but not the simulator), this happens when the code writes
into SimConnect data client areas. Regards, Davide

Hi, To be able to debug your wasm package, you need two things:

  • Compile your wasm file with optimization disabled (WasmDebugWindows says WASM in DEBUG)
  • Enable Fast Wasm Compilation which doesn’t optimize your dll too (WasmDebugWindows says DLL in DEBUG)

One of the optimization we made (wasm side or dll side) is to remove debug
information. So if one of them is optimized, you won t be able to debug your
package. About the freeze you got in Release only, that shouldn’t happen. That
means that there is/are an error, some unsafe code, some defines… in your
code covered by debug mode. But once you optimize your code, the issue is not
covered anymore and shows itself. So can you please, check your warnings,
check if you don’t have a nullptr used somewhere… If you think it is link to
SimConnect data client areas, try disable your calls to those functions to
isolate the problem. Best Regards Maxime / Asobo @FlyingRaccoon FYI

Hi, thanks for the answer. Yes, about the freeze was our fault, now code fixed
and it works. However, as you can read on a post I wrote a while ago, I was
never able to use the Fast Wasm Compilation option with my code compiled in
debug. I get an exception as soon as I do any call to to the gauges system
(like lookup_var() or execute_calculator_code()) Regards, Davide

Hi, Can you provide us with your package and your source code so we can find
the problem? Please check the third section of
[http://devsupport.flightsimulator.com/t/how-to-report-a-bug-or-
crash/77](https://devsupport.flightsimulator.com/t/how-to-report-a-bug-or-
crash/77). Best Regards Maxime / Asobo

Hi,

I can provide you a DUMP file, and the package. But not the source code (c++)
of the WASM, sorry.

Would this be enough?

Regards,

Davide

Hi It would be a good start even if it is not optimal. The dump will allow me
to see why it crashes but there is nothing I can do about the debugging part
without the source code (I can’t break in the code without the code ). Best
Regards Maxime / Asobo