Community
Participate
Working Groups
Running the OpenGL snippet 195 on Mac OS Leopard (10.5.2) and lwjgl library 1.1.4 and swt M20080221-1800 leads to the following error : > 2008-02-26 13:40:44.920 java[279:80f] [Java CocoaComponent compatibility mode]: Enabled > 2008-02-26 13:40:44.923 java[279:80f] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000 > Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException > at apple.awt.CGraphicsEnvironment.displayChanged(CGraphicsEnvironment.java:65) > at apple.awt.CToolkit$4.run(CToolkit.java:1259) > at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) > at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) > at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) > at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) > at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) This message shows up in the console window while the programm is running. The programm does not abort. On programm exit the shell closes, but the java icon in the dock does not disappear and about some minutes later you get > Invalid memory access of location 00000000 eip=0045c2ab On Windows and Linux there is no problem with the snippet.
Kevin, can you confirm that this is happening
The problem remains with swt3.4M7. Console output: 2008-05-15 12:50:36.955 java[522:80f] [Java CocoaComponent compatibility mode]: Enabled 2008-05-15 12:50:36.957 java[522:80f] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000 Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at apple.awt.CGraphicsEnvironment.displayChanged(CGraphicsEnvironment.java:65) at apple.awt.CToolkit$4.run(CToolkit.java:1259) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) Some seconds after closing the main shell: A system error message appears telling that the swt program has been terminated unexpectedly due to an error in swt-carbon-3442.jnilib. It would be great to have that fixed in the final release of 3.4!!
I've never seen the Invalid memory access, however, the NPE happens every time on Leopard and the application doesn't quit properly on either Leopard or Tiger.
The NPE is not fatal and can be ignored. It was fixed in Java 6, FWIW. I know I back-ported it to Java 5, but when that will be released is beyond my control at this point. As to the crash, if you can reproduce it, please attach the crash log. Launch Console.app and look for a java crash log. When I get a chance I'll run the snippet and see if there's any obvious problems at quit.
The problem is still present in 3.5M4 and it prevents me from shipping a Mac version of my software.
I couldn't find an LWJGL 1.1.4 download, but Snippet195 works for me running SWT from HEAD with LWJGL 2.0.1. Could you please paste or attach the entire CrashReporter log for the crash that you are seeing.
oops... I see the problem now. The shell closes, but the application doesn't terminate. I was looking for a an invalid memory access, but that doesn't happen. When it's hung the thread state is this: Full thread dump Java HotSpot(TM) Client VM (1.5.0_16-133 mixed mode, sharing): "DestroyJavaVM" prio=5 tid=0x010014a0 nid=0xb0801000 waiting on condition [0x00000000..0xb0800060] "Java2D Disposer" daemon prio=10 tid=0x01010b60 nid=0x905e00 in Object.wait() [0xb0e17000..0xb0e17d90] at java.lang.Object.wait(Native Method) - waiting on <0x25610060> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:120) - locked <0x25610060> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:136) at sun.java2d.Disposer.run(Disposer.java:125) at java.lang.Thread.run(Thread.java:613) "" prio=6 tid=0x0100f460 nid=0x8f4a00 in Object.wait() [0xb0d96000..0xb0d96d90] at java.lang.Object.wait(Native Method) - waiting on <0x25a98ca8> (a java.awt.EventQueue) at java.lang.Object.wait(Object.java:474) at java.awt.EventQueue.getNextEvent(EventQueue.java:345) - locked <0x25a98ca8> (a java.awt.EventQueue) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:216) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) "AWT-Shutdown" prio=5 tid=0x0100d800 nid=0x890000 in Object.wait() [0xb0d0c000..0xb0d0cd90] at java.lang.Object.wait(Native Method) - waiting on <0x25a91750> (a java.lang.Object) at java.lang.Object.wait(Object.java:474) at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259) - locked <0x25a91750> (a java.lang.Object) at java.lang.Thread.run(Thread.java:613) "Thread-0" daemon prio=5 tid=0x0100ba50 nid=0xa0806720 runnable [0x00000000..0xbfffe998] "Low Memory Detector" daemon prio=5 tid=0x01009040 nid=0x81a200 runnable [0x00000000..0x00000000] "CompilerThread0" daemon prio=9 tid=0x01008590 nid=0x819400 waiting on condition [0x00000000..0xb0b077d8] "Signal Dispatcher" daemon prio=9 tid=0x01008150 nid=0x817000 waiting on condition [0x00000000..0x00000000] "Finalizer" daemon prio=8 tid=0x010079a0 nid=0x815e00 in Object.wait() [0xb0a05000..0xb0a05d90] at java.lang.Object.wait(Native Method) - waiting on <0x25a7e5b8> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:120) - locked <0x25a7e5b8> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:136) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) "Reference Handler" daemon prio=10 tid=0x010075e0 nid=0x814600 in Object.wait() [0xb0984000..0xb0984d90] at java.lang.Object.wait(Native Method) - waiting on <0x25a7e400> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:474) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116) - locked <0x25a7e400> (a java.lang.ref.Reference$Lock) "VM Thread" prio=9 tid=0x01006d30 nid=0x813800 runnable "VM Periodic Task Thread" prio=9 tid=0x01009b80 nid=0x805c00 waiting on condition "Exception Catcher Thread" prio=10 tid=0x010016f0 nid=0x80b400 runnable
Adding Mike S. The failure to quit is also an Apple JVM problem that I remember fixing, much like item #4
re comment #8: happens on Cocoa also. See bug 277485.
This is still a problem with Eclipse 3.7M3.
Carbon is not a supported platform anymore. Cocoa Bug for this problem is bug 277485.