Java3D 1.6 crashes JVM

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

Java3D 1.6 crashes JVM

runiter
Hi gouessej,
I have a Java3D application that was using 1.5.2 which worked great in Windows but in Mac OS X it always returns null for GraphicsConfiguration.

So I decided to upgrade to Java3D 1.6 (3D [dev] 1.6.0-pre9-daily-experimental daily) to see if that fixes it. However now it crashes the JVM in both Windows and Mac OS X.

It works fine in eclipse as a stand-alone application, however the "webstart" version crashes JVM in such a way that even the "hs_err_pid.log" file is not created! In the absence of hs_err_pid.log how can I debug this?

Here is the webstart link, try it and see if it crashes in your machine too:

http://www.runiter.com/webstart/gc3/grapher1.jnlp

P.S. Thanks for maintaining Java3D, I was glad to find out that it's not dead yet
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

Xerxes Rånby
Try run the application from command line using
javaws grapher1.jnlp

and attach the output.

The Graphing Calculator 3D application work here for me using Linux
icedtea-web 1.5pre+rbb1f288a297a+
java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
JamVM (build 1.6.0-devel, inline-threaded interpreter with stack-caching)
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

gouessej
Administrator
This post was updated on .
In reply to this post by runiter
I reproduce the crash under Windows 7 64 bits with Java 1.7 update 51. Something is printed in the console.

I get that in Events.log:
Graphing Calculator 3D 4.0
Serial Number:
Invalid.
Enabling UI anti-alias...
Initiating User Interface...
Locale = fr_FR
Switched to English Locale.
java.awt.Dimension[width=2,height=2]
creating MainPanel...
Initializing Java3D...
Initializing Java3D...Canvas3D
---VirtualUniverse Properties-------------------
3D [dev] 1.6.0-pre9-daily-experimental daily

j3d.pipeline = JOGL
j3d.renderer = OpenGL
j3d.specification.vendor =
j3d.specification.version = 1.6
j3d.vendor =
j3d.version = 1.6.0-pre9-daily-experimental daily
-------------------------------------------------
initiating graphics config...config = javax.media.j3d.JoglGraphicsConfiguration@7771d1
---Canvas3D Properties--------------------------
java.lang.NullPointerException
        at java.awt.Window.addToWindowList(Unknown Source)
        at java.awt.Window.init(Unknown Source)
        at java.awt.Window.<init>(Unknown Source)
        at java.awt.Frame.<init>(Unknown Source)
        at java.awt.Frame.<init>(Unknown Source)
        at javax.media.j3d.JoglPipeline.createQueryContext(JoglPipeline.java:6536)
        at javax.media.j3d.Canvas3D.createQueryContext(Canvas3D.java:4618)
        at javax.media.j3d.Canvas3D.createQueryContext(Canvas3D.java:3611)
        at javax.media.j3d.Renderer.doWork(Renderer.java:461)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)

