yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #01491
Re: yade crash launching xml
> yade-trunk: /usr/include/boost/shared_ptr.hpp :315 : T*
> boost::shared_ptr<T>::operator->() const [with T = Engine]: L'assertion
> « px != 0 » a échoué.
[...]
> #6 <signal handler called>
[...]
> #10 0xb711410e in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
> #11 0x081737b4 in boost::shared_ptr<Engine>::operator-> (this=0x8a56650)
> at /usr/include/boost/shared_ptr.hpp:315
> #12 0x081a430e in Omega::containTimeStepper (this=0x825f350) at
> core/Omega.cpp:291
> #13 0xb1a7cee2 in SimulationController::doUpdate (this=0x8398be0) at
> gui/qt3/SimulationController.cpp:504
Oh, obviously SimulationController (#13) is trying to find out if we are
using time stepper (asks Omega, #12), but dereference zero (assertion
"px!=0") shared_ptr (#11, called at Omega.cpp:291). Apparently, since
the other thread is just reading the .xml file, the engine is not
constructed yet, just the empty vector of (empty) shared_ptr<Engine>. I
added a check for that in Omega. Will be in the next commit in a few
moments, try it out.
Thanks for spotting that. Yade should never crash when you do normal
things.
As workaround, do not open the controller until the .xml file will have
been fully loaded.
I filed https://bugs.launchpad.net/yade/+bug/399810, please close it if
it no longer happens.
Best, Vaclav
References