------------------------------------------------------------------------
r1466 | eudoxos | 2008-08-12 19:45:31 +0200 (wto, 12 sie 2008) | 2 lines
Changed paths:
M /trunk/core/Omega.cpp
Fix another crash - rendering interaction that were, meanwhile, deleted during
simulation being loaded. A more proper solution (like having a mutex on the
whole rootBody that would be locked during loading) is welcome.
------------------------------------------------------------------------
Index: core/Omega.cpp
===================================================================
--- core/Omega.cpp (revision 1465)
+++ core/Omega.cpp (revision 1466)
@@ -229,6 +229,10 @@
// FIXME: should stop running simulation!!
LOG_INFO("Loading file " + simulationFileName);
+
+ // FIXME: stop rendering during loading - may lead to crash
+ boost::mutex::scoped_lock
lock1(rootBody->transientInteractions->drawloopmutex);
+ boost::mutex::scoped_lock
lock2(rootBody->persistentInteractions->drawloopmutex);
if(algorithm::ends_with(simulationFileName,".xml") ||
algorithm::ends_with(simulationFileName,".xml.gz") ||
algorithm::ends_with(simulationFileName,".xml.bz2")){
resetRootBody();
_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help : https://help.launchpad.net/ListHelp