I'm using a BallAndStickFactory to display some vectors. When I then remove the SceneGraphComponent produced by the Factory from the scene graph I get a
Code: Select all
Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
This I due to the JOGL Renderer that registeres a GeometryListener on every Geometry in the scene graph. This is fine as long as a geometry does not occur to often in the scene graph. Here the result is a chain of GeometryEventMulticasters which is as long the number of occurrences of that specific geometry in the graph. So for the BallAndStickFactory we get a very long chain as it recycles it's tube geometry for every stick.
Any idea how to resove this?