LeoSchoonbroodt Posted June 9 Report Posted June 9 Hi John, Is there a difference between creating a Lvar via the ipc.createLvar statement or doing it via assigning a Value to it via ipc.execCalcCode? To elaborate, i have the problem under MSFS2024-SU2 that sometimes my auto lua is not loaded for second or third flight. In investigating this problem via the FSUIPC_WASM.log i found that this always happens because the WASM module stops during the loading of Lvars. Most probably a MSFS2024 problem as i didn't have this in MSFS2020. In further analyzing this i found that if i create Lvars in my auto-lua script via ipc.createLvar all Lvars are loaded again after each Lvar creation, but strange thing is this doesn't happen if i create the Lvar via assignment with ipc.execCalcCode for example: ipc.execCalcCode("(A:TRANSPONDER STATE:1, number) (>L:TransponderState)") I included the WASM.ini, WASM.log and FSUIPC.log from one of my tests. ipc.createLvar used, loading Lvars again Sat Jun 7 11:33:57 2025 [DEBUG]: Lvar created: 278:TransponderState = 0.000000 Sat Jun 7 11:33:57 2025 [INFO]: Loading lvars for aircraft 'Bell 505' execCalcCode used NO loading of Lvars Sat Jun 7 11:34:07 2025 [DEBUG]: Calculator code executed: '(A:ROTOR RPM PCT:1, percent) (>L:Aircraft.Rotor.RPM.Percent)' In the logfile at 2211406 Requesting Input Events.... there was no autoloading of lua and i manually loaded the lua file which creates off course a lot off errors as it's refering non-existing variables. At the end of the WASM.log the module stops during Lvar load. Just to inform you if you get other reports of this kind. Leo FSUIPC_WASM.ini FSUIPC_WASM.log FSUIPC7.log
John Dowson Posted June 12 Report Posted June 12 On 6/9/2025 at 3:47 PM, LeoSchoonbroodt said: Is there a difference between creating a Lvar via the ipc.createLvar statement or doing it via assigning a Value to it via ipc.execCalcCode? Yes. If you use ipc.createLvar, FSUIPC knows that a new lvar is created and will rescan/reload all lvars so that the one created is available/known to FSUIPC. This also applies if you create an lvar via FSUIPC offsets. If you create an lvar in an ad-hoc manner by executing some calculator code, then FSUIPC does not know that a new lvar has been created and so this lvar will not be known to FSUIPC until a WASM reload/rescan is performed. On 6/9/2025 at 3:47 PM, LeoSchoonbroodt said: To elaborate, i have the problem under MSFS2024-SU2 that sometimes my auto lua is not loaded for second or third flight. In investigating this problem via the FSUIPC_WASM.log i found that this always happens because the WASM module stops during the loading of Lvars. Most probably a MSFS2024 problem as i didn't have this in MSFS2020. There is a known issue, in both MSFS2020 and MSFS2024, in that the FSUIPC WASM module can crash when scanning for lvars - see Previously the FSUIPC WASM would occasionally re-scan for new lvars and push these out to FSUIPC (as well as any other clients) when found. However, this facility was disabled quite some time ago due to this causing a WASM crash. On 6/9/2025 at 3:47 PM, LeoSchoonbroodt said: In further analyzing this i found that if i create Lvars in my auto-lua script via ipc.createLvar all Lvars are loaded again after each Lvar creation, but strange thing is this doesn't happen if i create the Lvar via assignment with ipc.execCalcCode for example: ipc.execCalcCode("(A:TRANSPONDER STATE:1, number) (>L:TransponderState)") Yes, that is as expected due to the reason given earlier. John
LeoSchoonbroodt Posted Saturday at 12:51 PM Author Report Posted Saturday at 12:51 PM Thanks John for the reply. Meantime i modified my lua scripts to use calculator code to create the Lvars and the WASM crash has indeed not occured since then. Have a nice day. Leo
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now