Problem with ACE loader demo on OS X

When trying to launch the ACE loader demo on OS X I get the following message:

Exception in thread "main" com.xith3d.scenegraph.IllegalSceneGraphOperation: Illegal attempt to set the parent of this Node (name: '', com.xith3d.scenegraph.TransformGroup@b22920) as it already has a parent (existing parent name: 'Root', com.xith3d.scenegraph.TransformGroup@aa2c23) and this would violate the directed acyclic graph constraint of the scenegraph.
      at com.xith3d.scenegraph.Node.setParent(Node.java:274)
      at com.xith3d.scenegraph.Group.addChild(Group.java:96)
      at CrudeTank.loadGeom(CrudeTank.java:97)
      at CrudeTank.<init>(CrudeTank.java:64)
      at AseTest.<init>(AseTest.java:85)
      at AseTest.main(AseTest.java:69)
Process java exited with code 1

Is there anyway to fix this or does it simply not work on macs??

there is a fix, just call removeFromParent() on the Node causing the problems.

The tutorial is trivially broken (for all platforms) - I shall try and find the time to fix it.

Will.

correction:

The version of the Ase Loader code that the online demo’s use is broken. The method getNamedNodesMap has since been fixed in Xith3d. The tutorial works as-is with the latest Xith3D CVS HEAD.

I need to update the online demo files and maybe release a new Xith3d community build :slight_smile:

Will.

[quote]correction:

The version of the Ase Loader code that the online demo’s use is broken. The method getNamedNodesMap has since been fixed in Xith3d. The tutorial works as-is with the latest Xith3D CVS HEAD.

I need to update the online demo files and maybe release a new Xith3d community build :slight_smile:

Will.
[/quote]
Umm… I don’t really understand. I just updated to the latest CVS version
2004-05-03, and it still doesn’t work. I’m just starting out with Xith so I’m no good to debug, but I know the problem is here:

Map nodes = af.getNamedNodesMap();  // problem exists here
                  
                  torso.addChild((Node)nodes.get("Torso"));  // or here

In the CrudeTank.java file. At least I think this is the problem. How should I fix this, since I’d like to be able to use the Ase loader in the future.

are you sure there isn’t an old copy of xith3d.jar hanging around in your class path buggering things up?

getNamedNodesMap() now returns Nodes which are parentless therefore you shouldn’t get that error.

Judging from the error messages you are getting, I’m almost certain you have an old copy of xith3d somewhere.

Will.

Nope, positive. I just downloaded the CVS again just to make sure. I even tried taking it out of my Java Library directory to make sure it wouldn’t launch, and when I did that, as expected, no Xith program launched.

What’s weird is that the AseTransformGroup (lesson 8 ) works fine. But the geometry load lesson with the tank is still refusing to launch. I even tried download it from different parts of your site see if it was just an old file, but no go. Still same message from it:

Exception in thread "main" com.xith3d.scenegraph.IllegalSceneGraphOperation: Illegal attempt to set the parent of this Node (name: '', com.xith3d.scenegraph.TransformGroup@5dfaf1) as it already has a parent (existing parent name: 'Root', com.xith3d.scenegraph.TransformGroup@61cd2) and this would violate the directed acyclic graph constraint of the scenegraph.
        at com.xith3d.scenegraph.Node.setParent(Node.java:274)
        at com.xith3d.scenegraph.Group.addChild(Group.java:96)
        at CrudeTank.loadGeom(CrudeTank.java:97)
        at CrudeTank.<init>(CrudeTank.java:64)
        at AseTest.<init>(AseTest.java:85)
        at AseTest.main(AseTest.java:69)

Edit: Heck, I even tried installing the CVS version before the latest one, and it didn’t work with that one either.

:frowning:

when you say “downloaded the CVS” did you mean a community build which is a CVS snapshot? I mean doing a checkout from CVS itself. I’m going to upload a new CVS snapshot soon.

Will.

No, I meant CVS as in the builds you already had in http://xith.org/download/builds/?M=D (kinda like pre-built nighty’s). I’m currently downloading the source and once I build it I’ll get back to you…

Edit: fixed the build problem! will try and see if it works now!

JUMPS FOR JOY!!
Thank you!! It worked perfectly! I see the cute little tank spinning and everything! Hehe, just you wait, I’ve got a killer idea for a game, and it’s gonna use Xith for everything (might be a while before you see it though :)) Thanks again for all the help!

:smiley:

Great :slight_smile:

I apologise that the community builds were so stale. There is a new one up there now based on today’s CVS.

http://xith.org/download/builds/2004-07-28_cvs/

Cheers,

Will.