DefaultRenderingErrorListener.errorOccurred:
CONTEXT_CREATION_ERROR: Renderer: Error creating Canvas3D graphics context for queryProperties()
graphicsDevice = D3DGraphicsDevice[screen=0]
canvas = runiter.grapher.math.Sheet$CapturingCanvas3D[canvas0,0,0,0x0,invalid]
java.lang.IllegalStateException: Canvas3D: Non-recoverable graphics configuration error
        at javax.media.j3d.Canvas3D.queryProperties(Canvas3D.java:3600)
        at runiter.grapher.math.Sheet.initCanvas3D(Sheet.java:136)
        at runiter.grapher.math.Sheet.initJava3DAndSheets(Sheet.java:105)
        at runiter.grapher.MainPanel.initJ3d(MainPanel.java:109)
        at runiter.grapher.MainPanel.<init>(MainPanel.java:86)
        at runiter.grapher.MainPanel.getInstance(MainPanel.java:78)
        at runiter.grapher.MainApplication.getMainPanel(MainApplication.java:40)
        at runiter.calculator.MainApplication.getJFrame(MainApplication.java:177)
        at runiter.grapher.MainApplication.getJFrame(MainApplication.java:116)
        at runiter.calculator.MainApplication.<init>(MainApplication.java:49)
        at runiter.grapher.MainApplication.<init>(MainApplication.java:30)
        at runiter.grapher.MainApplication.getInstance(MainApplication.java:24)
        at runiter.grapher.MainApplication.main(MainApplication.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.sun.javaws.Launcher.executeApplication(Unknown Source)
        at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
        at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
        at com.sun.javaws.Launcher.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
ReportError: Error: Canvas3D: Non-recoverable graphics configuration error
Would you like to send us the error log to help you with this problem?
GLDrawableFactory.shutdownImpl: Catched java.lang.IllegalStateException during factory shutdown #2/2 jogamp.opengl.egl.EGLDrawableFactory
#### Java Web Start Error:
#### Shutdown in progress

Edit.: I use a property in TUER to skip OpenGL-ES loading in desktop environments, it helped me to avoid crashes on some machines, maybe it would help you:
System.setProperty("jogl.disable.opengles","true");
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

runiter
I used System.setProperty("jogl.disable.opengles","true") however it still crashes. After using that flag the webstart seem to load fewer files but still ends up with an error and crash. Unfortunate as before the webstart console closes too quickly so I can't see what the error is. Could you please try my jnlp again and see what error you get?

http://www.runiter.com/webstart/gc3/grapher1.jnlp

I also tried the following in windows command prompt:
javaws -wait -verbose grapher1.jar

but that didn't help with seeing the error logs either. It seem to always start a new process and opens the gui based console which it quickly closes when it crashes.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

gouessej
Administrator
Disable the D3D pipeline too.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

runiter
I knew it wasn't d3d since the problem exists in Mac OS X also but I tried disabling anyways and it didn't solve the problem.

However, from the error log that you posted it seemed like it was coming from Canvas3D.queryProperties() so I removed that line from my code and vola! It works perfectly now in both Mac and Windows!

I also noticed that calling Canvas3D.queryProperties() was messing up my GUI focus a little because it seem to always try to create a new Frame and make it visible and then invisible again. That problem is also resolved now. I don't know if you like to fix whatever causing these problems in Canvas3D.queryProperties(), but in my case I decided that I simply don't need to call that method anymore.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

gouessej
Administrator
Thank you so much Runiter.

@Harvey What should we do? Maybe we should remove this crap, is it still useful?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

hharrison
Hmm, I'll have to look into it, I _thought_ that after the first call, queryProperties should be returning cached
data and not creating another query frame.  It's very possible this is not working properly anymore, but I don't recall changing anything even remotely recently that could've broken this.

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

runiter
hharrison wrote
I _thought_ that after the first call, queryProperties should be returning cached
data and not creating another query frame.
I called queryProperties only once, so you may be right about it being cached, but the problem is the first call.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

Julien
Hello All.

What is the status of this issue? I am running into exactly the same problem trying to run the IDV via webstart.

http://www.unidata.ucar.edu/software/idv/release/test/webstart/IDV/idv.jnlp

Moreover, has anyone ever successfully run a Java 3D 1.6 / Java 7 application over webstart? If yes, where is the jnlp?

Thanks.

-Julien
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

runiter
Well I resolved this problem by simply removing to call to Canvas3D.queryProperties() from my code.
Here is my jnlp which now works with Java3D 1.6 / Java 7:

http://www.runiter.com/graphing-calculator/online.htm

I could run your jnlp in my Windows 8 machine. It showed a map of North America but I couldn't figure out if the map is in Java3D or if I need to do something else to switch to 3D.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

Julien
Unfortunately, not calling queryProperties() will not work for me. First, I don't have control of the VisAD API making the call, and second I believe it would require deep surgery in VisAD to remove the dependence on queryProperties().

@Harvey, @Julien,

Is there any possibility we could see a fix for this problem in Java 3D? I spent the morning poking around java3d-core trying various workarounds, but I did not have any luck.

Also, I tried System.setProperty("jogl.disable.opengles","true"); with no luck.

Thanks.

-Julien C
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

hharrison
Hmm, this actually looks like the same crash being seen in https://jogamp.org/bugzilla/show_bug.cgi?id=983 as the queryProperties call causes a dummy context to be created.

Can you confirm again what OS version and Java version you are seeing this crash with?
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

Julien
Thanks for the response.

I am running Mac OS X 10.7.5

java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 crashes JVM

hharrison
Julien, could you try with the newly released -pre10 version, I want to know if this problem gets solved by the fix for null appcontexts.

http://jogamp.org/deployment/java3d/1.6.0-pre10/

Thanks,

Harvey
Reply | Threaded
Open this post in threaded view
|

queryProperties...

ThomasR
In reply to this post by Julien
We use queryProperties to obtain important information like the textureWidthMax and if non-power-of-two texture (NPOT) is supported by the graphics hardware.  Many of the VisAD based applications like IDV, McIDAS-V, HYDRA and others need to render large, high-resolution Earth remote sensing imagery so it's critical that we get this correct information to initiate rendering by tiles if the data dimensions exceed the textureWidthMax (otherwise you get a crap grey box in your display).  So please don't remove this, and if it's possible to make sure it's returning the correct information that would be extremely important.  I think not supporting this would be a major show-stopper for others as well.  How can we help?
 
Tom
Reply | Threaded
Open this post in threaded view
|

Re: queryProperties...

hharrison
There is no intention to remove queryProperties, that would be an API break.

This very likely could have been caused by null-appcontext in webstart that was fixed in -pre10, hopefully
julien will confirm at some point.

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: queryProperties...

Julien
Sorry for the long delay. I tried pre10 and the result is the same. No success. Just to be clear, I am using the JOGL available here:

http://jogamp.org/deployment/archive/master/gluegen_785-joal_531-jogl_1247-jocl_952-signed/archive/

and I am using the Java 3D available here

http://gouessej.wordpress.com/2012/08/01/java-3d-est-de-retour-java-3d-is-back/

And I double checked in our application that I was indeed running pre10.

Thanks.

-Julien
Reply | Threaded
Open this post in threaded view
|

Re: queryProperties...

hharrison
Could I get you to send me a fresh copy of the errors you are getting just so I can start fresh....thanks.

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: queryProperties...

Julien
Harvey,

Here you go:

https://gist.github.com/julienchastang/e2b54e232297438a253f

Thanks again,

-Julien
12