Home › Forum › SOFA › Programming with SOFA › [SOLVED] Error with test scene, Required plugins error
Tagged: 64_bits, Linux_ubuntu, SOFA_1706, test
- This topic has 2 replies, 2 voices, and was last updated 7 years, 1 month ago by ErwanDouaille.
-
AuthorPosts
-
25 September 2017 at 13:12 #9993ErwanDouailleBlocked
Hey,
I encounter an issue while testing my plugin. Here is the test :
class Communication_test : public Sofa_test<> { public: void checkPerformances(int numstep) { std::stringstream scene1 ; scene1 << "<?xml version='1.0' ?> \n" "<Node name='root'> \n" " <RequiredPlugin name='Communication' /> \n" "</Node> \n"; Node::SPtr root = SceneLoaderXML::loadFromMemory ("testscene", scene1.str().c_str(), scene1.str().size()) ; root->init(ExecParams::defaultInstance()) ; for(unsigned int i=0;i<numstep;i++) sofa::simulation::getSimulation()->animate(root.get(), 0.001); } }; TEST_F(Communication_test, checkPerformancs) { ASSERT_NO_THROW(this->checkPerformances(2)) ; }
But it fails with the following error message :
[==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from Communication_test [ RUN ] Communication_test.checkPerformancs [ERROR] [DAGNode(root)] Object type "RequiredPlugin" creation Failed /home/douaille/SOFA/sofaTestCommunication/applications/plugins/SofaTest/../SofaTest/Sofa_test.h:94: Failure Failed A message of type 'Error' was not expected but it was received. ====================== Messages ======================= [DAGNode]: Message type : Error Message content: Object type "RequiredPlugin" creation Failed source code loc: /home/douaille/SOFA/sofaTestCommunication/SofaKernel/modules/SofaSimulationCommon/xml/NodeElement.cpp:83 component: DAGNode(root) =============================================================== /home/douaille/SOFA/sofaTestCommunication/applications/plugins/SofaTest/../SofaTest/Sofa_test.h:94: Failure Failed A message of type 'Error' was not expected but it was received. ====================== Messages ======================= [SceneLoaderXML]: Message type : Error Message content: Node initialization failed. source code loc: testscene:2 component: SceneLoaderXML =============================================================== [WARNING] [DAGSimulation(Simulation)] ERROR in Simulation::animate(): AnimationLoop expected at the root node [WARNING] [DAGSimulation(Simulation)] ERROR in Simulation::animate(): AnimationLoop expected at the root node [ FAILED ] Communication_test.checkPerformancs (3 ms) [----------] 1 test from Communication_test (3 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (3 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] Communication_test.checkPerformancs 1 FAILED TEST [ERROR] [SceneLoaderXML] Node initialization failed.
I don’t understand what is the problem. When running sofa the plugin “Communication” works well. For unknown reason, RequiredPlugin is not created.
Do you have any tips ? Is it a bug ?
Edit : the exactly same scene works well with runSofa.
26 September 2017 at 12:01 #9995GuillaumeKeymasterHi Erwan,
I just tried the exact same test but with
SofaPython
andimage
plugins and it worked well.
Can you confirm that?Guillaume.
26 September 2017 at 12:11 #9996ErwanDouailleBlockedHey,
I just tried SofaPython and it works. Then why my plugin works with runsofa and not for this test ? Is there any option for tests ?
Edit : delete past message, my bad. SofaPython was not build.
-
AuthorPosts
- You must be logged in to reply to this topic.