|
From: Tobias D. <tda...@gm...> - 2018-06-28 06:07:01
|
> Ah ok - so hold_by is just a proxy for calling hold_is_distance or
> hold_is_time?
>
> In which case I’d rather people use the methods which return bool -
> since StringAreEvilAndCauseMallocs(TM)
Hmm, yes, ofc. These props are lazy, so if you don't demand them they
won't malloc(), so it's not as bad as it may sound (if you only ever
need them for logic, you should use the boolean ones, and if you need a
string rendering for display purposes, malloc() is unavoidable anyway).
But I'm not super set on having it.
> BTW, I’d like to try and fix the crash tonight, but I’m lacking a
> suitable data file to trigger it - can you share a procedure file (off
> list if necessary) I can test against, and some steps to follow with
> the UFO? Or do I need to use the CRJ?
UFO should be fine; I haven't tested it, but AFAIK there is nothing
special wrt the route manager in the CRJ, so any a/c should expose the
same problem.
A digest verions of the procedures XML I've been using is this:
<ProceduresDB>
<Airport ICAOcode="EHRD">
<Sid Name="PS and hold" Runways="24">
<Sid_Waypoint ID="1">
<Name>EH159</Name>
<Type>Normal</Type>
<Latitude>51.948056</Latitude>
<Longitude>4.418056</Longitude>
<Flytype>Fly-over</Flytype>
</Sid_Waypoint>
<Sid_Waypoint ID="2">
<Name>PS (ROTTERDAM NDB)</Name>
<Type>Normal</Type>
<Latitude>51.864300</Latitude>
<Longitude>4.210489</Longitude>
<Flytype>Fly-over</Flytype>
</Sid_Waypoint>
<Sid_Waypoint ID="3">
<Name>PS (ROTTERDAM NDB)</Name>
<Type>Hold</Type>
<Latitude>51.864300</Latitude>
<Longitude>4.210489</Longitude>
<Hld_Rad_or_Inbd>Inbd</Hld_Rad_or_Inbd>
<Hld_Rad_value>180</Hld_Rad_value>
<Hld_Turn>Right</Hld_Turn>
<Hld_Time_or_Dist>Time</Hld_Time_or_Dist>
<Hld_td_value>01.0</Hld_td_value>
</Sid_Waypoint>
</Sid>
</Airport>
</ProceduresDB>
To reproduce:
- Put the above XML in
~/.fgfs/TerraSync/Airports/E/H/R/EHRD.procedures.xml
- Spawn at EHRD on rwy 24
- Open the route manager, select departure AP EHRD, rwy 24, SID "PS and
hold"
- Try to add another waypoint after the PS hold, or select a destination
AP
Another bug, btw., is that when you select only the above SID and no
other waypoints, it won't crash, but selecting "Activate" and then "Jump
to" on the PS hold waypoint causes the route manager to deactivate.
Activating again, and then jumping to the hold, works just fine though.
Similarly, just activating the route once and then flying it will
deactivate it as soon as you reach the hold (but activating it again
after it self-deactivates works fine). FG does not crash in these cases
though.
|