Context: MobiFlight’s WASM module, mounted from community folder
Similar MSFS 2020 issue: n/a
Bug description:
SU4 Beta will CTD when any input is sent from MobiFlight’s WASM Module to the sim. This did not occur with SU3 (or any other version of MSFS in the past, going back as far as the original 2020 release).
This was reported by one of our users and independently confirmed by me. It’s 100% reproducible.
Repro steps:
Install MobiFlight
Run it so the WASM module installs
Run MSFS2024 and spawn a plane somewhere
Configure some sort of input in MobiFlight (even a joystick button will work) to trigger something in the sim
Press that input
Result: Sim locks up then crashes to desktop
Expected result: Sim responds to the input from MobiFlight like it always has
The WASM module is using execute_calculator_code().
I am using execute_calculator_code(). on 3 products in MSFS 2020, these are running on MSFS 2024 SU4 without crash.
I also changed 2 WASM Modules 2024 native to use execute_calculator_code(). to extract E:VARS while a fix is implemented for the V1 WASM API Vars for environment variables and is not crashing either.
I think the CTD might be related to what you are executing on the execute_calculator_code(). so perhaps posting the instruction you sending will help Asobo devs to replicate.
In my case I was sending 1 (>K:PARKING_BRAKE_SET), although other events have caused it as well. None of the RPN was complicated, they were all basic “set a value” calls.
We had one user tell us they didn’t see a crash either, but they came back a few minutes later and said the sim had completely locked up. Here are a few others from a user:
(>B:AUTOPILOT_AP_MASTER_TOGGLE) ← freeze + crash
@ 32.0293 * 16383 - -16383 max 16383 min (>K:MIXTURE_SET) ← works
I spent some time trying to figure out a clean repo this afternoon without much success. All tests were done with the Cessna 172 Skyhawk spawned on the KPDX runway.
Using WASimCommander to send the single parking brake event worked fine. Even if I clicked the “calculate” button repeatedly the sim was fine.
I tried MobiFlight with a simple profile that only had a single input event for the parking brake and it too was fine. Pressing the mapped joystick button was fine, even if I clicked it repeatedly.
I loaded a more complicated profile and the sim locked up immediately and crashed when MobiFlight sent a bunch of initial states to the sim.
That made me think it has something to do with sending a lot of events in succession, so I tried a profile where I have an encoder mapped to the barometric pressure and I spun the encoder a lot. But… no freeze or crash.
Here’s the crash entry for the one time I made it happen this afternoon:
One of our users did some more testing and reported this:
I did some more testing and in the c172 sending the (>B:MASTER_BATTERY_OFF) managed to get a crash in Mobiflight, FSUIPC, AxisandOhs, Spadnext & wasimcommander
On my end I don’t get a crash, but reading from and writing to BVars via “execute_calculator_code” only works once, then never again. This used to work fine up until and including SU3.
Those were nothing relate to execute calculator code, in fact I use execute calculator code on each update frame for all my products and I am not experiencing any CTDs.
While you may not be experiencing a CTD, many others are as evidenced from comments here, reproduced in five different products.
We’ve also had several users report they aren’t seeing a crash, only to come back later and update to say they have also had the sim freeze and eventually crash.
I understand, but is not related to the links you posted.. and as I said, I think Asobo needs examples of the codes you guys executing on calculator code, the function itself is not the problem or all my planes would be having CTD parties..
Must be the parameters used for the function, data or something used with the function, my use case is pretty simple.. nothing fancy..
I’ve spent quite a bit of time this morning trying to reproduce the issue cleanly. I had multiple freezes when opening my standard C172 configuration in MobiFlight, which isn’t helpful since it has quite a few events in it. It didn’t freeze consistently either, which also isn’t helpful.
Frustrated, I gave up and focused instead on splitting off @lorbysi’s issue about Bvars only working once. I managed to lock the sim up three times while reproducing that issue.
I sent 0 (>B:MASTER_BATTERY_OFF)via WASimCommander in a Cessna 172 spawned on the runway at KPDX using a freshly-launched sim. The sim froze instantly.
I also managed to make it happen twice with MobiFlight using 1 (>B:MASTER_BATTERY_OFF), again in a freshly-launched sim.
Brilliant, thanks for the confirmation Eric! Am happy to wait and confirm the fix whenever it makes it into a beta. Simply knowing it’s been addressed is good news.
The fix for this (and the other WASM issues) is listed in the release notes for 1.6.7.0. I spent a bunch of time trying to reproduce the issue with this build and couldn’t.