Hi Boris,
Can you send me your example for investigation....
NodeComponents are handled differently from Nodes because NodeComponents can
be shared between multiple BranchGraphs.
Rgds
Paul
----------------------------------------------------------
Paul Byrne Email : [EMAIL PROTECTED]
Sun Microsystems Phone : (650) 786 9926
Visualization Software Group Fax : (650) 786 5852
----------------------------------------------------------
>MIME-Version: 1.0
>Date: Sun, 13 May 2001 22:49:36 -0700
>From: Boris Zeldin <[EMAIL PROTECTED]>
>Subject: [JAVA3D] Crash in j3dfly serialization
>To: [EMAIL PROTECTED]
>
>Java3d experts.
>
>I got a crash while trying to "externalize" my Java3d
>scene using j3dfly libraries. The stack roughly looks
>like that:
>
>
>ava.lang.reflect.InvocationTargetException:
>java.util.EmptyStackException
>at java.util.Stack.peek(Stack.java:82)
> at
>com.sun.j3d.demos.utils.scenegraph.io.retained.SymbolTable.createNodeComponentS
ymbol(SymbolTable.java:347)
> at
>com.sun.j3d.demos.utils.scenegraph.io.retained.SymbolTable.addReference(SymbolT
able.java:447)
> at
>appearance.TextureCollection.createSceneGraphObjectReferences(TextureCollection
.java:109)
> at
>model.Model.createSceneGraphObjectReference(Model.java:428)
>
>Here what I did to get to this point.
>
>I have an object Model:
>
>public class Model extends BranchGroup implements
>SceneGraphIO
>{
> protected TextureCollection textures;
>
> ..............
>
> public void createSceneGraphObjectReferences(
>SceneGraphObjectReferenceControl ref )
> {
> ..............
> textures.createSceneGraphObjectReferences(ref);
> }
>
> public void restoreSceneGraphObjectReferences(
>SceneGraphObjectReferenceControl ref )
> {
> .....................
> textures.createSceneGraphObjectReferences(ref);
> }
>
>}
>
>public class TextureCollection
>{
> Hashtable tuxtures;
>
> public void createSceneGraphObjectReferences(
>SceneGraphObjectReferenceControl ref )
> {
> }
>
> public void restoreSceneGraphObjectReferences(
>SceneGraphObjectReferenceControl ref )
> {
> }
>
>}
>
>
>As one can see, Model contains a collection of
>references to Textures.
>This let me save some
>memory/management in dealing with textures.
>
>
>Hierarhically it look like this diagram
>
>Model(BranchGroup)
> |
> |
> -- TransferGroup
> |
> |
> --- BranchGroup
> |
> |
> ------ TransferGroup
> |
> |
> --Shape3D
> |
> |
> -- Appearance
> |
> |
> ---Texture
>
>
>
>
>So everything looks O'key from my point of view of a
>j3dfly user. However, my Model indirectly references
>textures which stays far below in the hierarchichal
>tree. I have a hypothesis that something is funny with
>the way j3dfly handles javax.media.j3d.NodeComponent
>object since all my crashes so far were
>related to these objects (Textures, Appearances,
>Geometry) whereas javax.media.j3d.Node objects are
>handled properly. I assume j3dfly does
>not hash them at the point where
>createSceneGraphObjectReferences is called for top
>BranchGroup(Model).
>
>Let me know of your experience in resolving references
>to NodeComponent objects.
>
>Thank you for your help
>
>Boris.
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Auctions - buy the things you want at great prices
>http://auctions.yahoo.com/
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".