yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00414
Re: new PhysicalAction
> However, runtime error arose:
>
> ...
> DEBUG yade.PhysicalActionContainerInitializer pkg/common/Engine/StandAloneEngine/PhysicalActionContainerInitializer.cpp:48 action: allNames after sort and unique:
> DEBUG yade.PhysicalActionContainerInitializer pkg/common/Engine/StandAloneEngine/PhysicalActionContainerInitializer.cpp:48 action: Force
> DEBUG yade.PhysicalActionContainerInitializer pkg/common/Engine/StandAloneEngine/PhysicalActionContainerInitializer.cpp:48 action: Momentum
> DEBUG yade.PhysicalActionContainerInitializer pkg/common/Engine/StandAloneEngine/PhysicalActionContainerInitializer.cpp:48 action: Teleportation
> DEBUG yade.Omega core/Omega.cpp:342 loadSimulation: Simulation loaded
>
This is OK, Teleportation will be initialized in the container. So far
good. (You can use NEEDS_BEX("Teleportation") macro with your teleport
engine to register the class to be initialized with the initializer
automagically).
> yade: /usr/local/include/boost/shared_ptr.hpp:315: T* boost::shared_ptr<T>::operator->() const [with T = PhysicalAction]: Adoption verification `px != 0' failed.
> SIGSEGV/SIGABRT handler called; gdb batch file is `/home/sega/.yade-trunk/gdb_crash_batch-pid27822'
> GNU gdb 6.5
> ...
>
Please provide the backtrace, that is _the_ most valuable information
about such thing.
> I spent some research and discovered that class Force have ClassIndex 0, class Momentum have ClassIndex 1 but class Teleportation have ClassIndex 3 (need 2???).
>
I think this is OK. Class index is integer that is incremented for every
new class (not instance) factored in the class factory. It can,
therefore, be different from one run to another. Class indices that are
not registered with PhysicalActionContainerInitializer will not be
initialized, but that is harmless (or should be).
Wouldn't it be easier to have a DeusExMachina teleport all bodies that
are too far away back where they should be? This way you have 1 extra
loop: in one, you detect the body ewnt nuts and create the Teleportation
action, in another loop, this action is performed and the body is
teleported.
Regards, Vaclav
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev
References