Bug 469 - Regression in b281 causes JVM crash with GLCanvas
Summary: Regression in b281 causes JVM crash with GLCanvas
Status: VERIFIED DUPLICATE of bug 480
Alias: None
Product: Jogl
Classification: JogAmp
Component: windows (show other bugs)
Version: 2
Hardware: pc_x86_32 windows
: --- major
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2011-02-10 23:10 CET by Owen Dimond
Modified: 2011-03-22 00:35 CET (History)
3 users (show)

See Also:
Type: ---
SCM Refs:
Workaround: ---


Attachments
example application (5.29 KB, application/octet-stream)
2011-02-10 23:10 CET, Owen Dimond
Details
JVM crash output (9.39 KB, text/plain)
2011-02-10 23:11 CET, Owen Dimond
Details
output of etc\test.bat (3.85 KB, text/plain)
2011-02-10 23:13 CET, Owen Dimond
Details
stdout/stderr when setting -Djogl.debug=true (157.04 KB, text/plain)
2011-02-14 15:53 CET, Owen Dimond
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Dimond 2011-02-10 23:10:43 CET
Created attachment 226 [details]
example application

There appears to be a regression in JOGL2 builds b281 and later causing a JVM crash when using GLCanvas, using GLJPanel instead works. Even running etc\test.bat on the same machine (Windows XP, Nvidia 8400GS, driver 260.99) produces the crash.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x69b6c44d, pid=3756, tid=3820
#
# JRE version: 6.0_23-b05
# Java VM: Java HotSpot(TM) Client VM (19.0-b09 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [nvoglnt.dll+0x66c44d]
#
# An error report file with more information is saved as:
# C:\jogl-2.0-b300-20110210-windows-i586\hs_err_pid3756.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Comment 1 Owen Dimond 2011-02-10 23:11:49 CET
Created attachment 227 [details]
JVM crash output
Comment 2 Owen Dimond 2011-02-10 23:13:18 CET
Created attachment 228 [details]
output of etc\test.bat
Comment 3 Owen Dimond 2011-02-10 23:19:58 CET
Some additional information from a colleague who has an ATI Mobility Radeon X300 graphics card:

With b292 the JVM crashes
With b280 I get the exception below
With b266 it works

Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException:
Unable to set pixel format 5 for device context 0xffffffffb8014337: error
code 0
	at
com.jogamp.opengl.impl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.up
dateGraphicsConfiguration(WindowsWGLGraphicsConfigurationFactory.java:193)
	at
com.jogamp.opengl.impl.windows.wgl.WindowsWGLGraphicsConfiguration.updateGra
phicsConfiguration(WindowsWGLGraphicsConfiguration.java:140)
	at
com.jogamp.opengl.impl.windows.wgl.WindowsWGLDrawable.setRealizedImpl(Window
sWGLDrawable.java:71)
	at
com.jogamp.opengl.impl.GLDrawableImpl.setRealized(GLDrawableImpl.java:155)
	at
javax.media.opengl.awt.GLCanvas.validateGLDrawable(GLCanvas.java:555)
	at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:383)
	at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:484)
	at sun.awt.RepaintArea.paintComponent(Unknown Source)
	at sun.awt.RepaintArea.paint(Unknown Source)
	at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Comment 4 Sven Gothel 2011-02-12 05:52:48 CET
Dear Owen, would you mind trying with b303,
since I fixed a few PFD/GLCaps bugs since prev builds ? 
Thank you
Comment 5 Owen Dimond 2011-02-14 15:53:01 CET
Created attachment 230 [details]
stdout/stderr when setting -Djogl.debug=true

Same result using b303.
I noticed that setting -Djogl.debug=true causes the application to run correctly (with all builds since b281), so I have added the stdout/stderr in case this is useful.
Comment 6 Owen Dimond 2011-03-08 21:36:11 CET
Some further information on this problem. I noticed this post which mentions a problem with Nvidia driver 260.99:

http://forum.jogamp.org/Crash-with-AWT-based-windows-tp2234133p2234758.html

I tried switching to previous 258.96 and latest 266.58 and with both these the JVM crash now does not occur on my system. Turning off the thread optimization setting makes no change with 260.99.

However, the problem with ATI remains. I will try to get more information about this system to compare with these posts:

http://forum.jogamp.org/JOGL2-0-rc2-Win-XP-32-ATI-drivers-and-VM-crashes-tp2642286p2642286.html
https://jogamp.org/bugzilla/show_bug.cgi?id=480
https://jogamp.org/bugzilla/show_bug.cgi?id=478
Comment 7 Wade Walker 2011-03-16 03:48:45 CET
This does look like bug 480. The reason that turning the debug flags on can fix the problem is that the debug code makes a GLContext current on the main thread (during GLProfile.initSingleton()), which prevents the access violation crash later.
Comment 8 Sven Gothel 2011-03-20 18:52:22 CET
NV was resolved as I read in the forum and Comment 6.

See Comment 7, ATI WinXP 32bit bug ..

*** This bug has been marked as a duplicate of bug 480 ***
Comment 9 Owen Dimond 2011-03-21 20:42:29 CET
The HotSpot crash with ATI is now fixed with b357, however the GLException (see Comment 3) that occurred with b280 has now returned.

Windows XP 32-bit
ATI Radeon Mobility X300
Driver: 6.14.10.6568

Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException:
Unable to set pixel format 5 for device context 0xd012a4f: error code 0
	at
jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraph
icsConfiguration(WindowsWGLGraphicsConfigurationFactory.java:203)
	at
jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfiguration.updateGraphicsConf
iguration(WindowsWGLGraphicsConfiguration.java:136)
	at
jogamp.opengl.windows.wgl.WindowsWGLDrawable.setRealizedImpl(WindowsWGLDrawa
ble.java:71)
	at jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:155)
	at
javax.media.opengl.awt.GLCanvas.validateGLDrawable(GLCanvas.java:559)
	at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:382)
	at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:487)
	at sun.awt.RepaintArea.paintComponent(Unknown Source)
	at sun.awt.RepaintArea.paint(Unknown Source)
	at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Comment 10 Wade Walker 2011-03-22 00:35:53 CET
Hi Owen,

I just now tested build 358 on my Win XP 32-bit ATI Mobility Radeon x300, and etc\test.bat works properly. However, I noticed my drivers are considerably newer than your colleague's -- I have 8.162.0.0 (8/3/2005). Perhaps this is the problem now?