https://java3d.dev.java.net/issues/show_bug.cgi?id=583 Issue #|583
Summary|A disposed Graphics2D remains in Canvas3D after remova
|l and addtion
Component|java3d
Version|1.5.1
Platform|All
OS/Version|All
URL|
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|j3d-core
Assigned to|issues@java3d
Reported by|paasiala
------- Additional comments from
paasiala@... Tue May 13 12:05:55 +0000 2008 -------
When a Canvas3D is removed and then added back to a container, the Graphics2D
object returned by getGraphics2D() is disposed. This is caused by a bug in
Canvas3D's freeContextResources method. In that method the Graphics2D referred
by graphics2D field, but the field value is not nullified. When getGraphics2D()
method is called after that, the Graphics2D returned is not usable and the
following exception is thrown:
Exception occurred during Canvas3D callback:
java.lang.IllegalStateException: Cannot use Graphics2D object after dispose() is
called
at javax.media.j3d.J3DGraphics2DImpl.flush(J3DGraphics2DImpl.java:141)
at com.solibri.sae.cad.java3d.Immcanvas.postRender(Immcanvas.java:166)
at javax.media.j3d.Renderer.doWork(Renderer.java:1426)
at javax.media.j3d.J3dThread.run(J3dThread.java:275)
---------------------------------------------------------------------
To unsubscribe, e-mail:
issues-unsubscribe@...
For additional commands, e-mail:
issues-help@...