I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
OK, I added a huge number of debug log statements and I've found WHERE the crash on load is happening, I just don't understand WHY...
In fms_fp.cpp, fms_fp_t::has_changed is called on startup with the departure point being index 0 of the FP, in my case KBOS. The actual line is load_entry(0, departure); which I wrapped in debug output...
I also put debug output into the load_entry code, including a "done" log output right before the closing parenthesis.
void fms_fp_t::load_entry(int index,fms_fp_item_t* item) {
.
.
.
debug_out(verbose, "fms_fp: creating FP item %d with name %s (%s) type %d lat %f lon %d alt %d", index,item->a_name.c_str(),item->a_full_name.c_str(),item->a_type,item->a_lat,item->a_lon,item->a_altitude);
debug_out(verbose, "fms_fp: done with load_entry");
}
This is the xlog.txt resulting from this:
[2019-01-11 07:07:23] [debug] fms_fp: Load the departure/arrival currently set in the FP
[2019-01-11 07:07:23] [verbose] fms_fp: creating FP item 0 with name KBOS (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
[2019-01-11 07:07:23] [verbose] fms_fp: done with load_entry
So, load_entry makes it all the way through the code without error, because the final debug output gets logged BUT the debug_out immediately following where the function should have returned:
debug_out(debug,"fms_fp: Loading departure at index 0");
load_entry(0,departure);
debug_out(debug,"fms_fp: back from load_entry - departure");
never logs the "back from load_entry" into the xlog.txt, instead XP throws an overflow exception... departure is fms_fp_item_t so...
I'm looking at the class fms_fp_item_t in the fms_fp.h file, but I don't see anything in the class that would explain why the hell populating "departure" inside load_entry would cause an overflow... the whole class is basically primative types except for the XPLMNavType enum, and KBOS was type 1, which is a legal enum value so there's no even the case that departure was populated with an invalid enum value.
My CPP is very rusty, but I'm baffled on this one... just doesn't make sense... if something done with departure overflowed, it should have blown up right inside load_entry, not after load_entry successfully completes and returns to the next line of fms_fp_t::has_changed
Another update, and it keeps getting stranger.
XP 11 on Steam just autoupdated to X-Plane 11.30r3 (build 113014 64-bit) compiled on Jan 9 2019 09:56:28
XControl no longer crashes during load, and the debug statements that were not being reached are now successfully executed.
[2019-01-13 10:10:01] [debug] fms_fp: Load the departure/arrival currently set in the FP
[2019-01-13 10:10:01] [debug] fms_fp: FP contains 2 entries
[2019-01-13 10:10:01] [debug] fms_fp: Loading departure at index 0
[2019-01-13 10:10:01] [debug] fms_fp: load_entry index (0)
[2019-01-13 10:10:01] [debug] fms_fp: load_entry index (0) for item [KHVN], name set to KHVN
[2019-01-13 10:10:01] [debug] fms_fp: load_entry index (0) for name [KHVN] aka [USS Nimitz]
[2019-01-13 10:10:01] [debug] fms_fp: load_entry index (0) for item [KHVN], full name set to USS Nimitz
[2019-01-13 10:10:01] [verbose] fms_fp: creating FP item 0 with name KHVN (USS Nimitz) type 1 (APT) lat 41.263748 lon -72.886803 alt 14
[2019-01-13 10:10:01] [verbose] fms_fp: done with load_entry
[2019-01-13 10:10:01] [debug] fms_fp: back from load_entry - departure
[2019-01-13 10:10:01] [debug] fms_fp: Loading arrival at index (1)
[2019-01-13 10:10:01] [debug] fms_fp: load_entry index (1)
[2019-01-13 10:10:01] [debug] fms_fp: load_entry index (1) for item [KBDL], name set to KBDL
[2019-01-13 10:10:01] [debug] fms_fp: load_entry index (1) for name [KBDL] aka [USS Nimitz]
[2019-01-13 10:10:01] [debug] fms_fp: load_entry index (1) for item [KBDL], full name set to USS Nimitz
[2019-01-13 10:10:01] [verbose] fms_fp: creating FP item 1 with name KBDL (USS Nimitz) type 1 (APT) lat 41.939144 lon -72.683372 alt 171
[2019-01-13 10:10:01] [verbose] fms_fp: done with load_entry
[2019-01-13 10:10:01] [debug] fms_fp: back from load_entry - arrival
[2019-01-13 10:10:01] [all] data: 'sim/flightmodel/position/true_airspeed' type 2 reported new data (6.69373e-06)
[2019-01-13 10:10:01] [all] mfdpage: page flight.high (0) received the updated 'sim/flightmodel/position/true_airspeed': 6.69373e-06
As soon as I press the key bound to the page cycling (I've bound 1,2,3,4 in the keyboard settings because it wasn't listed in any possible button bindings) I get this .. then XP crashes again
[2019-01-13 10:10:01] [verbose] in: handling page change from button 1
[2019-01-13 10:10:01] [debug] in: setting current page {welcome} as inactive
I'm going to start inserting debug output once I find the section containing that list debug statement and see if I can get any more info...
Hopefully this project is still somewhat active and not abandoned, I'd hate to be doing all this for nothing.
Hey David, first of all thanks for your troubleshooting effort! Let me go through the information you've shared so far and I'll let you know since a while ago I went through a similar exercise by myself as well. Thanks!
Last edit: user2684 2019-01-13
Excellent... it gets past the original crash point now, as you can see from the last log, but I just noticed that all the FP names are coming out as "USS Nimitz" which is a new problem that wasn't in the old logs (which had the correct names)
Argh... so the progress was only temporary. I upgraded the SDK to the current version, hoping it would fix the problem with the name lookups and the crash in the handling page change, and the original problem is back...
debug_out(debug,"fms_fp: Loading departure at index 0");
load_entry(0,departure);
debug_out(debug,"fms_fp: back from load_entry - departure");
Plugin crashes after the last line of load_entry (which is a debug print that successfully outputs)
This is what's expected
[verbose] fms_fp: creating FP item 0 with name KBOS (General Edward Lawrence Logan International) type 1 (APT) lat 42.362946 lon -71.006386 alt 20
[verbose] fms_fp: done with load_entry
[debug] fms_fp: back from load_entry - departure
This is what happens instead
[verbose] fms_fp: creating FP item 0 with name KBOS (General Edward Lawrence Logan International) type 1 (APT) lat 42.362946 lon -71.006386 alt 20
[verbose] fms_fp: done with load_entry
{crash}
This is the original issue that I reported.. notably though, upgrading the SDK seems to have fixed the issue with every navaid returning "USS Nimitz" instead of the proper name, because KBOS is correctly showing the airport name now.
Hi, sorry once again for the delay...I've just reviewed carefully your tests. Now, there are some similarities with what has been discussed in https://sourceforge.net/p/x-control/tickets/44/?page=1&limit=25#b1f2 but looks like the crash here is hitting a different piece of code. Just noticed I've never published the updated version mentioned in that thread and even worse, shame on me, never pushed out the updated code which should be somewhere here, just need to find out where :-/ But anyway I doubt my fix is solving what you are experiecing based on the information you have shared.
I agree with you, it doesn't make any sense to me as well that "done with load_entry" is showing up but the crash happen before "back from load_entry - departure". The only thing I can think of is that something else is happening (a different callback) causing the crash somewhere else but sounds very unlikely...
And regarding USS Nimitz I experienced exactly the same while testing the fix but when I restarted next, it was gone and everything was working fine back again.
Anyway, I'll try to do some tests this weekend and reproduce the issue so to hopefully find out the issue...I'm sure XP API has changed since 2014 but this doesn't explain this kind of crash...
Btw, in old versions of XP when I crash took place in Linux and Mac, the full exception including the line in the code causing it was written somewhere in the root XP directory (CycleDump.txt or CrashDump.txt). I doubt it is the same with XP11 but worth of checking it out.
Thanks again for your patience
I believe there was a cycledump.txt in the main XP11 folder...I don't recall whether it was empty, or didn't have any useful information...
What was really strange was that while it was spewing "USS Nimitz" as the name of every navaid, it wasn't actually crashing until I tried to use the bound change-page button.
Updating the SDK to the current release, and switching the define to enable v3 SDK support, fixed the navaid lookup but brought back the crash on load or addition of navaid to the flight plan.
I uploaded a bunch of updates with the details on this to the ticket. One of the biggest changes in XP11 is that it's all 64 bit.... No 32-bit plugins anymore...
Let me know if there's updated code retrievable from GIT or Sourceforge somewhere and I'll redownload and stick back in my debugging statements.
I'll also look for those crash files and see if anything is actually going in there.
From: user2684 user2684@users.sourceforge.net
Sent: Wednesday, January 16, 2019 3:45 PM
To: [x-control:tickets] 47@tickets.x-control.p.re.sourceforge.net
Subject: [x-control:tickets] #47 XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Hi, sorry once again for the delay...I've just reviewed carefully your tests. Now, there are some similarities with what has been discussed in https://sourceforge.net/p/x-control/tickets/44/?page=1&limit=25#b1f2 but looks like the crash here is hitting a different piece of code. Just noticed I've never published the updated version mentioned in that thread and even worse, shame on me, never pushed out the updated code which should be somewhere here, just need to find out where :-/ But anyway I doubt my fix is solving what you are experiecing based on the information you have shared.
I agree with you, it doesn't make any sense to me as well that "done with load_entry" is showing up but the crash happen before "back from load_entry - departure". The only thing I can think of is that something else is happening (a different callback) causing the crash somewhere else but sounds very unlikely...
And regarding USS Nimitz I experienced exactly the same while testing the fix but when I restarted next, it was gone and everything was working fine back again.
Anyway, I'll try to do some tests this weekend and reproduce the issue so to hopefully find out the issue...I'm sure XP API has changed since 2014 but this doesn't explain this kind of crash...
Btw, in old versions of XP when I crash took place in Linux and Mac, the full exception including the line in the code causing it was written somewhere in the root XP directory (CycleDump.txt or CrashDump.txt). I doubt it is the same with XP11 but worth of checking it out.
Thanks again for your patience
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Sun Jan 13, 2019 11:57 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Tickets: #47
Hey there, I've spent a good amount of hours trying to find out the changes applied in the code referenced by ticket #44 (backup, external drives, NAS, etc.) without success. I'm afraid the code was in an old laptop I don't have anymore and for some unknown reasons I did not push it to the repo here (I guess because was still work in progress and then the activity on that ticket stopped). Again shame on me. But I spent some time trying to remeber the changes. Again I don't think it is fully related to this issue but could be worth applying them anyway.
For sure on https://sourceforge.net/p/x-control/code/ci/master/tree/fms_fp.cpp#l170 I've increased that buffer from 80 to 1024, both tmp_name and tmp_full_name. Then in https://sourceforge.net/p/x-control/code/ci/master/tree/fms.cpp#l308 I remember to have changed the line in something like
if (changed && a_current_entry_index != -1 && (a_fp_ref->a_fp[a_current_entry_index]->a_time_actual != -1)) { }to avoid a_current_entry_index initialized to -1 could become an issue when used as an array index.
I don't remember other changes.
I also wanted to reproduce the issue in the same way you described it but I definitely have issue with XP11 in terms of resources for running it. I'll try to find out an alternative and help you out as much as I can.
Thanks
What can I do to help?
On Jan 20, 2019, at 12:05 PM, user2684 user2684@users.sourceforge.netamp#117;amp#115;amp#101;amp#114;amp#50;amp#54;amp#56;amp#52;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#111;amp#117;amp#114;amp#99;amp#101;amp#102;amp#111;amp#114;amp#103;amp#101;amp#46;amp#110;amp#101;amp#116; wrote:
Hey there, I've spent a good amount of hours trying to find out the changes applied in the code referenced by ticket #44 (backup, external drives, NAS, etc.) without success. I'm afraid the code was in an old laptop I don't have anymore and for some unknown reasons I did not push it to the repo here (I guess because was still work in progress and then the activity on that ticket stopped). Again shame on me. But I spent some time trying to remeber the changes. Again I don't think it is fully related to this issue but could be worth applying them anyway.
For sure on https://sourceforge.net/p/x-control/code/ci/master/tree/fms_fp.cpp#l170 I've increased that buffer from 80 to 1024, both tmp_name and tmp_full_name. Then in https://sourceforge.net/p/x-control/code/ci/master/tree/fms.cpp#l308 I remember to have changed the line in something like
if (changed && a_current_entry_index != -1 && (a_fp_ref->a_fp[a_current_entry_index]->a_time_actual != -1)) { }
to avoid a_current_entry_index initialized to -1 could become an issue when used as an array index.
I don't remember other changes.
I also wanted to reproduce the issue in the same way you described it but I definitely have issue with XP11 in terms of resources for running it. I'll try to find out an alternative and help you out as much as I can.
Thanks
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Wed Jan 16, 2019 08:44 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.nethttp://sourceforge.net because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Tickets: #47
OK… so I’ve gone through the code and increased the buffer sizes. The plugin no longer crashes on load and it doesn’t crash when the FP is edited.
However, when the button is pressed corresponding to cycle FMS page 1 or something like that, I still get a crash…
the last entry in the log is something about clearing the welcome screen. I’ve just recompiled the plugin with the debug flag set so hopefully I’ll get a dump with an actual line number and module instead of the general crash error
On Jan 20, 2019, at 12:05 PM, user2684 user2684@users.sourceforge.netamp#117;amp#115;amp#101;amp#114;amp#50;amp#54;amp#56;amp#52;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#111;amp#117;amp#114;amp#99;amp#101;amp#102;amp#111;amp#114;amp#103;amp#101;amp#46;amp#110;amp#101;amp#116; wrote:
Hey there, I've spent a good amount of hours trying to find out the changes applied in the code referenced by ticket #44 (backup, external drives, NAS, etc.) without success. I'm afraid the code was in an old laptop I don't have anymore and for some unknown reasons I did not push it to the repo here (I guess because was still work in progress and then the activity on that ticket stopped). Again shame on me. But I spent some time trying to remeber the changes. Again I don't think it is fully related to this issue but could be worth applying them anyway.
For sure on https://sourceforge.net/p/x-control/code/ci/master/tree/fms_fp.cpp#l170 I've increased that buffer from 80 to 1024, both tmp_name and tmp_full_name. Then in https://sourceforge.net/p/x-control/code/ci/master/tree/fms.cpp#l308 I remember to have changed the line in something like
if (changed && a_current_entry_index != -1 && (a_fp_ref->a_fp[a_current_entry_index]->a_time_actual != -1)) { }
to avoid a_current_entry_index initialized to -1 could become an issue when used as an array index.
I don't remember other changes.
I also wanted to reproduce the issue in the same way you described it but I definitely have issue with XP11 in terms of resources for running it. I'll try to find out an alternative and help you out as much as I can.
Thanks
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Wed Jan 16, 2019 08:44 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.nethttp://sourceforge.net because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Tickets: #47
[2019-01-24 22:10:35] [verbose] in: handling page change from button 1
[2019-01-24 22:10:35] [debug] in: setting current page {welcome} as inactive
[2019-01-24 22:10:35] [debug] in: current page {welcome} now inactive
[2019-01-24 22:10:35] [debug] in: iterating pages for current button
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: inserting page
[2019-01-24 22:10:35] [debug] in: inserted page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: inserting page
[2019-01-24 22:10:35] [debug] in: inserted page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: inserting page
[2019-01-24 22:10:35] [debug] in: inserted page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: done iterating pages for current button
[2019-01-24 22:10:35] [debug] in: back from a_pages_button.find
[2019-01-24 22:10:35] [debug] in: the data page requested does not belong to a different button
{crash happens here}
I added a bunch of debug output in the vicinity of line80 of in.cpp…
I’m having problems following the logic here…
You get a handle_pagecycle event, with the button that was pressed (say button 1)
it makes the “Welcome” page inactive
it then cycles through something using an iterator (it), is this a collection of mfd_page?
This part works, there are multiple log entries of “inserting page” / “inserted page” and a log of the “done iterating” message
Now it sets up another iterator b_it, and sets it to a_pages_button.find(a_currentpage). This statement works because the “back from a_pages_button.find” is logged
Nothing in the above if creates any log output, so b_it isn’t invalid and b_it is not a_pages.end(), so the ELSE gets executed. In your original code the else is just ++b_it; I added the debug output. The first line of debug output prints to the xlog.txt; however, the second debug output in this code block does NOT print, which would indicate that the ++b_it; statement is what is throwing the exception.
I haven’t been able to figure out what it is that your iterating through here, and why incrementing the iterator would throw an exception.
The log contains entries that would seem to indicate that the mfd page objects are there and are valid
[2019-01-24 22:10:32] [all] mfdpage: page welcome (1) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] mfdpage: page fms.scheduler (0) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] mfdpage: page fms.planner (0) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] mfdpage: page time (0) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] data: 'sim/flightmodel/position/groundspeed' type 2 reported new data (6.23921e-07) [2019-01-24 22:10:32] [all] mfdpage: page flight.high (0) received the updated 'sim/flightmodel/position/groundspeed': 6.23921e-07 [2019-01-24 22:10:32] [all] mfdpage: page fms.refresh (0) received the updated 'sim/flightmodel/position/groundspeed': 6.23921e-07
presumably if there was an issue with the mfd pages, these updates to time, fms.scheduler and fms.planner would have thrown a fault earlier, but it seems to have no issue with these. There are multiple occurrences in the log of these MFD pages receiving updates.
Also, since the earlier for loop using the “it” iterator runs fine, which would again seem to indicate that the collection of mfdpages is healthy.
Where I lose the logic here is why the code increments b_it.
If I’m on the welcome screen, and this is the FIRST time I’m pressing button 2 to access the second page group, then I would expect to be given the first page in that group. From the way this code looks, it seems to me like I’m never going to get the first page, unless I cycle through every page in the group so that it hits
to loop me back around.
It would seem like some logic is necessary here to make sure that the first press of a button for a group always returns a_pages_button.begin()
I’m not sure how to inspect what b_it is pointing at coming back from the a_pages_button.find(a_currentpage), the only thing that seems evident is that it is NOT the value a_pages.end().
Are we looking at the possibility that b_it might be invalid (i.e. null) because this button set was never used before this time and that’s why the ++b_it is throwing exception?
On Jan 24, 2019, at 5:35 PM, David Toth dtoth12@users.sourceforge.netamp#100;amp#116;amp#111;amp#116;amp#104;amp#49;amp#50;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#111;amp#117;amp#114;amp#99;amp#101;amp#102;amp#111;amp#114;amp#103;amp#101;amp#46;amp#110;amp#101;amp#116; wrote:
OK… so I’ve gone through the code and increased the buffer sizes. The plugin no longer crashes on load and it doesn’t crash when the FP is edited.
However, when the button is pressed corresponding to cycle FMS page 1 or something like that, I still get a crash…
the last entry in the log is something about clearing the welcome screen. I’ve just recompiled the plugin with the debug flag set so hopefully I’ll get a dump with an actual line number and module instead of the general crash error
On Jan 20, 2019, at 12:05 PM, user2684 user2684@users.sourceforge.net<mailto:user2684@users.sourceforge.netuser2684@users.sourceforge.netamp#117;amp#115;amp#101;amp#114;amp#50;amp#54;amp#56;amp#52;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#111;amp#117;amp#114;amp#99;amp#101;amp#102;amp#111;amp#114;amp#103;amp#101;amp#46;amp#110;amp#101;amp#116; wrote:
Hey there, I've spent a good amount of hours trying to find out the changes applied in the code referenced by ticket #44 (backup, external drives, NAS, etc.) without success. I'm afraid the code was in an old laptop I don't have anymore and for some unknown reasons I did not push it to the repo here (I guess because was still work in progress and then the activity on that ticket stopped). Again shame on me. But I spent some time trying to remeber the changes. Again I don't think it is fully related to this issue but could be worth applying them anyway.
For sure on https://sourceforge.net/p/x-control/code/ci/master/tree/fms_fp.cpp#l170 I've increased that buffer from 80 to 1024, both tmp_name and tmp_full_name. Then in https://sourceforge.net/p/x-control/code/ci/master/tree/fms.cpp#l308 I remember to have changed the line in something like
if (changed && a_current_entry_index != -1 && (a_fp_ref->a_fp[a_current_entry_index]->a_time_actual != -1)) { }
to avoid a_current_entry_index initialized to -1 could become an issue when used as an array index.
I don't remember other changes.
I also wanted to reproduce the issue in the same way you described it but I definitely have issue with XP11 in terms of resources for running it. I'll try to find out an alternative and help you out as much as I can.
Thanks
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Wed Jan 16, 2019 08:44 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.nethttp://sourceforge.nethttp://sourceforge.nethttp://sourceforge.net/ because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Sun Jan 20, 2019 05:05 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.nethttp://sourceforge.net because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Tickets: #47
Another update…
I check the size of the a_pages_button after it built and it says there are three elements in the set, however, the ++b_it; is still crashing.
If I replace the ++b_it; with an explicit load of the first element of the set, "b_it = a_pages_button.begin();” then I can press the buttons and the first page associated with each button set displays on the throttle screen…
On Jan 24, 2019, at 10:51 PM, David Toth dtoth12@users.sourceforge.netamp#100;amp#116;amp#111;amp#116;amp#104;amp#49;amp#50;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#111;amp#117;amp#114;amp#99;amp#101;amp#102;amp#111;amp#114;amp#103;amp#101;amp#46;amp#110;amp#101;amp#116; wrote:
[2019-01-24 22:10:35] [verbose] in: handling page change from button 1
[2019-01-24 22:10:35] [debug] in: setting current page {welcome} as inactive
[2019-01-24 22:10:35] [debug] in: current page {welcome} now inactive
[2019-01-24 22:10:35] [debug] in: iterating pages for current button
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: inserting page
[2019-01-24 22:10:35] [debug] in: inserted page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: inserting page
[2019-01-24 22:10:35] [debug] in: inserted page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: inserting page
[2019-01-24 22:10:35] [debug] in: inserted page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: done iterating pages for current button
[2019-01-24 22:10:35] [debug] in: back from a_pages_button.find
[2019-01-24 22:10:35] [debug] in: the data page requested does not belong to a different button
{crash happens here}
I added a bunch of debug output in the vicinity of line80 of in.cpp…
if (b_it == a_pages.end()) {
}
else {
}
if (b_it == a_pages_button.end()) {
}
debug_out(debug,"in: changing current page and setting active");
I’m having problems following the logic here…
You get a handle_pagecycle event, with the button that was pressed (say button 1)
it makes the “Welcome” page inactive
it then cycles through something using an iterator (it), is this a collection of mfd_page?
std::set<mfdpage_t*> a_pages_button; // temp set with only the pages belonging to the current button</mfdpage_t*>
debug_out(debug,"in: iterating pages for current button");
for (set<mfdpage_t*>::iterator it = a_pages.begin(); it != a_pages.end(); ++it) // cycle through all the pages</mfdpage_t*>
{
}
debug_out(debug,"in: done iterating pages for current button");
This part works, there are multiple log entries of “inserting page” / “inserted page” and a log of the “done iterating” message
Now it sets up another iterator b_it, and sets it to a_pages_button.find(a_currentpage). This statement works because the “back from a_pages_button.find” is logged
set<mfdpage_t*>::iterator b_it = a_pages_button.find(a_currentpage); // find the current page in the current button set</mfdpage_t*>
debug_out(debug,"in: back from a_pages_button.find");
if (b_it == a_pages.end()) {
}
Nothing in the above if creates any log output, so b_it isn’t invalid and b_it is not a_pages.end(), so the ELSE gets executed. In your original code the else is just ++b_it; I added the debug output. The first line of debug output prints to the xlog.txt; however, the second debug output in this code block does NOT print, which would indicate that the ++b_it; statement is what is throwing the exception.
else {
}
I haven’t been able to figure out what it is that your iterating through here, and why incrementing the iterator would throw an exception.
The log contains entries that would seem to indicate that the mfd page objects are there and are valid
[2019-01-24 22:10:32] [all] mfdpage: page welcome (1) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] mfdpage: page fms.scheduler (0) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] mfdpage: page fms.planner (0) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] mfdpage: page time (0) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] data: 'sim/flightmodel/position/groundspeed' type 2 reported new data (6.23921e-07) [2019-01-24 22:10:32] [all] mfdpage: page flight.high (0) received the updated 'sim/flightmodel/position/groundspeed': 6.23921e-07 [2019-01-24 22:10:32] [all] mfdpage: page fms.refresh (0) received the updated 'sim/flightmodel/position/groundspeed': 6.23921e-07
presumably if there was an issue with the mfd pages, these updates to time, fms.scheduler and fms.planner would have thrown a fault earlier, but it seems to have no issue with these. There are multiple occurrences in the log of these MFD pages receiving updates.
Also, since the earlier for loop using the “it” iterator runs fine, which would again seem to indicate that the collection of mfdpages is healthy.
Where I lose the logic here is why the code increments b_it.
If I’m on the welcome screen, and this is the FIRST time I’m pressing button 2 to access the second page group, then I would expect to be given the first page in that group. From the way this code looks, it seems to me like I’m never going to get the first page, unless I cycle through every page in the group so that it hits
if (b_it == a_pages_button.end()) {
to loop me back around.
It would seem like some logic is necessary here to make sure that the first press of a button for a group always returns a_pages_button.begin()
I’m not sure how to inspect what b_it is pointing at coming back from the a_pages_button.find(a_currentpage), the only thing that seems evident is that it is NOT the value a_pages.end().
Are we looking at the possibility that b_it might be invalid (i.e. null) because this button set was never used before this time and that’s why the ++b_it is throwing exception?
On Jan 24, 2019, at 5:35 PM, David Toth dtoth12@users.sourceforge.net<mailto:dtoth12@users.sourceforge.netdtoth12@users.sourceforge.netamp#100;amp#116;amp#111;amp#116;amp#104;amp#49;amp#50;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#111;amp#117;amp#114;amp#99;amp#101;amp#102;amp#111;amp#114;amp#103;amp#101;amp#46;amp#110;amp#101;amp#116; wrote:
OK… so I’ve gone through the code and increased the buffer sizes. The plugin no longer crashes on load and it doesn’t crash when the FP is edited.
However, when the button is pressed corresponding to cycle FMS page 1 or something like that, I still get a crash…
the last entry in the log is something about clearing the welcome screen. I’ve just recompiled the plugin with the debug flag set so hopefully I’ll get a dump with an actual line number and module instead of the general crash error
On Jan 20, 2019, at 12:05 PM, user2684 user2684@users.sourceforge.netuser2684@users.sourceforge.netuser2684@users.sourceforge.net<mailto:user2684@users.sourceforge.net<mailto:user2684@users.sourceforge.net<mailto:user2684@users.sourceforge.netuser2684@users.sourceforge.netamp#117;amp#115;amp#101;amp#114;amp#50;amp#54;amp#56;amp#52;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#111;amp#117;amp#114;amp#99;amp#101;amp#102;amp#111;amp#114;amp#103;amp#101;amp#46;amp#110;amp#101;amp#116; wrote:
Hey there, I've spent a good amount of hours trying to find out the changes applied in the code referenced by ticket #44 (backup, external drives, NAS, etc.) without success. I'm afraid the code was in an old laptop I don't have anymore and for some unknown reasons I did not push it to the repo here (I guess because was still work in progress and then the activity on that ticket stopped). Again shame on me. But I spent some time trying to remeber the changes. Again I don't think it is fully related to this issue but could be worth applying them anyway.
For sure on https://sourceforge.net/p/x-control/code/ci/master/tree/fms_fp.cpp#l170 I've increased that buffer from 80 to 1024, both tmp_name and tmp_full_name. Then in https://sourceforge.net/p/x-control/code/ci/master/tree/fms.cpp#l308 I remember to have changed the line in something like
if (changed && a_current_entry_index != -1 && (a_fp_ref->a_fp[a_current_entry_index]->a_time_actual != -1)) { }
to avoid a_current_entry_index initialized to -1 could become an issue when used as an array index.
I don't remember other changes.
I also wanted to reproduce the issue in the same way you described it but I definitely have issue with XP11 in terms of resources for running it. I'll try to find out an alternative and help you out as much as I can.
Thanks
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/https://sourceforge.net/p/x-control/tickets/47/https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Wed Jan 16, 2019 08:44 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.nethttp://sourceforge.nethttp://sourceforge.nethttp://sourceforge.net/http://sourceforge.nethttp://sourceforge.net/ because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Sun Jan 20, 2019 05:05 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.nethttp://sourceforge.nethttp://sourceforge.nethttp://sourceforge.net/ because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Sun Jan 20, 2019 05:05 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.nethttp://sourceforge.net because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Tickets: #47
Here is what I came up with that works
void in_t::handle_pagecycle(int button)
{
}
This kept everything working until takeoff… as soon as it started to say to me “Reporting takeoff” it crashed again… this is the crash condition that was previously reported in the thread where we started conversing..
All the other issues (crash on startup, crash on FP change; both fixed by extending the buffer size) and the crash on using the page buttons (fixed by the code change above) seem to be solved.
On Jan 24, 2019, at 11:42 PM, David Toth dtoth12@users.sourceforge.netamp#100;amp#116;amp#111;amp#116;amp#104;amp#49;amp#50;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#111;amp#117;amp#114;amp#99;amp#101;amp#102;amp#111;amp#114;amp#103;amp#101;amp#46;amp#110;amp#101;amp#116; wrote:
Another update…
I check the size of the a_pages_button after it built and it says there are three elements in the set, however, the ++b_it; is still crashing.
If I replace the ++b_it; with an explicit load of the first element of the set, "b_it = a_pages_button.begin();” then I can press the buttons and the first page associated with each button set displays on the throttle screen…
On Jan 24, 2019, at 10:51 PM, David Toth dtoth12@users.sourceforge.net<mailto:dtoth12@users.sourceforge.netdtoth12@users.sourceforge.netamp#100;amp#116;amp#111;amp#116;amp#104;amp#49;amp#50;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#111;amp#117;amp#114;amp#99;amp#101;amp#102;amp#111;amp#114;amp#103;amp#101;amp#46;amp#110;amp#101;amp#116; wrote:
[2019-01-24 22:10:35] [verbose] in: handling page change from button 1
[2019-01-24 22:10:35] [debug] in: setting current page {welcome} as inactive
[2019-01-24 22:10:35] [debug] in: current page {welcome} now inactive
[2019-01-24 22:10:35] [debug] in: iterating pages for current button
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: inserting page
[2019-01-24 22:10:35] [debug] in: inserted page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: inserting page
[2019-01-24 22:10:35] [debug] in: inserted page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: inserting page
[2019-01-24 22:10:35] [debug] in: inserted page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: iteratimg page
[2019-01-24 22:10:35] [debug] in: done iterating pages for current button
[2019-01-24 22:10:35] [debug] in: back from a_pages_button.find
[2019-01-24 22:10:35] [debug] in: the data page requested does not belong to a different button
{crash happens here}
I added a bunch of debug output in the vicinity of line80 of in.cpp…
if (b_it == a_pages.end()) {
debug_out(debug,"in: the data page requested belongs to a different button");
b_it = a_pages_button.begin(); // currentpage is belonging to a different button, show the first item
}
else {
debug_out(debug,"in: the data page requested does not belong to a different button”); <<<< This is the last line executed
++b_it;
debug_out(debug,"in: ++b_it completed”); <<<<<<<<< This does not log
}
if (b_it == a_pages_button.end()) {
debug_out(debug,"in: no more data pages to show for the current button, reverting to the first one");
b_it = a_pages_button.begin();
}
debug_out(debug,"in: changing current page and setting active");
I’m having problems following the logic here…
You get a handle_pagecycle event, with the button that was pressed (say button 1)
it makes the “Welcome” page inactive
it then cycles through something using an iterator (it), is this a collection of mfd_page?
std::set<mfdpage_t*> a_pages_button; // temp set with only the pages belonging to the current button</mfdpage_t*>
debug_out(debug,"in: iterating pages for current button");
for (set<mfdpage_t*>::iterator it = a_pages.begin(); it != a_pages.end(); ++it) // cycle through all the pages</mfdpage_t*>
{
debug_out(debug,"in: iteratimg page");
if ((*it)->a_button == button) {
}
}
debug_out(debug,"in: done iterating pages for current button");
This part works, there are multiple log entries of “inserting page” / “inserted page” and a log of the “done iterating” message
Now it sets up another iterator b_it, and sets it to a_pages_button.find(a_currentpage). This statement works because the “back from a_pages_button.find” is logged
set<mfdpage_t*>::iterator b_it = a_pages_button.find(a_currentpage); // find the current page in the current button set</mfdpage_t*>
debug_out(debug,"in: back from a_pages_button.find");
if (b_it == a_pages.end()) {
debug_out(debug,"in: the data page requested belongs to a different button");
b_it = a_pages_button.begin(); // currentpage is belonging to a different button, show the first item
}
Nothing in the above if creates any log output, so b_it isn’t invalid and b_it is not a_pages.end(), so the ELSE gets executed. In your original code the else is just ++b_it; I added the debug output. The first line of debug output prints to the xlog.txt; however, the second debug output in this code block does NOT print, which would indicate that the ++b_it; statement is what is throwing the exception.
else {
debug_out(debug,"in: the data page requested does not belong to a different button");
++b_it;
debug_out(debug,"in: ++b_it completed");
}
I haven’t been able to figure out what it is that your iterating through here, and why incrementing the iterator would throw an exception.
The log contains entries that would seem to indicate that the mfd page objects are there and are valid
[2019-01-24 22:10:32] [all] mfdpage: page welcome (1) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] mfdpage: page fms.scheduler (0) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] mfdpage: page fms.planner (0) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] mfdpage: page time (0) received the updated 'sim/time/zulu_time_sec': 49591 [2019-01-24 22:10:32] [all] data: 'sim/flightmodel/position/groundspeed' type 2 reported new data (6.23921e-07) [2019-01-24 22:10:32] [all] mfdpage: page flight.high (0) received the updated 'sim/flightmodel/position/groundspeed': 6.23921e-07 [2019-01-24 22:10:32] [all] mfdpage: page fms.refresh (0) received the updated 'sim/flightmodel/position/groundspeed': 6.23921e-07
presumably if there was an issue with the mfd pages, these updates to time, fms.scheduler and fms.planner would have thrown a fault earlier, but it seems to have no issue with these. There are multiple occurrences in the log of these MFD pages receiving updates.
Also, since the earlier for loop using the “it” iterator runs fine, which would again seem to indicate that the collection of mfdpages is healthy.
Where I lose the logic here is why the code increments b_it.
If I’m on the welcome screen, and this is the FIRST time I’m pressing button 2 to access the second page group, then I would expect to be given the first page in that group. From the way this code looks, it seems to me like I’m never going to get the first page, unless I cycle through every page in the group so that it hits
if (b_it == a_pages_button.end()) {
debug_out(debug,"in: no more data pages to show for the current button, reverting to the first one");
b_it = a_pages_button.begin();
to loop me back around.
It would seem like some logic is necessary here to make sure that the first press of a button for a group always returns a_pages_button.begin()
I’m not sure how to inspect what b_it is pointing at coming back from the a_pages_button.find(a_currentpage), the only thing that seems evident is that it is NOT the value a_pages.end().
Are we looking at the possibility that b_it might be invalid (i.e. null) because this button set was never used before this time and that’s why the ++b_it is throwing exception?
On Jan 24, 2019, at 5:35 PM, David Toth dtoth12@users.sourceforge.netdtoth12@users.sourceforge.netdtoth12@users.sourceforge.net<mailto:dtoth12@users.sourceforge.net<mailto:dtoth12@users.sourceforge.net<mailto:dtoth12@users.sourceforge.netdtoth12@users.sourceforge.netamp#100;amp#116;amp#111;amp#116;amp#104;amp#49;amp#50;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#111;amp#117;amp#114;amp#99;amp#101;amp#102;amp#111;amp#114;amp#103;amp#101;amp#46;amp#110;amp#101;amp#116; wrote:
OK… so I’ve gone through the code and increased the buffer sizes. The plugin no longer crashes on load and it doesn’t crash when the FP is edited.
However, when the button is pressed corresponding to cycle FMS page 1 or something like that, I still get a crash…
the last entry in the log is something about clearing the welcome screen. I’ve just recompiled the plugin with the debug flag set so hopefully I’ll get a dump with an actual line number and module instead of the general crash error
On Jan 20, 2019, at 12:05 PM, user2684 user2684@users.sourceforge.netuser2684@users.sourceforge.netuser2684@users.sourceforge.netuser2684@users.sourceforge.netuser2684@users.sourceforge.netuser2684@users.sourceforge.netuser2684@users.sourceforge.net<mailto:user2684@users.sourceforge.net<mailto:user2684@users.sourceforge.net<mailto:user2684@users.sourceforge.net<mailto:user2684@users.sourceforge.net<mailto:user2684@users.sourceforge.net<mailto:user2684@users.sourceforge.net<mailto:user2684@users.sourceforge.netuser2684@users.sourceforge.netamp#117;amp#115;amp#101;amp#114;amp#50;amp#54;amp#56;amp#52;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#111;amp#117;amp#114;amp#99;amp#101;amp#102;amp#111;amp#114;amp#103;amp#101;amp#46;amp#110;amp#101;amp#116; wrote:
Hey there, I've spent a good amount of hours trying to find out the changes applied in the code referenced by ticket #44 (backup, external drives, NAS, etc.) without success. I'm afraid the code was in an old laptop I don't have anymore and for some unknown reasons I did not push it to the repo here (I guess because was still work in progress and then the activity on that ticket stopped). Again shame on me. But I spent some time trying to remeber the changes. Again I don't think it is fully related to this issue but could be worth applying them anyway.
For sure on https://sourceforge.net/p/x-control/code/ci/master/tree/fms_fp.cpp#l170 I've increased that buffer from 80 to 1024, both tmp_name and tmp_full_name. Then in https://sourceforge.net/p/x-control/code/ci/master/tree/fms.cpp#l308 I remember to have changed the line in something like
if (changed && a_current_entry_index != -1 && (a_fp_ref->a_fp[a_current_entry_index]->a_time_actual != -1)) { }
to avoid a_current_entry_index initialized to -1 could become an issue when used as an array index.
I don't remember other changes.
I also wanted to reproduce the issue in the same way you described it but I definitely have issue with XP11 in terms of resources for running it. I'll try to find out an alternative and help you out as much as I can.
Thanks
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/https://sourceforge.net/p/x-control/tickets/47/https://sourceforge.net/p/x-control/tickets/47/https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Wed Jan 16, 2019 08:44 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.nethttp://sourceforge.nethttp://sourceforge.nethttp://sourceforge.net/http://sourceforge.nethttp://sourceforge.net/http://sourceforge.nethttp://sourceforge.net/ because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/https://sourceforge.net/p/x-control/tickets/47/https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Sun Jan 20, 2019 05:05 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.nethttp://sourceforge.nethttp://sourceforge.nethttp://sourceforge.net/http://sourceforge.nethttp://sourceforge.net/ because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Sun Jan 20, 2019 05:05 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.nethttp://sourceforge.nethttp://sourceforge.nethttp://sourceforge.net/ because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
[tickets:#47]https://sourceforge.net/p/x-control/tickets/47/ XP 11 crash on entry of waypoint in FMS, or on startup if flight plan exists in FMS from previous XP session
Status: unread
Affected Version: v1.0.1
Queue: staging
Created: Fri Jan 11, 2019 09:02 AM UTC by David Toth
Last Updated: Sun Jan 20, 2019 05:05 PM UTC
Owner: nobody
Attachments:
I can get this to crash just sitting on the ground on my Mac. I saw you addresses a similar problem with people crashing on takeoff and released updates win32 and win64 modules (which I can't test to see if that also fixes this)
a. Startup at an airport, say KBOS
b. Click the FPL button to open the flight plan, it will have KBOS in the first slot of the flight plan automatically
c. Use the dial to select the blank flight plan item below KBOS, it will show ____
d. Use the dial to select any fix, say BOSOX. After you complete entry of BOSOX and press enter, the bottom of the FPL entry screens says "Press ENT to Accept"
e. Press ENT key; X-Plane crashes with a stack overflow error
I've got logging set to 2... Here's the last log lines if you start with an empty flight plan and then add a waypoint to it, which is the cleanest way to reproduce the crash.
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 0 with name BOSOX (PICHE (WICHITA) NDB) type 2048 lat 42.201885 lon -71.627678 alt 0
[2019-01-11 03:03:44] [verbose] fms_fp: creating FP item 1 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 20
If you create the flight plan with X-Control not running, in this example KBOS to KHVN with two waypoints in the FPL, so "KBOS > BOSOX > HFD > KHVN" and then exit XP, copy X-Control back to the plugin folder, then launch XP again... as soon as it should display the cockpit it crashes. These are the last lines of the log file
[2019-01-11 03:03:27] [debug] fms_fuel: the aircraft has 1 engines
[2019-01-11 03:03:27] [debug] fms_fuel: fuel to load 4933.632324 lb (ground: 550.000000, climb/desc: 1000.000000, cruise: 383.632233, contigency: 3000.000000)
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:27] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (time)
[2019-01-11 03:03:27] [verbose] mfdpage: updating time 08:57 - 2019/1/11
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (led)
[2019-01-11 03:03:27] [debug] mfdpage: refreshing joystick display (welcome)
[2019-01-11 03:03:27] [debug] out_saitek: printing line 0: ' WELCOME '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 1: ' Press any key '
[2019-01-11 03:03:27] [debug] out_saitek: printing line 2: ' to start '
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 0 with name KBOS (PICHE (WICHITA) NDB) type 1 lat 42.362946 lon -71.006386 alt 20
[2019-01-11 03:03:33] [verbose] fms_fp: creating FP item 3 with name KHVN (PICHE (WICHITA) NDB) type 1 lat 41.263748 lon -72.886803 alt 14
[2019-01-11 03:03:35] [verbose] fms_fp: creating FP item 0 with name (General Edward Lawrence Logan International) type 1 lat 42.362946 lon -71.006386 alt 0
The full xlog.txt is attached
Sent from sourceforge.nethttp://sourceforge.net because you indicated interest in https://sourceforge.net/p/x-control/tickets/47/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Tickets: #47
Hi, thanks, amazed of the progresses you've done, apologize for not being very useful...glad increasing the buffer size solved one of the issues. Regarding the mfd pages, that one sounds really strange to me since never had an issue with the logic there and should not be API dependent but good to see you found a solution for that too. Regarding the crash at take off, this was due to https://sourceforge.net/p/x-control/code/ci/master/tree/fms.cpp#l308 last time and the negative a_current_entry_index. What happens at take off is switching a_flight_status to "cruise" and then the code at fms_t::check_position is run for the first time and I've noticed depending on XP and API version there could be different behaviors. I'd suggest adding debug code in the first few lines of that function to check what is causing the expection.
Thanks!