Skip to main content

SceneGraphStreamReader/ Writer Problem

4 replies [Last post]
dickensau
Offline
Joined: 2004-07-14
Points: 0

Hi All,

I try to save the scenegraph (include RotPosPathInterpolator node) by using SceneGraphStreamWriter. After i loading it again. I got following error meessage. Please give me some advice. Thanks.

P.S. There are no problems if the scenegraph didn't contain behavior node.

java.lang.NullPointerException
at javax.media.j3d.Transform3D.set(Transform3D.java:1846)
at javax.media.j3d.TransformInterpolator.(TransformInterpolator.java: 89)
at javax.media.j3d.PathInterpolator.(PathInterpolator.java:122)
at javax.media.j3d.RotPosPathInterpolator.(RotPosPathInterpolator.jav a:75)
at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.RotPosPathInterpol atorState.createNode(RotPosPathInterpolatorState.java:109)
at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.SceneGraphObjectSt ate.readObject(SceneGraphObjectState.java:151)
at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.NodeState.readObje ct(NodeState.java:71)
at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.BehaviorState.read Object(BehaviorState.java:87)
at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.InterpolatorState. readObject(InterpolatorState.java:65)
at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.TransformInterpola torState.readObject(TransformInterpolatorState.java:71)
at com.sun.j3d.utils.scenegraph.io.retained.Controller.readObject(Controlle r.java:340)
at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.GroupState.readObj ect(GroupState.java:86)
at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.TransformGroupStat e.readObject(TransformGroupState.java:70)
at com.sun.j3d.utils.scenegraph.io.retained.Controller.readObject(Controlle r.java:340)
at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.GroupState.readObj ect(GroupState.java:86)
at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.TransformGroupStat e.readObject(TransformGroupState.java:70)
at com.sun.j3d.utils.scenegraph.io.retained.Controller.readObject(Controlle r.java:340)
at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.GroupState.readObj ect(GroupState.java:86)
at com.sun.j3d.utils.scenegraph.io.retained.Controller.readObject(Controlle r.java:340)
at com.sun.j3d.utils.scenegraph.io.retained.StreamControl.readBranchGraph(S treamControl.java:14
at com.sun.j3d.utils.scenegraph.io.SceneGraphStreamReader.readBranchGraph(S ceneGraphStreamReader.java:91)
at loader$2.actionPerformed(loader.java:222)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
geoff
Offline
Joined: 2004-03-04
Points: 0

hi. i just happened to read the description for scenegraph io, i dont know if this is relevant but i copy and paste it anyway.

Note : If you use SceneGraphStreamWriter class to write to a FileOutputStream the resulting file cannot be read using the SceneGraphFileReader, the converse is also true, you can not use a FileInputStream to load a file written by SceneGraphFileWriter.

newbie geoff.

paulby
Offline
Joined: 2003-06-13
Points: 0

Please file this as an issue in the issue tracker on java3d.dev.java.net and I'll investigate.

Rgds

Paul

paulby
Offline
Joined: 2003-06-13
Points: 0

I have a fix for this, please send me a test case and I'll confirm the fix and put in the CVS repository.

Alternatively I can put a tmp build in the file downloads section for you to test locally.

kcr
Offline
Joined: 2004-03-17
Points: 0

Also, if the person who initially reported the bug could file an Issue at http://java3d.dev.java.net/servlets/ProjectIssues that would help us track the problem better. In general, we are only going to look at problems that have an issue filed on them.

-- Kevin