Using F10-Autopilot-Route Manager menu, I'm loading an xml file ( 'FGLevD I thought ) that doesn't have a <version> tag. FlightPlan.cxx # 1083 sets a default of '1' so loadVersion1XMLRoute throws an abort somewhere.
Changing the default fro getIntValue #1083: </version>
int version = routeData->getIntValue("version", -1);
avoids the SIGABRT and logs correctly:
6.5.85 [ALRT]:navaid Failed to load flight-plan ''. unsupported XML route version
PS, How does RM know when to load Level3 data ? I'm running an autogenerator for AI/RM/KML/L3
formats. How do I tell RM to load L3 files ? Tks
Can you attach the failing plan and I'll add test case? Or add a test case yourself, to test_flightPlan.cxx: you can inline XML using a C++11 'raw string literal', there's already other tests in there which log weird/bogus XML onm purpose.
If it's a rougth manager vs FLightPlan code, dpo it in test_routeManager.cxx, but I suspect it's FlightPlan.cxx.
I will look to adding a testcase. Of course, my fix above isn't any help, the default '1' is to
allow for testcases pre V2 that didn't do versions.
Yep any plan with a missing version is assumed to be v1, that's the way I setup compatability. Maybe not the smartest soltuion, but, well, here we are.
@lightwork Do you have the failing fgfp (or a backtrace for the crash)?
Sry for delay, emails getting snarfed. Be aware I was trying to do unusual things, scanning FAA data and auto-creating RM files from FAA SID/STAR fragments. As such I don't know if I ran afoul of RM's need to append starting runway etc. I need to re-visit this issue and see if I can see what the precise cause is.
Okay, the loading code is not /that/ robust sinc eit mostly sees XML it produced itself, but I'm very happy to make it more robust.
@legobyvdlp I'll get back to this issue and refine the failing plan; meantime here:
[(http://www.bitwisetech.com/fgfs/fpln/KALN)]
the file: KALN-levld.xml will. if loaded into F10-Autopilot-RouteManager will crash fgfs ( I just loaded 2020.3.2 zip files and I'm using that built RelWithDebinfo . I know it's not fair, there are multiple procedures in that file ( I'm in the process of creating separate files a la KMLS folder etc ) . Probably the other locations fail as well, I will refine the test.
I've included xmly.py / aXmly script in case ... the app 'gpxsee' together with the KML files generated from FAA data are a great combo for ATC / Route planning.
PS KSTL/KSTL-ld-B.xml is short and will crash fgfs, running debug:
Last edit: Huntley Palmer 2020-11-05
Good catch on the crash, fix coming up.
This may relate, a modified version of Constance' 707 AP intended for VC10 causes an instant crash, with debug build and ddd showing no stack trace available: the program simply exits ( inferior thread exit 01 something something)
I've done a binary cop down of the xml, attached. For me, removong lines :]
<type>noise-spike</type>
<max-rate-of-change>0.8</max-rate-of-change>
allows the xml to load OK , replacing them causes the crash. However ( mustn't voice frustration here ) sometimes merely removing and replacing the comments sometimes makes the crash come and go.
I never got the hang of tabs on a card punch so all my tabs are spaces, maybe not in the original parts.
PS Put the AP file in the beech or something, waiting for the 707 to do full startup every time you remove a line from an xml file is a bit, erm what's the word ?
Best !
.
FlightPlans and AutoPilots are unrelated code, better make a seperate ticket for that issue.
Hmm I guessed they both used EasyXML
They do both use EasyXML, but everything in the entire simulator uses easyXML; that's almost certainly not where the problem lies. (Of course, never say never, but, I would be reasonably confident)