when i test the following code the jvm will not shut down (java.exe stays in the process manager):
public static void main(String[] args) { GLProfile.initSingleton(); GLProfile.shutdown(ShutdownType.COMPLETE); System.exit(0); } is this the intended behaviour? is there another way to close jogl? regards david |
Administrator
|
Hi
As far as I know, calling GLProfile.initSingleton() is no more mandatory. I only call System.exit(0) to exit from a Java Web Start application anyway and that's enough.
Julien Gouesse | Personal blog | Website
|
public static void main(String[] args) {
GLProfile.getDefault(); GLProfile.shutdown(ShutdownType.COMPLETE); System.exit(0); } produces the same error |
Administrator
|
I just tested this on Windows 7 64-bit with Java 1.7.0_04 and the latest build of JOGL, and it terminates correctly. What platform, Java version, and JOGL version are you using?
|
windows 7 64-bit
java: java version "1.7.0" Java(TM) SE Runtime Environment (build 1.7.0-b147) Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode) jogl: jogl-2.0-b752-20120504-windows-amd64 |
Administrator
|
Weird, that's almost exactly the same as me. Maybe try updating your graphics card driver version? And if that doesn't work, we can try using Eclipse or jvisualvm to see what thread is holding it alive.
|
Administrator
|
On 06/12/2012 04:52 PM, Wade Walker [via jogamp] wrote:
> Weird, that's almost exactly the same as me. Maybe try updating your graphics > card driver version? And if that doesn't work, we can try using Eclipse or > jvisualvm to see what thread is holding it alive. > pls post the java stack: jstack -l <PID> > java_stack.txt and attach the txt file, thx. ~Sven signature.asc (910 bytes) Download Attachment |
the graphic card driver was already updated. visualvm stops profiling the threads after system.exit(0) (if i remove this line, it results in the same behaviour). i had to put in a thread.sleep to get jstack to work, otherwise i get "access is denied".
output from jstack: 2012-06-13 15:14:13 Full thread dump Java HotSpot(TM) Client VM (23.0-b21 mixed mode, sharing): "Service Thread" daemon prio=6 tid=0x02311c00 nid=0x1b28 runnable [0x00000000] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None "C1 CompilerThread0" daemon prio=10 tid=0x0230cc00 nid=0x1984 waiting on condition [0x00000000] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None "Attach Listener" daemon prio=10 tid=0x0230b800 nid=0xa84 waiting on condition [0x00000000] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None "Signal Dispatcher" daemon prio=10 tid=0x02308400 nid=0xe68 runnable [0x00000000] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None "Finalizer" daemon prio=8 tid=0x022f2400 nid=0x6a8 in Object.wait() [0x0462f000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x29a07728> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x29a07728> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source) Locked ownable synchronizers: - None "Reference Handler" daemon prio=10 tid=0x022f0800 nid=0xe58 in Object.wait() [0x044df000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x29a077b0> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:503) at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source) - locked <0x29a077b0> (a java.lang.ref.Reference$Lock) Locked ownable synchronizers: - None "main" prio=6 tid=0x023fc000 nid=0x17c4 waiting on condition [0x0058f000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at test.UnstoppableTest.main(UnstoppableTest.java:17) Locked ownable synchronizers: - None "VM Thread" prio=10 tid=0x022ef400 nid=0x1a60 runnable "VM Periodic Task Thread" prio=10 tid=0x02323800 nid=0x1ae4 waiting on condition JNI global references: 190 |
Administrator
|
On 06/13/2012 03:20 PM, david [via jogamp] wrote:
> the graphic card driver was already updated. visualvm stops profiling the > threads after system.exit(0) (if i remove this line, it results in the same > behaviour). i had to put in a thread.sleep to get jstack to work, otherwise i > get "access is denied". > The latter means that the JVM is not responsive, maybe b/c it's corrupted (SIGSEV, undefined state, ..). Otherwise it would be able to respond to jstack .. > output from jstack: > > "main" prio=6 tid=0x023fc000 nid=0x17c4 waiting on condition [0x0058f000] > java.lang.Thread.State: TIMED_WAITING (sleeping) > at java.lang.Thread.sleep(Native Method) > at test.UnstoppableTest.main(UnstoppableTest.java:17) > > Locked ownable synchronizers: > - None Shows that only your added 'sleep' is holding up the JVM, the other threads are internal ones. So it looks like that the JVM got corrupted. Guess it's time to properly pass the required information for a bug report to us, see FAQ / Bugreport in our Wiki. see: http://forum.jogamp.org/Problem-with-GLProfile-and-jogl2-rc2-td3447491.html#a3447546 Besides sending us the *attached* log files (a screen dump breaks the line and makes it unreadable), pls also [resend] the test case so we may have a chance to reproduce. Thank you. ~Sven signature.asc (910 bytes) Download Attachment |
Hi,
I had the same problem using GLProfile.getDefault(). This simple prevents the jvm from shutting down public static void main(String[] args) { GLProfile.getDefault(); System.exit(0); } Updating my graphics card driver solved the problem my configuration: windows 7 64b Amd Fire pro M4000 mobility |
Administrator
|
Hi
Thank you for the feedback. Please can you indicate the version number of your driver?
Julien Gouesse | Personal blog | Website
|
Free forum by Nabble | Edit this page |