Results 1 to 5 of 5

Thread: instance_node segfault

  1. #1
    Junior Member
    Join Date
    Nov 2008
    Posts
    3

    instance_node segfault

    Hi everyone,

    i try to load a .dae file (let's call it global.dae) with OpenSceneGraph (v2.6.1). Unfortunately during the load of the .dae file there is a segmentation fault...

    After several test I identified that this segfault appears because of the call of instance_node like this : <instance_node url="./objects/external1.dae#car"/>. Indeed my global.dae file load external .dae files.

    Of course i try to load the external .dae files and everything is ok.

    I simplify the global .dae file to load external geometry with <instance_geometry ...> and it works, so i don't think there is a problem of URIResolver...

    Is anyone can help me, because i'm close to get insane...

    Thank you in advance,
    trice

  2. #2
    a common way to narrow problems down would be:
    • * Get a DEBUG build from OSG and try to be more specific with the "segmentation fault"
    • * post a link to the erroneous DAE file
    • * give us more input about the OS (win,mac,linux,...) the used COLLADA-DOM version, ...

    hth

  3. #3
    Junior Member
    Join Date
    Nov 2008
    Posts
    3
    Hi Sebastian and thank you for your answer.

    First of all, here is my configuration details : ubuntu Hardy (8.04), collada dom 2.1 and openscenegraph 2.6.1.

    I had a little of time to try what you propose. I run the coherencytest and i get some SCHEMA errors because of wrong attributes but and it's probably more important, i obtain a seg fault when i simply check CIRCULR_REFERENCE.

    I run the ConsoleViewer from the NVIDIA SG and i obtain this :
    Code :
    terminate called after throwing an instance of 'std::logic_error'
      what():  basic_string::_S_construct NULL not valid

    I try also the google earth loader and there is a crash...

    I don't have the time yet for the debug build from osg, i hope for tomorrow.

    I try to use "instance_node" with simple dae file found on the net like cow.dae, here is what i write in the <visual_scene> node of the first .dae file :
    Code :
    <node id="id3" name="cow.dae" sid="CO_0" type="NODE">
      <node id="id1631" sid="FileRef" type="NODE">
        <instance_node url="cow.dae#VisualSceneNode"/>
      </node>
    </node>
    And there is a segfault.
    But if i comment the <instance_node> the loading is ok and this the case also with my first .dae file.

    Unfortunately i can't post a link to the erroneous file but here is some lines :
    Code :
    <?xml version="1.0" encoding="utf-8"?>
    <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
    .....
     <library_visual_scenes>
       <visual_scene id="VisualSceneNode" name="Scene1">
         <node id="id3" name="souf_dae" sid="CO_0" type="NODE">
           <node id="id1631" sid="FileRef" type="NODE">
             <matrix>1 0 -0.000251 -790.708 0 1 0.000068 216.782 0.000251 0 1 50.5316 0 0 0 1</matrix>
             <instance_node url="./objects/souf.dae#VisualSceneNode"/>
           </node>
         </node>    
       </visual_scene>
     </library_visual_scenes>
     <scene>
       <instance_visual_scene url="#VisualSceneNode"/>
     </scene>
    </COLLADA>
    I'm still working on it.
    Thank you for your help

  4. #4
    Junior Member
    Join Date
    Aug 2008
    Posts
    6
    There is one error in your first .dae file. In an <instance_node> you have to reference a <node> element, but you are referencing "cow.dae#VisualSceneNode" which is a <visual_scene> element. This might cause NVIDIA SG to crash.

    We have just tried to reproduce the crash of the coherency using the precompiled linux version available at sf. Is that the version you are using? We used the cow.dae file found here, but the coherencytest passed without any messages. Is that the cow.dae file you are using? If not, could you send us your cow.dae file and your complete first .dae file, at least a stripped down version that still produces the crash of the coherency test?

  5. #5
    Junior Member
    Join Date
    Nov 2008
    Posts
    3
    Quote Originally Posted by rwuerfel
    There is one error in your first .dae file. In an <instance_node> you have to reference a <node> element, but you are referencing "cow.dae#VisualSceneNode" which is a <visual_scene> element. This might cause NVIDIA SG to crash.
    That's IT !!! Thank you very much. The <instance_node> must reference the parent <node> under the <visual_scene>... now it works. The .dae they gave to me was crap...

    Thank you again both of you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •