Jump to content

Apparent clash between 2 lua scripts.


TinkerNZ

Recommended Posts

Hi Agi,

I am experiencing a lua conflict between Arcal and FlyAgi Tweak Utility at start up of X-Plane 11.
When my system reaches the airport and completes loading everything for X-Plane, plane on the runway etc, FWL engine has stopped and requires a manual re-start. Once that is clicked both Arcal and FTU start up and appear to live together nicely.
When disabling one or other lua script before starting XP there is no problem, however for some reason when starting with both lua scripts active the FWL engine crashes. Restarting it is not recommended according to FWL, but when done anyway both scripts run ok.

Any idea what might be causing this apparent clash and how to fix it?

 

I'm running latest version of FTU and you can find Arcal here: https://forums.x-plane.org/index.php?/files/file/39141-arcal-aircraft-radio-control-of-aerodrome-lighting/&page=2&tab=comments

I've posted a request for support in the Arcal Page comments, but so far no reply. I've also tried putting the rather large arcal lua script within the static override lua of FTU with the same lua engine crash.

TinkerNZ

Link to comment
Share on other sites

  • Developer

Most likely this is a datref access conflict, both scripts are using certain datarefs and use different internal names for them which then crahses FlyWithLua. I wonder how it's possibly that both script can run together when reloading scripts as the situation should be the same then if it's a dataref conflict. You could try to increase FTU's startup delay in the launcher options to see if this solves the crahsing, otherwise I need a log.txt file so see what's actually the reason for the crashes.

 

Anyway, dataref compatibility issues are a common thing with FTU and I have not the time and mood to fix this because this would need a more or less complete rewrite of the program.

Link to comment
Share on other sites

23 hours ago, FlyAgi said:

You could try to increase FTU's startup delay in the launcher options to see if this solves the crahsing, otherwise I need a log.txt file so see what's actually the reason for the crashes.

Thanks for coming back with a reply. I tried the increase of startup delay without success. Currently set to 15 secs max.
Attached is last log.txt (zipped) with a startup at NZPP.  FWL had to be re-started, but after that both scripts ran fine. FTU appeared to do its thing and Arcal also worked, switching on the lights ok.

If you could look at the log.txt for anything obvious that would be great. (mostly gobble de gook to me)

Log.zip

Link to comment
Share on other sites

  • Developer

The log says there are some datarefs accessed by multiple scripts and this is fine as long as only one of the scripts wants to write the datarefs. If two different scripts want to write the same datarefs with different internal names lua will crash and this seems to happen at start so you have to reload the scripts once. There is not so much I can do here aside from rewriting FTU to really make this dataref access issues disappear which I won't do for various reasons.

 

A workaround usually is to rename the internal dataref name in one of the scripts so the names match in both scripts, then the dataref access works without crashes but as many scripts use different internal names for the same datarefs doing this in FTU just fixes one imcompatibility and creates another one with another script (I went this way for a while renimg datrefs in FTU to macht other scripts naming until I found other scripts use different names and I can't maintain compatibility with all of them). Best way to really solve this would be in FlyWithLua itself so it allows using different internal dataref names not only readonly but also writable but I suspect the devs have reasons for doing it the way it is now so I may be wrong here.

 

 

Link to comment
Share on other sites

Thanks for coming back with your findings.
I'll try to address this via the creator of Arcal. One, it is smaller and easier to maintain or make changes and secondly FTU is a must have plugin for me and Arcal only was added more recently.

Thanks again
TinkerNZ

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy & Terms of Use