Fragtality Posted October 2, 2023 Report Posted October 2, 2023 I get the mentioned Error in the Log when using Scripts containing ipc.execCalcCode Calls. I have one Script (WT787_AUTO) using event.flag so that I can trigger specific Functions from Outside (e.g. Increasing the Baro when pressing a Button on the StreamDeck). Here the execCalcCode Function is used to trigger H-Vars. The other Script (WT787_SYNC) is using event.timer to run several execCalcCode Calls which create/update L-Vars from serveral different A-Vars Sources (in the Lines of "if that A-Var and that A-Var are true set the L-Var to zero"). Everything works fine at the Beginning, but when I trigger the Functions containing execCalcCode Calls (Auto-Script) I get this 'Error setting Client Data Calculator Code' Message for every execCalcCode Call in every Script. Even Restarting FSUIPC then does sometimes not help anymore. Seems like a weird Timing-Issue. I already tried to reduce the Number of Calls and use some delay (via ipc.sleep) between them with no Success. Note that I use this AUTO/SYNC Script Approach (one for triggering certain Buttons, one to generate/compose Values) on other Aircraft too and never saw this Problem - BUT there I don't use the execCalcCode Function. I'm aware that there is this H-Var/Event File Business and the myOffset File - I deliberately don't use that. FSUIPC7_prev.logFetching info... FSUIPC7.logFetching info... WT787_SYNC.luaFetching info... WT787_AUTO.luaFetching info...
John Dowson Posted October 3, 2023 Report Posted October 3, 2023 Is this a new issue with 7.3.24? Could you try the attached version please - I have just updated the logging to log the error number for the failed execute calc code call. Can you repeat your test with this version, set Debug level logging un the WAPI, and then show me your updated FSUIPC7.log file, as well as your FSUIPC7.ini file and your FSUIPC_WASM.log file. Maybe also a good idea to set Debug level logging in the WASM as well. John FSUIPC7.exeFetching info...
Fragtality Posted October 3, 2023 Author Report Posted October 3, 2023 No, it was the same with .23 - updating to .24 neither improved nor worsened the Situation. I'll give it a try!
John Dowson Posted October 3, 2023 Report Posted October 3, 2023 On 10/3/2023 at 10:32 AM, Fragtality said: No, it was the same with .23 - updating to .24 neither improved nor worsened the Situation. Expand Sorry, I meant if this was a new issue in 7.3.23, or if this was working in a previous version and if so what version that was.
Fragtality Posted October 3, 2023 Author Report Posted October 3, 2023 Don't know if it was different with previous Versions, I created these Scripts / started on the Plane only with .23. Note on the Logs: I loaded in and realized I had the Lua Functions using execCalcCode commented out in the Sync Script. Therefor I uncommented them and restarted the Sync Script. FSUIPC7.logFetching info... FSUIPC_WASM.logFetching info... FSUIPC7.iniFetching info...
John Dowson Posted October 3, 2023 Report Posted October 3, 2023 Unfortunately your logs still don't reveal much. I will need to see a SimConnect.log file, but it may be easier if I can reproduce the issue here. You say: On 10/2/2023 at 10:23 PM, Fragtality said: Everything works fine at the Beginning, but when I trigger the Functions containing execCalcCode Calls (Auto-Script) Expand How do you trigger these functions? By setting a flag (1-8)?
Fragtality Posted October 3, 2023 Author Report Posted October 3, 2023 On 10/3/2023 at 11:37 AM, John Dowson said: How do you trigger these functions? By setting a flag (1-8)? Expand Yes, I'm sending a LuaToggle to FSUIPC (through the C# Client) But as the Logs show it can also manifest itself just by restarting the Sync-Script. At the Point where I triggered the LuaToggles the Log was already full with the mentioned Error.
Fragtality Posted October 3, 2023 Author Report Posted October 3, 2023 Here with LogLevel set to Trace. Don't really need to trigger any Function in the Auto-Script. It now manifests shortly after loading into the Session. FSUIPC_WASM.logFetching info... FSUIPC7.logFetching info... WT787_SYNC.luaFetching info...
John Dowson Posted October 3, 2023 Report Posted October 3, 2023 I cannot reproduce here - both scripts seem to run just fine... Are you using any other WAPI clients at the same time? If so, do you have any WAPI log files for those? What are these programs that you are also running: Quote 96875 Run: "F:\MSFS2020\FenixQuartz\FenixQuartz.exe" 96875 Run: "F:\MSFS2020\Fenix2GSX\Fenix2GSX.exe" 96891 Run: "F:\MSFS2020\DynamicLOD\DynamicLOD.exe" Expand ? Can you try with those disabled to see if that makes a difference please. On 10/3/2023 at 12:08 PM, Fragtality said: Don't really need to trigger any Function in the Auto-Script. It now manifests shortly after loading into the Session. Expand And this change occurred when you set trace logging? If you go back to Debug or Info logging, does iiiit revert to previous behaviour? This is all very strange....
Fragtality Posted October 3, 2023 Author Report Posted October 3, 2023 On 10/3/2023 at 12:35 PM, John Dowson said: What are these programs that you are also running: Expand Except for FenixQuartz, they don't use FSUIPC at all. Quartz only to write FSUIPC Offsets. All L-Var / A-Var / CalcCode is run through the MF Event Module. On 10/3/2023 at 12:35 PM, John Dowson said: Can you try with those disabled to see if that makes a difference please. Expand I'll try later! On 10/3/2023 at 12:35 PM, John Dowson said: And this change occurred when you set trace logging? If you go back to Debug or Info logging, does iiiit revert to previous behaviour? Expand Don't think it correlates with Logging. By now I'm also not sure that it correlates with two Scripts using execCalcCode. The Sync-Script apparently just goes bad after some Time on its own.
John Dowson Posted October 3, 2023 Report Posted October 3, 2023 On 10/3/2023 at 12:41 PM, Fragtality said: The Sync-Script apparently just goes bad after some Time on its own. Expand How long? Its been running here for > 30mins without an issue so far, and the Auto script is also running, and I have assigned buttons to toggle the flags, and can't reproduce the error whatever I do. So this does seem peculiar to your set-up somehow...
John Dowson Posted October 3, 2023 Report Posted October 3, 2023 If I can't reproduce here, I will need to see your SimConnect.log file. See the FAQ section on how to enable this: They will be very large... Also, check the max number of simconnect clients allowed in your SimConnect.xml file (MaxClients), and set to a minimum of 64 if not already.
John Dowson Posted October 3, 2023 Report Posted October 3, 2023 In an unrelated issue, you have a missing joystick: Quote D=VKBsim Gladiator NXT R << MISSING JOYSTICK >> D.GUID={35FCE3C0-83F7-11ED-8001-444553540000} Expand as the GUID of this device has changed: Quote F= VKBsim Gladiator NXT R F.GUID={85885C80-87DA-11ED-8001-444553540000} Expand You could have corrected this, but it looks like you have already re-assigned quite a few thinks to the F device. To correct this, review all your assignments to D, and either delete or change them to F. Then remove those two D entries. If this happens again, you can recover by copying the GUID value of the new entry to the old one, and then remove the new entries,
John Dowson Posted October 3, 2023 Report Posted October 3, 2023 Can you also try without the GSX_AUTO lua script running, to see if that makes a difference....
Fragtality Posted October 3, 2023 Author Report Posted October 3, 2023 On 10/3/2023 at 1:24 PM, John Dowson said: In an unrelated issue, you have a missing joystick: Expand Yeah saw this, but did not really mind to fiddle with the ini since I did not miss any Bindings 😅 On 10/3/2023 at 1:04 PM, John Dowson said: How long? Its been running here for > 30mins without an issue so far, and the Auto script is also running, and I have assigned buttons to toggle the flags, and can't reproduce the error whatever I do. So this does seem peculiar to your set-up somehow... Expand More like < 1 Minute Here the Logs including the SimConnect log. What is Strange: although I tested without GSX_AUTO yesterday already without any Difference (saw also that the L-Var IDs being reported belong to it) it now made a Difference. First I tested without that Script and the Programs and then with the Script but still without Programs and on this second Attempt it appeared within Seconds. logs.zipFetching info... GSX_AUTO.luaFetching info...
John Dowson Posted October 3, 2023 Report Posted October 3, 2023 On 10/3/2023 at 2:16 PM, Fragtality said: What is Strange: although I tested without GSX_AUTO yesterday already without any Difference (saw also that the L-Var IDs being reported belong to it) it now made a Difference. First I tested without that Script and the Programs and then with the Script but still without Programs and on this second Attempt it appeared within Seconds. Expand Sorry, are you saying that you now don't get the error when the GSX_AUTO script is not running?
Fragtality Posted October 3, 2023 Author Report Posted October 3, 2023 On 10/3/2023 at 2:20 PM, John Dowson said: Sorry, are you saying that you now don't get the error when the GSX_AUTO script is not running? Expand Yes indeed. But also still without these Programs running - so that is the Difference to yesterday. Runs fine for several Minutes now (even when toggling LuaFunctions from the WT787_AUTO Script) FSUIPC7.iniFetching info...
John Dowson Posted October 3, 2023 Report Posted October 3, 2023 I can't see how the GSX_AUTO script can affect things, and I have had it running here together with your other 2 scripts for several hours without issue. I have also taken a look at your simconnect.log file. There are errors/exceptions from FenixBootStrapper (which has 5 connections, or 5 copies running....), PilotsDeck, FSUIPC7_AItraffic (expected occasionally), and some from the FSUIPC_WASM_IF (WAPI). However, the WAPI exceptions are not related to your issue, as they relate to the lvar names and values CDAs. Not sure what is causing those (I will investigate further when time permits), but I don't think there is an issue there. There don't seem to be any exceptions logged from a SetClientData call. Are you sure there wasn't a later log file (e.g. SimConnect4.log)? So, sorry, but I am at a loss what is causing this issue, and not sure what to advise or how to investigate further at the moment. I really need to be able to reproduce this issue to investigate further...
Fragtality Posted October 3, 2023 Author Report Posted October 3, 2023 On 10/3/2023 at 6:33 PM, John Dowson said: I can't see how the GSX_AUTO script can affect things, and I have had it running here together with your other 2 scripts for several hours without issue. Expand I share the same Confusion! I mean I create and Update two L-Vars there. The Rest is reading a File, reading GSX L-Vars and writing Offsets - nothing extraordinary ^^ But: do you also have GSX installed and running with that Test? I'm not sure it would do much when GSX is not available 🤔 One Test I might commence: starting the GSX_AUTO Script with the WT787 FSUIPC Profile. I normally have that GSX Script as global Script since it is not specific to an Airplane. On 10/3/2023 at 6:33 PM, John Dowson said: There don't seem to be any exceptions logged from a SetClientData call. Are you sure there wasn't a later log file (e.g. SimConnect4.log)? Expand Not when I did those two Tests I send you the Logs from. I collected what was there and deleted the SimConnect log before the next one. On 10/3/2023 at 6:33 PM, John Dowson said: So, sorry, but I am at a loss what is causing this issue, and not sure what to advise or how to investigate further at the moment. I really need to be able to reproduce this issue to investigate further... Expand I did not really test purposely yesterday, but combining the execCalcCode Calls helped for a short Time at least. Maybe you can provoke it by reverting that Change (so each Line is again its own execCalcCode Call). But I understand, it seems like a weird Timing-Problem - which are the hardest to reproduce and troubleshoot 😕
John Dowson Posted October 4, 2023 Report Posted October 4, 2023 On 10/3/2023 at 7:02 PM, Fragtality said: But: do you also have GSX installed and running with that Test? I'm not sure it would do much when GSX is not available 🤔 Expand No I don't... On 10/3/2023 at 7:02 PM, Fragtality said: But I understand, it seems like a weird Timing-Problem - which are the hardest to reproduce and troubleshoot 😕 Expand I am not sure it is... I also tried duplicating the sync script and ran 3 copies without issue. Access (read and write) to lvars is already protected (by a mutex) to prevent any issues with multi-thread access. I will add similar thread protection to the calls that send calc code so you can check with this to see if that makes a difference - I will post a new version for you to try later today. John
John Dowson Posted October 4, 2023 Report Posted October 4, 2023 On 10/4/2023 at 8:39 AM, John Dowson said: I will add similar thread protection to the calls that send calc code so you can check with this to see if that makes a difference - I will post a new version for you to try later today. Expand Could you try the attached version please: FSUIPC7.exe
Fragtality Posted October 4, 2023 Author Report Posted October 4, 2023 On 10/4/2023 at 9:39 AM, John Dowson said: Could you try the attached version please: FSUIPC7.exe Expand That does seem to have solved the Issue! Thanks! 😃 Running with everything enabled (that is with GSX-Script, Programs and the WT787 Sync Script running all Functions) for several Minutes without any Issues. Can Trigger Functions from the Auto-Script, can even restart the Sync-Script. Just works. Have to get back to Work now, let's hope that it stays that Way when I continue working on the Profile this Evening 😉
John Dowson Posted October 4, 2023 Report Posted October 4, 2023 Ok, great - although this does surprise me a bit, as it means that the simconnect setclientdata calls are not reentrant.... Let me know if you get any issues after further testing.
Fragtality Posted October 5, 2023 Author Report Posted October 5, 2023 Running stable so far! In Hours sitting in the Sim and doing my Profile (also editing and even restarting the Scripts) it just kept working. Must have been very special Timing on my Side to trigger something that should not happen 😅
Fragtality Posted October 15, 2023 Author Report Posted October 15, 2023 Heyho, it's me again 😅 I sometimes have the Issue that FSUIPC stops working when loading into the 787 (and hence FSUIPC needs to load the WT787 Scripts). The Application hangs, the Systray does not respond (my StreamDeck Plugin also indicates a Connection-Loss). I need to stop FSUIPC via Task-Manager. When I start it again, it all perfectly without any Issue for many Hours (i.e. through a complete Long-Haul Flight). I only could manage to create a Debug-Log of that Situation. When I wanted to Troubleshoot it with Verbose-Logging it suddenly worked -.- FSUIPC7-hang.debug.logFetching info...
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