-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xlua: Problem to properly read/evaluate dataref (crash) #22
Comments
@GladYouAsked My testing: However, if I comment out the "find_dataref" lines and add ...
Then the script will run and I do not get a crash. Note: "AW109_CAS_count" is never incremented in your test script and therefore the debug print at the bottom of the script is never run. My guess is there is something else going on when you cycle the gear. The only way for me to test this any further would be to have a copy of the actual aircraft you are running the scripts in. |
@JGregory
It is located in the correct location with the correct name and it is working in principle. The problem is in interacting with that specific dataref (aw109/CAS_text).
Maybe my problem description was not clear, sorry: And I understand if you are not able to debug this as you probably do not own that aircraft. So is there anything I can do for debugging on my side? I will contact the author of the AW109SP (X-Trident) as well, maybe he has an idea what is going on. |
You initially stated that the example script would "demonstrate the problem" but when I run it (with the modifications I mentioned) in a test aircraft I do not get any crash. That makes me feel this is most likely an issue somewhere in the AW109SP and not with XLua. If it were an XLua issue I think we would have had other reports of this by now. Since I don't know what the plugin for the AW109SP is doing, I can't know why the aircraft is crashing. I'm not sure what you mean by a "formal guide". We do have a document for XLua that explains the use of custom datarefs.... If the issue persists and you can get me a copy of the aircraft I will be happy to do some more testing. |
Hello,
there seems to be an issue with reading/evaluating a specific dataref with xlua.
I assume it could be an issue with xlua, as there is no issue to read this dataref with the DataRefEditor or via a FlyWithLua-Script.
Even it seems to be a strangely behaving dataref, xlua should not crash when just reading such a dataref.
The principle problem in interacting with this dataref has been confirmed by another user.
The xlua-script attached below is reduced to the minimum to demonstrate the problem.
What I try to do:
I want to extract information from a dataref to display it on a StreamDeck+ via X-KeyPad.
I use xlua for this to avoid installation of FlyWithLua or similar.
Aircraft: X-Trident AW109SP
Dataref: aw109/CAS_text (string with variable size)
Location of the lua-script: \X-Plane 12\Aircraft\AW109SP v1.0 for X-Plane 12\plugins\xlua\scripts\XKP.ParseCASDisplay
Description of Problem:
Typically it works. But as soon as I take off and cycle the landing gear and the gear is almost retracted X-Plane crashes. It is reproducible. Obviously s.th. changes with the dataref in this moment.
I see no useable information in the Log.txt (attached), X-Plane just crashes and the log ends without further information.
What I have done so far:
ECS ON|FLTA INHBT|LANDING GEAR|LIMITER ON|MAIN UTIL CHRG|
ECS ON|FLTA INHBT|LIMITER ON|
ECS ON|FLTA INHBT|LIMITER ON|1 OIL PRES|2 OIL PRES|ROTOR LOW|
Attached:
XKP.ParseCASDisplay.txt
Log - Copy.txt
XKeyPad_XTRIDENT_AW109SP_ParseCASDisplay_Min.txt
The text was updated successfully, but these errors were encountered: