1
0
Fork 0
flightgear/src/AIModel
Florent Rougon eefa9a75f9 Fix crash in AI code when buggy groundnet declares pushback hold point on runway
Some buggy *.groundnet.xml files (as KSEA currently on TS) define the
pushback hold point for some parking positions as a node on a runway.
In this case, this the pushback hold point for parking
'North_Cargo_Ramp', defined as node 5344 in
Airports/K/S/E/KSEA.groundnet.xml, which is defined twice (second error),
first as:

<node index="5344" lat="N47 27.774559" lon="W122 18.465257" isOnRunway="1" holdPointType="PushBack"  />

and then as:

<node index="5344" lat="N47 27.725747" lon="W122 18.159649" isOnRunway="1" holdPointType="PushBack"  />

(due to code in flightgear/src/Airports/dynamicloader.cxx, it should be
the second one that wins, which is not on a runway but on apron in the
north cargo area)

As a consequence, when this gate is selected for an AI aircraft, the
pushback route has only one node (since the pushback hold point is then
the closest point to itself supposedly on runway!), and the
corresponding FGTaxiRoute instance has an empty 'routes' member
variable, which FGTaxiRoute::next() doesn't handle gracefully
(segfault).

It may be that an additional check/change could be desirable in
FGTaxiRoute::next() in such a case (one node and obviously no route in
the FGTaxiRoute instance), however I'm not sure how Durk wants this case
to be handled, since FGTaxiRoute::next() seems to iterate on nodes.

This fixes the bug reported at:

  https://forum.flightgear.org/viewtopic.php?p=308397#p308397 and
  https://sourceforge.net/p/flightgear/mailman/message/35776552/

Thanks to yanfiz and wkitty42 for the report, and to gooneybird for
inspecting the groundnet file.
2017-04-14 12:25:00 +02:00
..
AIAircraft.cxx Alternative terrain engine based on pagedLOD 2017-02-26 10:17:15 -05:00
AIAircraft.hxx Remove dt member of AIAircraft 2016-01-05 23:19:28 -06:00
AIBallistic.cxx ATC/Traffic doesn’t crash reset. 2015-12-11 12:11:59 -06:00
AIBallistic.hxx submodel: Fix -Wreorder warnings 2015-05-29 14:28:04 +02:00
AIBase.cxx replace many auto_ptr by unique_ptr 2016-11-14 22:20:46 +01:00
AIBase.hxx ATC/Traffic doesn’t crash reset. 2015-12-11 12:11:59 -06:00
AICarrier.cxx ATC/Traffic doesn’t crash reset. 2015-12-11 12:11:59 -06:00
AICarrier.hxx Fix some warnings identified by Clang 2013-11-16 09:41:33 +00:00
AIEscort.cxx Rename Viewer/viewer.cxx to view 2016-02-17 21:25:39 +00:00
AIEscort.hxx Fix unused private vars. 2013-07-04 20:24:56 +01:00
AIFlightPlan.cxx Work with new SGPath API. 2016-06-22 17:36:05 +01:00
AIFlightPlan.hxx Checkpoint - ground-net skips the cache 2015-12-01 14:01:32 +00:00
AIFlightPlanCreate.cxx Fix crash in AI code when buggy groundnet declares pushback hold point on runway 2017-04-14 12:25:00 +02:00
AIFlightPlanCreateCruise.cxx ATC/Traffic doesn’t crash reset. 2015-12-11 12:11:59 -06:00
AIFlightPlanCreatePushBack.cxx Enforce separation of ground-net and dynamics. 2016-11-13 14:05:20 +00:00
AIGroundVehicle.cxx Rename Viewer/viewer.cxx to view 2016-02-17 21:25:39 +00:00
AIGroundVehicle.hxx Portability: Fix compile errors on MSVC (cmath) 2015-03-24 11:11:42 -05:00
AIManager.cxx Fix crash disabling AI traffic at runtime. 2016-10-20 22:52:27 +01:00
AIManager.hxx ATC/Traffic doesn’t crash reset. 2015-12-11 12:11:59 -06:00
AIMultiplayer.cxx AI Multiplayer interpolation. 2017-02-16 20:53:44 +01:00
AIMultiplayer.hxx Basic MP patch, to allow lag compensation and get rid of rubber band effect. 2015-06-06 06:41:03 +02:00
AIShip.cxx ATC/Traffic doesn’t crash reset. 2015-12-11 12:11:59 -06:00
AIShip.hxx std:: namespace fixes, AIBase cleanup. 2013-03-28 16:49:52 +00:00
AIStatic.cxx Portability: Fix compile errors on MSVC (cmath) 2015-03-24 11:11:42 -05:00
AIStatic.hxx - remove the SG_GLxxxx_H #defines, since OSG provides its own versions 2008-07-27 16:25:13 +00:00
AIStorm.cxx Portability: Fix compile errors on MSVC (cmath) 2015-03-24 11:11:42 -05:00
AIStorm.hxx - remove the SG_GLxxxx_H #defines, since OSG provides its own versions 2008-07-27 16:25:13 +00:00
AITanker.cxx std:: namespace fixes, AIBase cleanup. 2013-03-28 16:49:52 +00:00
AITanker.hxx std:: namespace fixes, AIBase cleanup. 2013-03-28 16:49:52 +00:00
AIThermal.cxx Portability: Fix compile errors on MSVC (cmath) 2015-03-24 11:11:42 -05:00
AIThermal.hxx Use tiedPropertyLists instead of manually matched tie/untie calls. 2012-03-04 15:30:08 +01:00
AIWingman.cxx ATC/Traffic doesn’t crash reset. 2015-12-11 12:11:59 -06:00
AIWingman.hxx Remove redundant inclusion of math/SGMath.hxx 2012-05-05 11:20:04 +02:00
CMakeLists.txt CMake header support for XCode/Visual Studio 2011-07-19 07:58:03 +01:00
performancedata.cxx Overhaul the ground-net / parking code. 2012-11-08 09:07:05 +00:00
performancedata.hxx Overhaul the ground-net / parking code. 2012-11-08 09:07:05 +00:00
performancedb.cxx Work with new SGPath API. 2016-06-22 17:36:05 +01:00
performancedb.hxx Make PerformanceDB a real subsystem 2015-12-19 00:29:00 -08:00
submodel.cxx Build- and run-time concept of developer mode. 2017-02-27 23:37:59 +00:00
submodel.hxx submodel: Support <offsets> with <x-m>, <y-m>, and <z-m> 2015-05-28 10:43:06 +02:00