Josh has reported this multiple times to the mailing list, nobody seems to know what is going on.
I'm going to post the contents of the various emails.
Hi guys,
I found a problem that I've seen off and on for a while.
Nasal runtime error: flightplan.insertWaypoints expects vector as first arg
at C:/FlightGear 2018.3.2/data/Nasal/route_manager.nas, line 40
Nasal runtime error: function/method call on uncallable object
at C:/FlightGear 2018.3.2/data/Nasal/canvas/MapStructure.nas, line 38
called from: C:/FlightGear 2018.3.2/data/Nasal/canvas/MapStructure.nas, line 440
called from: C:/FlightGear 2018.3.2/data/Nasal/canvas/MapStructure.nas, line 884
called from: C:/FlightGear 2018.3.2/data/Nasal/canvas/MapStructure.nas, line 1077
called from: C:/FlightGear 2018.3.2/data/Nasal/canvas/MapStructure.nas, line 1104
called from: C:/FlightGear 2018.3.2/data/Nasal/geo.nas, line 386
called from: C:/FlightGear 2018.3.2/data/Nasal/canvas/MapStructure.nas, line 1051
called from: C:/FlightGear 2018.3.2/data/Nasal/canvas/MapStructure.nas, line 1059
called from: C:/FlightGear 2018.3.2/data/Nasal/canvas/api.nas, line 598
called from: C:/FlightGear 2018.3.2/data/Nasal/canvas/map/navdisplay.mfd, line 568
called from: C:/FlightGear 2018.3.2/data/Nasal/canvas/map/navdisplay.mfd, line 252
This happens if you have a runway selected, have a SID in (even if its just DEFAULT), and then change the runway. This causes both the Default Boeing/Airbus Nav Displays (IDG-MD-11X, 777) and the Custom Nav Displays (IDG-A3XX) to stop updating the route itself, but they still move, and all functions still work.
Hi guys
My original error is happening to people left and right.
I FOUND PATTERN:
It can be produced most easily with changing the RW after a STAR and APPROACH are selected in route manager.
This error is destroying several aircraft Nav Display, 777, My Airbus and MD-11, all become difficult because this code broken.
I’m going to D/L a 2019 RC and try it, but I’d appreciate to know if anyone else can find this nasal exact error.
I took a quick look at the first issue.
Nasal runtime error: flightplan.insertWaypoints expects vector as first arg
at C:/FlightGear 2018.3.2/data/Nasal/route_manager.nas, line 40
Appears a scalar value is being passed when a Vector is expected.
for example, it is expecting something like this:
var route = []
append(route, sid.route(me.flightplan.departure_runway))
me.flightplan.insertWaypoints(route, 1);
if sid.route() is expected to return a Vector, then perhaps a nil check is missing.
Dear James which aircraft are you using for test, I will get you exact steps Kind Regards Josh
The 737-800, because it’s what I know best. But happy to try something else.
However, I do suspect it depends on the airport selected - for example at EBBR the Navigraph procedures have different runway names to the ones in our apt.dat. This causes the STAR code to fail to build a route correctly, and hence return an empty set of waypoints, which causes the errors you mentioned.
I’m still confirming this, but I suspect the fix will be to handle these cases more gracefully 0 for examnple if a STAR is selected but we can’t find the transition to a runway, just insert a VECTORS element.
Kind regards,
James
Dear James,
I am really loosing myself in frustration over this. I cannot reproduce it! It only happens when I’m not trying to produce it. It never really happens when on ground.
Please try the following
Have a STAR set, and runway
Be on the star, heading to a waypoint on the star that is not the first.
Try to change the runway select immediately (preferably at a place where the star set is not used
See if the error occurs
Regardless, this is a serious problem that must be fixed.
The failing code block is this:
with error: function/method call on uncallable object
var try_aux_method = func(obj, method_name) {
var name = "<test%"~id(caller(0)[0])~">";
call(compile("obj."~method_name~"()", name), nil, var err=[]); # try...
#debug.dump(err);
if (size(err)) # ... and either leave caght or rethrow
if (err[1] != name)
die(err[0]);
}
called as such:
try_aux_method(me.model, "del");
That would make sense. Deletion has to occur when they are changed.
I am still working on getting a reliable reproduce. *I suggest using the 777 to test, as it uses a bone-generic Canvas Display without any changes*
Would anyone who is knowledgable about what changed MapStructure/Route Manager wise between 2018.2 and 2018.3 chime in? Something happened that broke it, as the error never occurred before 2018.3
1. Load FlightGear, create a route with a SID.
For instance, I chose LFLL - LIRA, selected a LIRA approach, and loaded the DEFAULT SID for 36L
2. Activate the route manager, select first waypoint
I do not know if activating the manager or selecting the first waypoint is needed but I typically do that anyway.
3. Change the runway
I selected 18R - the DEFAULT waypoints disappeared, and I got the error
var makedie = func(prefix) func(msg) globals.die(prefix~" "~msg);
called from
var __die = makedie("MapStructure");
called from die(err[0]);
So, die() is working perfectly and generating an error message as its supposed to.
On line 1105:
__die("model not found")
So - if the first error is not an error at all, then the second error means the try_aux_method is failing because of a function / method call on an uncallable object.
And the question remains as to why it can't find the model at all in the first place?
Can anyone see the problem?
To be very clear,
This issue is breaking every Mapstructure-using aircraft since 2018.3 - it is extremely serious!
Once IDG removes MapStructure to build our own navigation display without MapStructure as we have planned to do, this issue will no longer affect IDG aircraft.