Login
Username:

Password:


Lost Password?

Register now!
Main Menu
H3D.org Feeds
H3D.org Forum Index
   Programming Issues
     Runtime error with x3d file
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
sabrina7
Posted on: 2010/1/15 22:21
Just can't stay away
Joined: 2006/3/6
From: England - Kent
Posts: 83
Runtime error with x3d file
Hello!

I am using H3DAPI 2.0 with an x3d file using different indexed faced sets, each with different stiffness values. When exploring (with Ruspini renderer, but also with others), after a while I usually get a RunTime error and H3DLoad or H3DViewer crashes. As it's just a simple x3d file with just stiffness as a surface property, I am not sure what is causing this. It also happens with other surface properties such as friction or the DephtMap texture.
Below is the code! If anyone has any ideas, help would be much appreciated!

Thanks,
S.


<?xml version="1.0" encoding="utf-8"?>
<X3D profile='H3DAPI' version='2.0'>
<Group  DEF="G" >
  <Viewpoint position="0 0 0.6" />

  <Transform>
    <Transform>
    <Transform>
      <Shape DEF='C'>
      <Appearance>
        <Material diffuseColor='0 1 0' />
        <SmoothSurface stiffness = '0.1'/>
      </Appearance>
      <IndexedFaceSet coordIndex="0 1 2 3 0 -1 3 4 5 6 3 -1 6 7 8 9 6 -1" solid="false">
        <Coordinate  point="-0.06 0 0, -0.04 0 0, -0.04 -0.04 0, -0.06 -0.04 0, 0 -0.04 0, 0 -0.06 0, -0.06 -0.06 0, 0.02 -0.06 0, 0.02 -0.08 0, -0.06 -0.08 0"/>
      </IndexedFaceSet>
    </Shape>
    </Transform>
    </Transform>

    <Transform >
      <Shape DEF='A'>
        <Appearance>
          <Material diffuseColor='0.5 0 1' />
         <SmoothSurface stiffness = '0.1'/>
        </Appearance>
        <IndexedFaceSet coordIndex="0 1 2 3 0 -1 3 4 5 6 3 -1" solid="false">
        <Coordinate  point="-0.04 0.04 0, 0.04 0.04 0, 0.04 0.02 0, -0.04 0.02 0, 0 0.02 0, 0 0 0, -0.04 0 0"/>
      </IndexedFaceSet>
      </Shape>
    </Transform>

    </Transform>
    
    <Transform >
    <Transform>
      <Shape DEF='B'>
        <Appearance>
          <Material diffuseColor='0 0.5 1' />
          <SmoothSurface stiffness ='0.1'/>
        </Appearance>
        <IndexedFaceSet coordIndex="0 1 6 5 0 -1 6 2 3 4 6 -1" solid="false">
        <Coordinate  point="0.04 0.02 0, 0.08 0.02 0, 0.08 -0.06 0, 0.02 -0.06 0, 0.02 -0.04 0, 0.04 -0.04 0, 0.08 -0.04 0"/>
      </IndexedFaceSet>
      </Shape>
    </Transform>
    </Transform>
    
    <Transform >
    <Transform>
      <Shape DEF='AC'>
        <Appearance>
          <Material />
          <SmoothSurface stiffness = '0.5'/>
        </Appearance>
        <IndexedFaceSet coordIndex="0 1 2 3 0 -1" solid="false" >
        <Coordinate  point="-0.04 0 0, 0.0 0.0 0.0, 0 -0.04 0, -0.04 -0.04 0"/>
      </IndexedFaceSet>
      </Shape>
    </Transform>
    </Transform>

    <Transform>
    <Transform>
      <Shape DEF='ABC'>
        <Appearance>
          <Material diffuseColor='0.5 0.5 0' />
          <SmoothSurface stiffness ='0.8'/>
        </Appearance>
        <IndexedFaceSet coordIndex="0 1 2 3 0 -1 3 2 4 5 3 -1" solid="false" >
          <Coordinate  point="0.0 0.0 0.0, 0.02 0 0, 0.02 -0.02 0, 0 -0.02 0, 0.02 -0.04 0, 0 -0.04 0"/>
        </IndexedFaceSet>
      </Shape>
    </Transform>
    </Transform>
    
    <Transform>
    <Transform>
      <Shape DEF='BC'>
        <Appearance>
          <Material diffuseColor='0 1 1' />
          <SmoothSurface stiffness ='0.5'/>
        </Appearance>
        <IndexedFaceSet coordIndex="0 1 2 3 0 -1" solid="false" >
        <Coordinate  point="0 -0.04 0, 0.02 -0.04 0, 0.02 -0.06 0, 0 -0.06 0"/>
      </IndexedFaceSet>
      </Shape>
    </Transform>
    </Transform>
    
    <Transform>
    <Transform>
      <Shape DEF='AB'>
        <Appearance>
          <Material diffuseColor='1 1 0' />
          <SmoothSurface stiffness ='0.5'/>
        </Appearance>
        <IndexedFaceSet coordIndex="0 1 2 3 0 -1 3 4 5 6 3 -1" solid="false" >
        <Coordinate  point="0 0 0, 0 0.02 0, 0.04 0.02 0, 0.04 0 0, 0.04 -0.04 0, 0.02 -0.04 0, 0.02 0 0"/>
      </IndexedFaceSet>
      </Shape>
    </Transform>
    </Transform>
    

    <Transform >
      <Shape>
        <Appearance>
          <Material diffuseColor='1 1 1' />
          <SmoothSurface />
        </Appearance>
        <Rectangle2D size='0.5 0.5' />
      </Shape>
    </Transform>

</Group>
</X3D>
sabrina7
Posted on: 2010/1/15 22:22
Just can't stay away
Joined: 2006/3/6
From: England - Kent
Posts: 83
Re: Runtime error with x3d file
Oh and I don't know if that matters but I'm using a Phantom desktop.

Thanks
karlu
Posted on: 2010/1/18 19:34
Guru
Joined: 2004/12/2
From: Sweden
Posts: 585
Re: Runtime error with x3d file
It's close to impossible to know what the bug is without knowing where the program fails. Could you run the program under debug mode and post the call stack?


----------------
KJ Lundin Palmerius
Norrköping Visualization and Interaction Studio
Linköping University, Sweden

sabrina7
Posted on: 2010/1/28 19:02
Just can't stay away
Joined: 2006/3/6
From: England - Kent
Posts: 83
Re: Runtime error with x3d file
Hello!

I didn't compile the API myself but ran the executable. So I'm not sure I can run the program in debug mode.
I was just wondering if someone could try it out on their machine, to see whether they face the same problem with that x3d file, to spot whether it's specific to my setup or a general issue.

Thanks,
S.
Markus
Posted on: 2010/1/29 8:15
Webmaster
Joined: 2006/3/27
From: SenseGraphics
Posts: 1531
Re: Runtime error with x3d file
Could you test it with H3DAPI 2.1 first? Your problem might be caused by a bug in H3DAPI 2.0. Who knows.
Threaded | Newest First Previous Topic | Next Topic | Top

Register To Post
 



(C) 2004 SenseGraphics AB    ---    Powered by XOOPS