yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #04933
Re: Creating clumps using C [error]
> If I comment out "clump->add(...)." It will run fine. Why?
Because in that case you don't add anything to the clump. Then...
Clump::add uses Body::byId which (unless you provide a second argument)
looks in the current scene for the body ID that you give it.(*) But your
current scene is different from the one that you added the sphere into
-- probably. Watch the Omega::instance().setScene() line. That should
help.
(*) Ok, we should change that, it should be given a const
shared_ptr<Body>& that is already in the container, instead of the id.
Cheers, v.
> Thread 2 (Thread 0x7f1df8eaa950 (LWP 5308)):
> #0 0x00007f1e164f092f in waitpid () from /lib/libc.so.6
> #1 0x00007f1e164882d1 in ?? () from /lib/libc.so.6
> #2 0x00007f1e1648864c in system () from /lib/libc.so.6
> #3 0x00007f1e15afb0c2 in crashHandler (sig=11) at core/main/pyboot.cpp:45
> #4 <signal handler called>
> #5 Clump::add (this=0x1723860, subId=0) at /usr/include/boost/shared_ptr.hpp:131
> #6 0x00007f1e03f6d21e in ClumpTestGen::generate (this=0x171bf00) at /home/chiab/yadeNew/Branch7/pkg/dem/PreProcessor/ClumpTestGen.cpp:285
Follow ups
References