setTransform -> out of memory (bug ?)
Hello!
We're using
Java 3D [dev] 1.5.0-build4-experimental 28 Jun 2006 09:30:26 PDT
We use this piece of code within a class extending TransforumGroup:
transform.setTranslation(new Vector3d(pos.x,pos.y,pos.z));
setTransform(transform);
We need to call this quite often, since it updates the Position of Objects on our Scene.
The garbage collector shows that the used memory is growing with each call ... until it is full:
[Full GC 13491K->12667K(21820K), 0.1180618 secs]
[Full GC 14001K->12952K(22844K), 0.1196116 secs]
[Full GC 14488K->13655K(23320K), 0.1211732 secs]
[Full GC 15094K->14266K(24552K), 0.1206172 secs]
[Full GC 15624K->14787K(25700K), 0.1229937 secs]
...
[Full GC 64952K->64952K(65088K), 0.2606679 secs]
Exception in thread"AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread"J3D-GeometryStructureUpdateThread-1" java.lang.OutOfMemoryError: Java heap space
We just need to remove
setTransform(transform);
and this problem disappears.
We made a variety of tests and came to the estimation that setTransform() finally causes Java to run out of memory.
The very strange thing:
We've got another (similar) class extending TransformGroup, which also calls setTransform() after each frame, but does not cause the system to run out of memory !
The objects of the two different classes are each stored within a BranchGroup. So we got two BranchGroups - stored within another main TransformGroup, which is finally drawn.
Any hint ? :)

