1
0
Fork 0
flightgear/src/AIModel
ThorstenB 246feef85f : MP-model-loading related segfault
MP aircraft are loaded by a separate OSG thread (introduced after FG2.4.0).
The OSG thread also calls the "modelLoaded" callback. However, we mustn't
allow the OSG thread to call FGNasalModelData::modelLoaded directly:
FGNasalModelData isn't thread-safe. There are obvious issues (_callCount++;),
tricky issues like calling the Nasal _parser_ or creating hashes and
modifying the global Nasal namespace. It doesn't use locks to protect
against another thread executing a Nasal context or running garbage
collection. It also executes Nasal code itself (the model's "load" hook),
which we also cannot allow in a separate thread...
This patch returns all Nasal parts of MP-aircraft loading (parsing,
module creation, execution) to the main thread, while keeping the
multi-threaded OSG part (loading of MP-aircraft model files itself).
The same issue exists with scenery models (see other commit).

To summarize with 2 words: It s*cks... ;-)
2012-01-08 13:28:49 +01:00
..
AIAircraft.cxx Some warning fixes, mostly unused variables 2011-12-25 14:41:47 +01:00
AIAircraft.hxx Several Bugfixes: 2011-10-09 00:25:04 +02:00
AIBallistic.cxx Some warning fixes, mostly unused variables 2011-12-25 14:41:47 +01:00
AIBallistic.hxx : Fix disappearing AIShips. 2011-12-09 17:06:19 +01:00
AIBase.cxx : MP-model-loading related segfault 2012-01-08 13:28:49 +01:00
AIBase.hxx : MP-model-loading related segfault 2012-01-08 13:28:49 +01:00
AICarrier.cxx Use more specific log classes. 2011-10-11 21:55:50 +02:00
AICarrier.hxx Fix an uninitialized value valgrind warning. 2010-05-29 16:31:05 +02:00
AIEscort.cxx : Fix disappearing AIShips. 2011-12-09 17:06:19 +01:00
AIEscort.hxx : Fix disappearing AIShips. 2011-12-09 17:06:19 +01:00
AIFlightPlan.cxx Bugfixes and some finetuning: 2012-01-02 22:23:24 +01:00
AIFlightPlan.hxx Fix a problem in AITraffic where waypoint iterator is trashed by push_back. A cleaner solution would be to use indices instead of iterators to track position in the waypoint vector 2011-10-22 10:15:16 +02:00
AIFlightPlanCreate.cxx Bugfixes and some finetuning: 2012-01-02 22:23:24 +01:00
AIFlightPlanCreateCruise.cxx AITraffic fix - forgot two files 2011-10-22 10:31:38 +02:00
AIFlightPlanCreatePushBack.cxx Bugfixes and some finetuning: 2012-01-02 22:23:24 +01:00
AIGroundVehicle.cxx : Fix disappearing AIShips. 2011-12-09 17:06:19 +01:00
AIGroundVehicle.hxx : Fix disappearing AIShips. 2011-12-09 17:06:19 +01:00
AIManager.cxx Add --log-class option, improve logging classes. 2011-12-11 14:06:17 +01:00
AIManager.hxx Add --log-class option, improve logging classes. 2011-12-11 14:06:17 +01:00
AIMultiplayer.cxx Use more specific log classes. 2011-10-11 21:55:50 +02:00
AIMultiplayer.hxx Expose vertical speed for MP planes 2011-02-25 21:12:35 +01:00
AIShip.cxx Fix some compiler warnings. 2012-01-02 23:16:17 +01:00
AIShip.hxx : Fix disappearing AIShips. 2011-12-09 17:06:19 +01:00
AIStatic.cxx , : Fix/work-around for AI traffic issues 2011-06-25 20:44:44 +02: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 , : Fix/work-around for AI traffic issues 2011-06-25 20:44:44 +02: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 Add <name> tag so that AIWingman or other suitable AI Object can be attached. 2010-09-17 21:44:58 +02:00
AITanker.hxx Consistency fix 2007-06-16 15:57:42 +00:00
AIThermal.cxx , : Fix/work-around for AI traffic issues 2011-06-25 20:44:44 +02:00
AIThermal.hxx Implementation of ridge lift from Patrice Poly based on an algorithm of Ian Forster-Lewis 2009-05-02 00:44:20 +02:00
AIWingman.cxx : Fix disappearing AIShips. 2011-12-09 17:06:19 +01:00
AIWingman.hxx : Fix disappearing AIShips. 2011-12-09 17:06:19 +01:00
CMakeLists.txt CMake header support for XCode/Visual Studio 2011-07-19 07:58:03 +01:00
performancedata.cxx Enable the AI pilot to hit the breaks hard when necessary. 2011-11-12 18:42:59 +01:00
performancedata.hxx Enable the AI pilot to hit the breaks hard when necessary. 2011-11-12 18:42:59 +01:00
performancedb.cxx Add --log-class option, improve logging classes. 2011-12-11 14:06:17 +01:00
performancedb.hxx Removed hardcoded performance data. 2009-05-18 12:24:15 +02:00
submodel.cxx Add --log-class option, improve logging classes. 2011-12-11 14:06:17 +01:00
submodel.hxx Remove persistent references to AI mananger and its objects from the submodel-manager. 2010-10-28 15:10:37 +01:00