ExtPlane
                                
                                
                                
                                    ExtPlane copied to clipboard
                            
                            
                            
                        X-Plane Crashes When Sending Large Int Array
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?
Can you run X-Plane in debugger to see where it crashes?
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.)
At least on Linux you just can run gdb ./X-Plane_x86-64 , crash it and use bt to show backtrace.