Home › Forum › SOFA › Using SOFA › [SOLVED] Error while Adding Compliance nodes in the simulation (Compliant module)
Tagged: 64_bits, compliance, Linux_ubuntu, SOFA_1612
- This topic has 2 replies, 2 voices, and was last updated 7 years, 1 month ago by mmabrouk.
-
AuthorPosts
-
12 October 2017 at 15:08 #10071mmabroukBlocked
Hello,
I am using the compliant plugin (CompliantImplicitSolver in addition to DiagonalCompliance) for a protein simulation using SOFA.
I am using DiagonalCompliance to model spring (forces) between atoms.
My model looks like this:
<node:contact_frames>
Mechanical Object (describing the atoms)
|-AssembledRigidRigidMapping (for the joints)
|-Mechanical Object
<node:contact_springs>
|-|Mechanical Object
|-|EdgeSetTopologyContainer
|-|DistanceMapping
|-|DiagonalCompliance
</node:contact_springs>
</node:contact_frames>I want to dynamically enable and disable springs in my simulation. I tried removing the node containing the compliance (<contact_springs>), modifying it, then adding it again. I get a SegFault (trace is below).
I experimented a bit with the error:
– I tried removing the node, saving the object, then adding it the exact same object again after one simulation step. I get the segfault.
– I tried adding the compliance node after one simulation step, instead of the beginning of the simulation -> Segfault.It seems to me that there is a communication issue between the sofa core and the compliant module.
I would be very thankful for any help. Is there a way to fix the problem? Maybe some call to the compliant module to update its model? Or is there maybe another way to update the springs in the simulation? I tried modifying the compliances of some of the springs to infinity (or high numbers), my modifications are not taken into account in the simulation.Yours,
Mahmoud########## SIG 11 - SIGSEGV: segfault ########## -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaHelper.so.16.12.0(sofa::helper::BackTrace::dump()+0x23) [0x7fc05c978b23] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaHelper.so.16.12.0(sofa::helper::BackTrace::sig(int)+0x19c) [0x7fc05c978e6c] -> /lib/x86_64-linux-gnu/libc.so.6(+0x354b0) [0x7fc05bd924b0] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaCore.so.16.12.0(sofa::core::behavior::ForceField<sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<1, double>, sofa::defaulttype::Vec<1, double>, double> >::updateForceMask()+0xb) [0x7fc05dd31f1b] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationCore.so(sofa::simulation::MechanicalComputeForceVisitor::fwdForceField(sofa::simulation::Node*, sofa::core::behavior::BaseForceField*)+0x84) [0x7fc05e80bff4] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationCore.so(sofa::simulation::BaseMechanicalVisitor::processNodeTopDown(sofa::simulation::Node*, sofa::simulation::Visitor::VisitorContext*)+0x6c7) [0x7fc05e80a047] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationCore.so(sofa::simulation::BaseMechanicalVisitor::processNodeTopDown(sofa::simulation::Node*)+0x28) [0x7fc05e8087b8] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationGraph.so.16.12.0(sofa::simulation::graph::DAGNode::doExecuteVisitor(sofa::simulation::Visitor*, bool)+0x126) [0x7fc0605fe616] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationCore.so(sofa::simulation::Node::executeVisitor(sofa::simulation::Visitor*, bool)+0x144) [0x7fc05e81b674] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationCore.so(sofa::simulation::common::MechanicalOperations::computeForce(sofa::core::TMultiVecId<(sofa::core::VecType)2, (sofa::core::VecAccess)1>, bool, bool, bool)+0xf3) [0x7fc05e804223] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libCompliant.so(sofa::component::odesolver::CompliantImplicitSolver::compute_forces(sofa::component::odesolver::CompliantImplicitSolver::SolverOperations&, sofa::core::behavior::TMultiVec<(sofa::core::VecType)2>&, sofa::core::behavior::TMultiVec<(sofa::core::VecType)2>*)+0xb6) [0x7fc015a41fb6] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libCompliant.so(sofa::component::odesolver::CompliantImplicitSolver::solve(sofa::core::ExecParams const*, double, sofa::core::TMultiVecId<(sofa::core::VecType)1, (sofa::core::VecAccess)1>, sofa::core::TMultiVecId<(sofa::core::VecType)2, (sofa::core::VecAccess)1>)+0x5de) [0x7fc015a4615e] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationCore.so(sofa::simulation::AnimateVisitor::processNodeTopDown(sofa::simulation::Node*)+0x635) [0x7fc05e7f36b5] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationGraph.so.16.12.0(sofa::simulation::graph::DAGNode::executeVisitorTopDown(sofa::simulation::Visitor*, sofa::helper::list<sofa::simulation::graph::DAGNode*, std::allocator<sofa::simulation::graph::DAGNode*> >&, std::map<sofa::simulation::graph::DAGNode*, sofa::simulation::graph::DAGNode::StatusStruct, std::less<sofa::simulation::graph::DAGNode*>, std::allocator<std::pair<sofa::simulation::graph::DAGNode* const, sofa::simulation::graph::DAGNode::StatusStruct> > >&, sofa::simulation::graph::DAGNode*)+0x2d9) [0x7fc0605fe2e9] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationGraph.so.16.12.0(sofa::simulation::graph::DAGNode::doExecuteVisitor(sofa::simulation::Visitor*, bool)+0xae) [0x7fc0605fe59e] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationCore.so(sofa::simulation::Node::executeVisitor(sofa::simulation::Visitor*, bool)+0x144) [0x7fc05e81b674] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationCore.so(sofa::simulation::DefaultAnimationLoop::step(sofa::core::ExecParams const*, double)+0x126) [0x7fc05e7f9686] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaSimulationCore.so(sofa::simulation::Simulation::animate(sofa::simulation::Node*, double)+0x54) [0x7fc05e867384] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaGuiQt.so.16.12.0(sofa::gui::qt::RealGUI::step()+0x113) [0x7fc05b93ccd3] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaGuiQt.so.16.12.0(+0x30b16e) [0x7fc05b8de16e] -> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QMetaObject::activate(QObject*, int, int, void**)+0x7ea) [0x7fc0482a9d2a] -> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QTimer::timerEvent(QTimerEvent*)+0x28) [0x7fc0482b65c8] -> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QObject::event(QEvent*)+0xa3) [0x7fc0482aabb3] -> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0x8c) [0x7fc048b6e05c] -> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(QApplication::notify(QObject*, QEvent*)+0x256) [0x7fc048b73516] -> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QCoreApplication::notifyInternal(QObject*, QEvent*)+0xdb) [0x7fc04827b38b] -> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QTimerInfoList::activateTimers()+0x52d) [0x7fc0482d05ed] -> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x2dbaf1) [0x7fc0482d0af1] -> /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2a7) [0x7fc0455d8197] -> /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a3f0) [0x7fc0455d83f0] -> /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7fc0455d849c] -> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x5f) [0x7fc0482d17cf] -> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0x10a) [0x7fc048278b4a] -> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QCoreApplication::exec()+0x9c) [0x7fc048280bec] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaGuiQt.so.16.12.0(sofa::gui::qt::RealGUI::mainLoop()+0x93) [0x7fc05b932de3] -> /home/mmabrouk/app/sofa/v16.12/build/lib/libSofaGuiCommon.so.16.12.0(sofa::gui::GUIManager::MainLoop(boost::intrusive_ptr<sofa::simulation::Node>, char const*)+0x23) [0x7fc0601c6903] -> runSofa(main+0xec8) [0x407658] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fc05bd7d830] -> runSofa(_start+0x29) [0x4083c9] Segmentation fault (core dumped)
12 October 2017 at 19:06 #10072maxBlockedHello Mahmoud,
I’m not exactly sure what you mean by adding/removing components, but if you’re doing it from a python script controller, then make sure to call
init()
on the compliance component you create dynamically (i.e. not at scene creation).The
init
method is called automatically for you on scene creation, but it is not called on components created *after*, so this might fix your issue.Hope this helps,
13 October 2017 at 11:09 #10073mmabroukBlockedHello Max,
That fixed the problem. Thank you!!
Yours,
Mahmoud -
AuthorPosts
- You must be logged in to reply to this topic.