yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #02352
Engine crash
Hi, all!
I do not have a large experience in "engine creating" in YADE.
Now I am trying to create a very simple one, which iterates all
interactions and calculates, how many of them are cohesive.
I have created next several strings for that:
InteractionContainer::iterator ii = rootBody->interactions->begin();
InteractionContainer::iterator iiEnd = rootBody->interactions->end();
numberCohesiveContacts=0;
for(; ii!=iiEnd; ++ii ) {
const shared_ptr<Interaction>& interaction = *ii;
RpmPhys* contPhys =
static_cast<RpmPhys*>(interaction->interactionPhysics.get());
if (contPhys->isCohesive==true) {
numberCohesiveContacts++;
}
}
The string with "numberCohesiveContacts++;" calls a crash:
=================================================================================
Thread 6 (Thread 0x7f22da364910 (LWP 5532)):
#0 0x00007f22e77beacd in __libc_waitpid (pid=5537, stat_loc=<value
optimized out>, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:41
#1 0x00007f22e775c1f9 in do_system (line=<value optimized out>) at
../sysdeps/posix/system.c:149
#2 0x00007f22e775c530 in __libc_system (line=<value optimized out>) at
../sysdeps/posix/system.c:190
#3 0x000000000046fd71 in sigHandler (sig=11) at
/home/gladk/dem/yade/currentMono/yade/core/yade.cpp:85
#4 <signal handler called>
#5 0x00007f22dc46452e in CohesiveStateRPMRecorder::action (this=0x4490c50,
rootBody=0xf3d400) at
/home/gladk/dem/yade/currentMono/yade/pkg/dem/Engine/StandAloneEngine/CohesiveStateRPMRecorder.cpp:30
#6 0x0000000000469d42 in MetaBody::moveToNextTimeStep (this=0xf3d400) at
/home/gladk/dem/yade/currentMono/yade/core/MetaBody.cpp:94
#7 0x00007f22d95fb910 in pyOmega::step (this=0x140e890) at
py/yadeWrapper/yadeWrapper.cpp:379
#8 0x00007f22d95fc4c0 in
invoke<boost::python::detail::caller_arity::impl::operator()::result_converter,
void (pyOmega::*)(), boost::python::detail::caller_arity<1u>::impl<F,
Policies, Sig>::operator()(PyObject*, PyObject*) [with F = void
(pyOmega::*)(), Policies = boost::python::default_call_policies, Sig =
boost::mpl::vector2<void, pyOmega&>]::c_t0> (this=0x104d630, args=<value
optimized out>, kw=<value optimized out>) at
/usr/include/boost/python/detail/invoke.hpp:94
#9 boost::python::detail::caller_arity<1u>::impl<void (pyOmega::*)(),
boost::python::default_call_policies, boost::mpl::vector2<void, pyOmega&>
>::operator() (this=0x104d630, args=<value optimized out>, kw=<value
optimized out>) at /usr/include/boost/python/detail/caller.hpp:223
#10
boost::python::objects::caller_py_function_impl<boost::python::detail::caller<void
(pyOmega::*)(), boost::python::default_call_policies,
boost::mpl::vector2<void, pyOmega&> > >::operator() (this=0x104d630,
args=<value optimized out>, kw=<value optimized out>) at
/usr/include/boost/python/object/py_function.hpp:38
#11 0x00007f22e91a7fce in boost::python::objects::function::call(_object*,
_object*) const () from /usr/lib/libboost_python-mt-py26.so.1.38.0
#12 0x00007f22e91a81b8 in ?? () from
/usr/lib/libboost_python-mt-py26.so.1.38.0
#13 0x00000000004a940a in boost::function0<void>::operator() (this=<value
optimized out>) at /usr/include/boost/function/function_template.hpp:989
#14 0x00007f22e91af7b8 in
boost::python::handle_exception_impl(boost::function0<void>) () from
/usr/lib/libboost_python-mt-py26.so.1.38.0
#15 0x00007f22e91a4e2b in ?? () from
/usr/lib/libboost_python-mt-py26.so.1.38.0
#16 0x00007f22ecd92e53 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#17 0x00007f22ece33f97 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#18 0x00007f22ece36975 in PyEval_EvalCodeEx () from
/usr/lib/libpython2.6.so.1.0
#19 0x00007f22ece36a42 in PyEval_EvalCode () from
/usr/lib/libpython2.6.so.1.0
#20 0x00007f22ece56950 in PyRun_FileExFlags () from
/usr/lib/libpython2.6.so.1.0
#21 0x00007f22ece2dde3 in ?? () from /usr/lib/libpython2.6.so.1.0
#22 0x00007f22ece34cf4 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#23 0x00007f22ece36975 in PyEval_EvalCodeEx () from
/usr/lib/libpython2.6.so.1.0
#24 0x00007f22ece36a42 in PyEval_EvalCode () from
/usr/lib/libpython2.6.so.1.0
#25 0x00007f22ece56950 in PyRun_FileExFlags () from
/usr/lib/libpython2.6.so.1.0
#26 0x00007f22ece56b1c in PyRun_SimpleFileExFlags () from
/usr/lib/libpython2.6.so.1.0
#27 0x00007f22dbe0ceab in PythonUI::execScript (script=DWARF-2 expression
error: DW_OP_reg operations must be used either alone or in conjuction with
DW_OP_piece.
) at gui/py/PythonUI.cpp:46
#28 0x00007f22dbe0d9f6 in PythonUI::pythonSession () at
gui/py/PythonUI.cpp:129
#29 0x00000000004a940a in boost::function0<void>::operator() (this=<value
optimized out>) at /usr/include/boost/function/function_template.hpp:989
#30 0x00007f22ec719f93 in thread_proxy () from
/usr/lib/libboost_thread-mt.so.1.38.0
#31 0x00007f22ecb2fa04 in start_thread (arg=<value optimized out>) at
pthread_create.c:300
#32 0x00007f22e77fa7bd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#33 0x0000000000000000 in ?? ()
Thread 5 (Thread 0x7f22d1f84910 (LWP 5533)):
#0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1 0x00007f22ece602b8 in PyThread_acquire_lock () from
/usr/lib/libpython2.6.so.1.0
#2 0x00007f22ece2f864 in PyEval_RestoreThread () from
/usr/lib/libpython2.6.so.1.0
#3 0x00007f22ece8436b in ?? () from /usr/lib/libpython2.6.so.1.0
#4 0x00007f22ece34cf4 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#5 0x00007f22ece36975 in PyEval_EvalCodeEx () from
/usr/lib/libpython2.6.so.1.0
#6 0x00007f22ecdbee80 in ?? () from /usr/lib/libpython2.6.so.1.0
#7 0x00007f22ecd92e53 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#8 0x00007f22ecda364f in ?? () from /usr/lib/libpython2.6.so.1.0
#9 0x00007f22ecd92e53 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#10 0x00007f22ece2ee43 in PyEval_CallObjectWithKeywords () from
/usr/lib/libpython2.6.so.1.0
#11 0x00007f22ece649dd in ?? () from /usr/lib/libpython2.6.so.1.0
#12 0x00007f22ecb2fa04 in start_thread (arg=<value optimized out>) at
pthread_create.c:300
#13 0x00007f22e77fa7bd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#14 0x0000000000000000 in ?? ()
Thread 4 (Thread 0x7f22d1783910 (LWP 5534)):
#0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1 0x00007f22ece602b8 in PyThread_acquire_lock () from
/usr/lib/libpython2.6.so.1.0
#2 0x00007f22ece2f864 in PyEval_RestoreThread () from
/usr/lib/libpython2.6.so.1.0
#3 0x00007f22ece8436b in ?? () from /usr/lib/libpython2.6.so.1.0
#4 0x00007f22ece34cf4 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#5 0x00007f22ece36975 in PyEval_EvalCodeEx () from
/usr/lib/libpython2.6.so.1.0
#6 0x00007f22ecdbee80 in ?? () from /usr/lib/libpython2.6.so.1.0
#7 0x00007f22ecd92e53 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#8 0x00007f22ecda364f in ?? () from /usr/lib/libpython2.6.so.1.0
#9 0x00007f22ecd92e53 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#10 0x00007f22ece2ee43 in PyEval_CallObjectWithKeywords () from
/usr/lib/libpython2.6.so.1.0
#11 0x00007f22ece649dd in ?? () from /usr/lib/libpython2.6.so.1.0
#12 0x00007f22ecb2fa04 in start_thread (arg=<value optimized out>) at
pthread_create.c:300
#13 0x00007f22e77fa7bd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#14 0x0000000000000000 in ?? ()
Current language: auto
The current source language is "auto; currently asm".
Thread 3 (Thread 0x7f22ce824910 (LWP 5535)):
#0 0x00007f22e77f33c2 in select () from /lib/libc.so.6
#1 0x00007f22ce900b20 in ?? () from /usr/lib/libtcl8.5.so.0
#2 0x00007f22ecb2fa04 in start_thread (arg=<value optimized out>) at
pthread_create.c:300
#3 0x00007f22e77fa7bd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x7f22cc9a4910 (LWP 5536)):
#0 0x00007f22e8d6af76 in ?? () from /usr/lib/libgomp.so.1
#1 0x00007f22e8d699d6 in ?? () from /usr/lib/libgomp.so.1
#2 0x00007f22ecb2fa04 in start_thread (arg=<value optimized out>) at
pthread_create.c:300
#3 0x00007f22e77fa7bd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4 0x0000000000000000 in ?? ()
Current language: auto
The current source language is "auto; currently c".
Thread 1 (Thread 0x7f22ed2b8800 (LWP 5531)):
#0 0x00007f22e77f33c2 in select () from /lib/libc.so.6
#1 0x00007f22e9e77b14 in QEventLoop::processEvents(unsigned int) () from
/usr/lib/libqt-mt.so.3
#2 0x00007f22e9edd5c1 in QEventLoop::enterLoop() () from
/usr/lib/libqt-mt.so.3
#3 0x00007f22e9edd472 in QEventLoop::exec() () from /usr/lib/libqt-mt.so.3
#4 0x00007f22dc105edf in QtGUI::run (this=<value optimized out>, argc=2,
argv=<value optimized out>) at gui/qt3/QtGUI.cpp:79
#5 0x000000000047b371 in main (argc=<value optimized out>, argv=<value
optimized out>) at /home/gladk/dem/yade/currentMono/yade/core/yade.cpp:329
Segmentation fault
=================================================================================
Can anybody give me an advice, what do I do wrong?
Thank you
______________________________
Anton Gladkyy
Follow ups