Bug 221483 - [OpenGL] MAC OS Leopard: OpenGL error with snippet 195
Summary: [OpenGL] MAC OS Leopard: OpenGL error with snippet 195
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-05 05:34 EST by Karl Hans Kaese-Kassbaum CLA
Modified: 2017-07-04 05:25 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Hans Kaese-Kassbaum CLA 2008-03-05 05:34:58 EST
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.
Comment 1 Steve Northover CLA 2008-04-29 14:53:36 EDT
Kevin, can you confirm that this is happening
Comment 2 Karl Hans Kaese-Kassbaum CLA 2008-05-15 07:08:16 EDT
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!!
Comment 3 Kevin Barnes CLA 2008-05-16 12:19:10 EDT
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.
Comment 4 Scott Kovatch CLA 2008-05-16 13:32:30 EDT
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.
Comment 5 Karl Hans Kaese-Kassbaum CLA 2009-01-20 08:22:57 EST
The problem is still present in 3.5M4 and it prevents me from shipping a Mac version of my software.
Comment 6 Kevin Barnes CLA 2009-01-20 16:15:26 EST
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.
Comment 7 Kevin Barnes CLA 2009-01-20 16:21:43 EST
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 
Comment 8 Scott Kovatch CLA 2009-01-20 16:44:16 EST
Adding Mike S. The failure to quit is also an Apple JVM problem that I remember fixing, much like item #4
Comment 9 Kevin Barnes CLA 2010-01-04 15:40:32 EST
re comment #8: happens on Cocoa also. See bug 277485.
Comment 10 Karl Hans Kaese-Kassbaum CLA 2010-11-14 14:36:23 EST
This is still a problem with Eclipse 3.7M3.
Comment 11 Lakshmi P Shanmugam CLA 2017-07-04 05:25:10 EDT
Carbon is not a supported platform anymore. Cocoa Bug for this problem is bug 277485.