Exception in JoglPipeline#freeDisplayList

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Exception in JoglPipeline#freeDisplayList

Manu
Hi,

A user of Sweet Home 3D just reported me that he got twice this stack trace with Java 3D 1.6.0pre10 / JOGL 2.1.5:
 java.lang.NullPointerException
	at javax.media.j3d.JoglPipeline.freeDisplayList(JoglPipeline.java:7628)
	at javax.media.j3d.Canvas3D.freeDisplayList(Canvas3D.java:4886)
	at javax.media.j3d.RenderMolecule.releaseAllPrimaryDisplayListResources(RenderMolecule.java:2228)
	at javax.media.j3d.RenderBin.freeAllDisplayListResources(RenderBin.java:6862)
	at javax.media.j3d.Canvas3D.freeAllDisplayListResources(Canvas3D.java:4586)
	at javax.media.j3d.Canvas3D.freeContextResources(Canvas3D.java:4581)
	at javax.media.j3d.Renderer.doWork(Renderer.java:367)
	at javax.media.j3d.J3dThread.run(J3dThread.java:271)
As it didn't prevent him from continuing with the application, I guess it's a minor issue but still, it could be nice to fix it.
Thanks
Emmanuel Puybaret
Reply | Threaded
Open this post in threaded view
|

Re: Exception in JoglPipeline#freeDisplayList

gouessej
Administrator
Hi

Please use the latest version of Java3D (currently 1.6.0 pre11) with JOGL 2.2.4. I remind you that I fixed a bug which impacts Java3D on some machines under Windows.

Moreover, it would be fine if you gave us a small test case to reproduce your bug. I have looked at our code:
https://github.com/hharrison/java3d-core/blob/master/src/classes/share/javax/media/j3d/JoglPipeline.java#L7628
https://github.com/hharrison/java3d-core/blob/master/src/classes/share/javax/media/j3d/JoglPipeline.java#L8772
https://github.com/hharrison/java3d-core/blob/master/src/classes/share/javax/media/j3d/Renderer.java#L367

Please enable the assertions with -ea and run your software again. There is an assertion somewhere. It would tell us whether the Java3D Context is null.

Actually, in my humble opinion, the call of Canvas3D.freeContextResources() should be moved into the braces above in the renderer as calling it when there is no Java3D Context is useless. I don't think that JoglContext can be bound to nothing (no GLContext).

I thank you for posting your stack trace but please give us a test case. A stack trace isn't enough.

Edit.: When I see this code, I still think that it's overcomplicated and useless. Using display lists is a bad idea and Java3D should rely directly on GLCanvas and GLJPanel instead of doing its own wrapping and poor management of the context.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Exception in JoglPipeline#freeDisplayList

Manu
Thanks Julien for your answer.
As said previously, it's just a stack trace that a user reported. He activated the Java console to help me fix an other bug and encounter this stack trace but I fear that it will be difficult to get a small test case. Anyway, your comments are always useful to improve Java 3D.
For your information, I still use the pre10 with a previous version of JOGL because Harvey couldn't fix yet a bug I reported on pre11.
Emmanuel Puybaret
Reply | Threaded
Open this post in threaded view
|

Re: Exception in JoglPipeline#freeDisplayList

gouessej
Administrator
You're welcome.

I advise you to build Java 3D yourself with my suggestion to fix the bug occurring while freeing the display lists. I spent about 10 days on the bug 1078, I don't think I will have enough time to fix the other bug but this suggestion should be very helpful to know where you have something to tinker to make it work.

Sorry to be a bit harsh sometimes but I'm not sure that we will succeed in fixing some bugs that would require a redesign of the engine or that impact some core classes.
Julien Gouesse | Personal blog | Website