Skip to content
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

X-Plane Crashes When Sending Large Int Array #55

Open
ssokol opened this issue Oct 20, 2019 · 3 comments
Open

X-Plane Crashes When Sending Large Int Array #55

ssokol opened this issue Oct 20, 2019 · 3 comments
Labels

Comments

@ssokol
Copy link

ssokol commented Oct 20, 2019

I've run across a case where sending a valid dataref set string to ExpPlane causes X-Plane to crash. My app uses a combination of ExtPlane and UDP. I'm attempting to use the sim/network/dataout/data_to_internet dataref to enable various UDP outputs when my server starts up. However, sending a string with 200 int values (which is what that dataref appears to require) causes a crash.

I'm able to subscribe to the dataref, and ExpPlane sends back a response string that accurately reflects the values set on the General Data Output tab of the Data Output settings page:

uia sim/network/dataout/data_to_internet [0,0,0,1,1,1,1,0,0,0,0,1,0,0,1,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,1,0,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,187,90,64,75,2,0,0,184,187,90,64,75,2,0,0,204,187,90,64,75,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

But when I send a set request with exactly the same set of values, X-Plane dies:

xmitExtPlaneCommand("set sim/network/dataout/data_to_internet [0,0,0,1,1,1,1,0,0,0,0,1,0,0,1,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,1,0,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,107,232,22,236,1,0,0,8,108,232,22,236,1,0,0,28,108,232,22,236,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]\r\n")

(Note: carriage returns have been added for clarity. When sent the value is sent as one long string with no breaks.)

The odd thing about this: X-Plane 11 shows a total of 136 outputs (0 - 135). The array hold 200 integer values, and as you can see there are some values in there at indexes greater than 135. I simply sent back the values that I received - perhaps that's an issue?

Anyone have any ideas?

@vranki
Copy link
Owner

vranki commented Oct 20, 2019

Can you run X-Plane in debugger to see where it crashes?

@vranki vranki added the bug label Oct 20, 2019
@ssokol
Copy link
Author

ssokol commented Oct 20, 2019

Sure. Is that simply a matter of running it from the command prompt, or is there some kind of flag I need to set / argument I need to use?

(Apologies for the noob question.)

@vranki
Copy link
Owner

vranki commented Oct 21, 2019

At least on Linux you just can run gdb ./X-Plane_x86-64 , crash it and use bt to show backtrace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants