Crash in native code - dispatch_wglMakeCurrent1

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

Crash in native code - dispatch_wglMakeCurrent1

beth
I'm getting a native code crash on every single JOGL program I try to run.  I've updated my graphics drivers twice (the first update to the graphics drivers seemed to be the problematic one), I've tried different versions of JOGL and different JREs and I'm frankly stumped.

Most recently, I tried running the test.bat file in the etc directory.  Here's what was printed in the test.log file:
-----------------------------------------------------------------------------------------------------
Platform: Windows XP 5.1 (os), x86 (arch) 4 cores
Platform: littleEndian true, 32Bit true, a-ptr bit-size 32
Platform: Java 1.6.0_26, Java HotSpot(TM) Client VM, Sun Microsystems Inc., http://java.sun.com/, is JavaSE: true
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.common
Extension Name: com.jogamp.common
Specification Title: GlueGen Java Bindings Generator
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: GlueGen Run-Time
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b20-20110302
Implementation Branch: rc
Implementation Commit: 2557207469fe581cbc9d51861953cdc88f1e9715
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: javax.media.nativewindow
Extension Name: javax.media.nativewindow
Specification Title: Native Window Interface API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: Native Window Interface Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b23-20110303
Implementation Branch: rc
Implementation Commit: bcf5d6ac871a29398b441df617923d3dd2cf35c1
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: javax.media.opengl
Extension Name: javax.media.opengl
Specification Title: Java Bindings for OpenGL API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: Java Bindings for OpenGL Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b23-20110303
Implementation Branch: rc
Implementation Commit: bcf5d6ac871a29398b441df617923d3dd2cf35c1
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.newt
Extension Name: com.jogamp.newt
Specification Title: NEWT API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: NEWT Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b23-20110303
Implementation Branch: rc
Implementation Commit: bcf5d6ac871a29398b441df617923d3dd2cf35c1
-----------------------------------------------------------------------------------------------------
An unrecoverable stack overflow has occurred.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x04389e87, pid=3812, tid=2692
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [nvoglnt.dll+0x939e87]
#
# An error report file with more information is saved as:
# C:\Documents and Settings\Test\Desktop\jogl-2.0-b23-20110303-windows-i586\hs_err_pid3812.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.
#


And here's just the top part of the hs_err_pid3812.log file (I can display the whole thing if it is useful):

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x04389e87, pid=3812, tid=2692
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [nvoglnt.dll+0x939e87]
#
# 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.
#

---------------  T H R E A D  ---------------

Current thread (0x02ec0400):  JavaThread "main-SharedResourceRunner" daemon [_thread_in_native, id=2692, stack(0x03230000,0x03280000)]

siginfo: ExceptionCode=0xc00000fd, ExceptionInformation=0x00000000 0x032309c0

Registers:
EAX=0x0000a390, EBX=0xffffffff, ECX=0x032309c0, EDX=0x04a50000
ESP=0x0327f9b8, EBP=0x04a70000, ESI=0x04ad0000, EDI=0x0003ffff
EIP=0x04389e87, EFLAGS=0x00010206

Top of Stack: (sp=0x0327f9b8)
0x0327f9b8:   00000000 0405f75a 0406a1f0 04ad0000
0x0327f9c8:   04a70000 0000d7ff 04a70000 03a344a4
0x0327f9d8:   00000000 03a31f24 041ddb4d 04a70000
0x0327f9e8:   00000000 00000000 032a0040 00000001
0x0327f9f8:   0015057c 03a31f00 00a31f00 00000000
0x0327fa08:   032a0040 00000000 04a70000 04092354
0x0327fa18:   0418c565 04a70000 00000000 00000001
0x0327fa28:   0327faa4 00010000 00000000 000b5660

Instructions: (pc=0x04389e87)
0x04389e67:   e0 08 0b c1 5f 5e 5b c9 c3 51 3d 00 10 00 00 8d
0x04389e77:   4c 24 08 72 14 81 e9 00 10 00 00 2d 00 10 00 00
0x04389e87:   85 01 3d 00 10 00 00 73 ec 2b c8 8b c4 85 01 8b
0x04389e97:   e1 8b 08 8b 40 04 50 c3 8b 44 24 04 83 c0 e0 c3


Register to memory mapping:

EAX=0x0000a390 is an unknown value
EBX=0xffffffff is an unknown value
ECX=0x032309c0 is pointing into the stack for thread: 0x02ec0400
EDX=0x04a50000 is an unknown value
ESP=0x0327f9b8 is pointing into the stack for thread: 0x02ec0400
EBP=0x04a70000 is an unknown value
ESI=0x04ad0000 is an unknown value
EDI=0x0003ffff is an unknown value


Stack: [0x03230000,0x03280000],  sp=0x0327f9b8,  free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [nvoglnt.dll+0x939e87]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  jogamp.opengl.windows.wgl.WGL.dispatch_wglMakeCurrent1(JJJ)Z+0
j  jogamp.opengl.windows.wgl.WGL.wglMakeCurrent(JJ)Z+29
j  jogamp.opengl.windows.wgl.WindowsWGLContext.createImpl()Z+281
j  jogamp.opengl.GLContextImpl.makeCurrentLocking()I+126
j  jogamp.opengl.GLContextImpl.makeCurrent()I+106
j  jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory$SharedResourceImplementation.createSharedResource(Ljava/lang/String;)Ljogamp/opengl/SharedResourceRunner$Resource;+226
j  jogamp.opengl.SharedResourceRunner.run()V+213
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
=>0x02ec0400 JavaThread "main-SharedResourceRunner" daemon [_thread_in_native, id=2692, stack(0x03230000,0x03280000)]
  0x02f7b800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=492, stack(0x03180000,0x031d0000)]
  0x02f79400 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=1280, stack(0x030d0000,0x03120000)]
  0x02b78400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1920, stack(0x02df0000,0x02e40000)]
  0x02b75400 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=3896, stack(0x02da0000,0x02df0000)]
  0x02b70800 JavaThread "Attach Listener" daemon [_thread_blocked, id=2816, stack(0x02d50000,0x02da0000)]
  0x02b6f000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2004, stack(0x02d00000,0x02d50000)]
  0x02b68400 JavaThread "Finalizer" daemon [_thread_blocked, id=2916, stack(0x02cb0000,0x02d00000)]
  0x02b66c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=4088, stack(0x02c60000,0x02cb0000)]
  0x002b6c00 JavaThread "main" [_thread_blocked, id=4076, stack(0x008c0000,0x00910000)]
...

Anyone have any ideas?
Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

beth
Just realized there is no information about the graphics card or driver in that post.
There are two graphics cards, both NVIDIA GeForce GTX 260
The driver is version 6.14.12.8026, which was released 8/3/11.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

Wade Walker
Administrator
Hmm, we have fixed an issue before (see https://jogamp.org/bugzilla/show_bug.cgi?id=480) where we could crash the driver, though it is (thankfully) rare. Could you set these

-Dnewt.debug=all -Dnativewindow.debug=all -Djogl.debug=all

in test.bat and post the log that results here? In bug 480, just setting the debug flags masked the problem through a side-effect, but even if that doesn't happen, this debug output will be helpful.
Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

beth
Ok, done.  I hope this helps:

-----------------------------------------------------------------------------------------------------
Platform: Windows XP 5.1 (os), x86 (arch) 4 cores
Platform: littleEndian true, 32Bit true, a-ptr bit-size 32
Platform: Java 1.6.0_26, Java HotSpot(TM) Client VM, Sun Microsystems Inc., http://java.sun.com/, is JavaSE: true
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.common
Extension Name: com.jogamp.common
Specification Title: GlueGen Java Bindings Generator
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: GlueGen Run-Time
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b20-20110302
Implementation Branch: rc
Implementation Commit: 2557207469fe581cbc9d51861953cdc88f1e9715
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: javax.media.nativewindow
Extension Name: javax.media.nativewindow
Specification Title: Native Window Interface API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: Native Window Interface Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b23-20110303
Implementation Branch: rc
Implementation Commit: bcf5d6ac871a29398b441df617923d3dd2cf35c1
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: javax.media.opengl
Extension Name: javax.media.opengl
Specification Title: Java Bindings for OpenGL API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: Java Bindings for OpenGL Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b23-20110303
Implementation Branch: rc
Implementation Commit: bcf5d6ac871a29398b441df617923d3dd2cf35c1
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.newt
Extension Name: com.jogamp.newt
Specification Title: NEWT API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: NEWT Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b23-20110303
Implementation Branch: rc
Implementation Commit: bcf5d6ac871a29398b441df617923d3dd2cf35c1
-----------------------------------------------------------------------------------------------------
java.lang.Throwable: main - Info: NativeWindowFactory.<init>
        at javax.media.nativewindow.NativeWindowFactory.<clinit>(NativeWindowFactory.java:119)
        at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1164)
        at javax.media.opengl.GLProfile.access$000(GLProfile.java:71)
        at javax.media.opengl.GLProfile$1.run(GLProfile.java:117)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:115)
        at javax.media.opengl.GLProfile.validateInitialization(GLProfile.java:1428)
        at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:1580)
        at javax.media.opengl.GLProfile.get(GLProfile.java:623)
        at javax.media.opengl.GLProfile.getDefault(GLProfile.java:480)
        at javax.media.opengl.GLProfile.getDefault(GLProfile.java:486)
        at com.jogamp.newt.opengl.GLWindow.main(GLWindow.java:907)
main - NativeWindowFactory.initSingleton(false)
JOGL/Java2D integration disabled
JAWTUtil: Has sun.awt.SunToolkit.awtLock/awtUnlock false
JAWTUtil: Has Java2D true
JAWTUtil: Is headless false
JAWTUtil: AWT Desktop hints 1
GDI.isFirstX11ActionOnProcess: false
NativeWindowFactory.registerFactory() interface javax.media.nativewindow.NativeWindow -> jogamp.nativewindow.NativeWindowFactoryImpl@1608e05
NativeWindowFactory.registerFactory() class java.awt.Component -> jogamp.nativewindow.NativeWindowFactoryImpl@1608e05
NativeWindowFactory firstUIActionOnProcess false
NativeWindowFactory isAWTAvailable true, defaultFactory jogamp.nativewindow.NativeWindowFactoryImpl@1608e05
GLProfile.init firstUIActionOnProcess: false, thread: main
-----------------------------------------------------------------------------------------------------
Platform: Windows XP 5.1 (os), x86 (arch) 4 cores
Platform: littleEndian true, 32Bit true, a-ptr bit-size 32
Platform: Java 1.6.0_26, Java HotSpot(TM) Client VM, Sun Microsystems Inc., http://java.sun.com/, is JavaSE: true
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.common
Extension Name: com.jogamp.common
Specification Title: GlueGen Java Bindings Generator
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: GlueGen Run-Time
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b20-20110302
Implementation Branch: rc
Implementation Commit: 2557207469fe581cbc9d51861953cdc88f1e9715
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: javax.media.nativewindow
Extension Name: javax.media.nativewindow
Specification Title: Native Window Interface API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: Native Window Interface Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b23-20110303
Implementation Branch: rc
Implementation Commit: bcf5d6ac871a29398b441df617923d3dd2cf35c1
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: javax.media.opengl
Extension Name: javax.media.opengl
Specification Title: Java Bindings for OpenGL API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: Java Bindings for OpenGL Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b23-20110303
Implementation Branch: rc
Implementation Commit: bcf5d6ac871a29398b441df617923d3dd2cf35c1
-----------------------------------------------------------------------------------------------------
GLDrawableFactory.static - Native OS Factory for: Windows: jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory
GraphicsConfigurationFactory.registerFactory() interface javax.media.nativewindow.AbstractGraphicsDevice -> jogamp.nativewindow.DefaultGraphicsConfigurationFactoryImpl@aa9835
GraphicsConfigurationFactory.registerFactory() class javax.media.nativewindow.windows.WindowsGraphicsDevice -> jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory@67ac19
GraphicsConfigurationFactory.registerFactory() class javax.media.nativewindow.awt.AWTGraphicsDevice -> jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory@1ff5ea7
main-SharedResourceRunner STARTED
main-SharedResourceRunner -> ready
GraphicsConfigurationFactory.registerFactory() class javax.media.nativewindow.egl.EGLGraphicsDevice -> jogamp.opengl.egl.EGLGraphicsConfigurationFactory@f38798
WindowsWGLDrawableFactory.enterThreadCriticalZone() - 0xffffffffffffffff - main
java.lang.Exception: Stack trace
        at java.lang.Thread.dumpStack(Unknown Source)
        at jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory.enterThreadCriticalZone(WindowsWGLDrawableFactory.java:142)
        at javax.media.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1296)
        at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1266)
        at javax.media.opengl.GLProfile.access$000(GLProfile.java:71)
        at javax.media.opengl.GLProfile$1.run(GLProfile.java:117)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:115)
        at javax.media.opengl.GLProfile.validateInitialization(GLProfile.java:1428)
        at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:1580)
        at javax.media.opengl.GLProfile.get(GLProfile.java:623)
        at javax.media.opengl.GLProfile.getDefault(GLProfile.java:480)
        at javax.media.opengl.GLProfile.getDefault(GLProfile.java:486)
        at com.jogamp.newt.opengl.GLWindow.main(GLWindow.java:907)
java.lang.Throwable: Info: GLProfile.initProfilesForDevice: WindowsGraphicsDevice[type Windows, connection decon, unitID 0, handle 0x0], isSet false
        at javax.media.opengl.GLProfile.initProfilesForDeviceImpl(GLProfile.java:1308)
        at javax.media.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1298)
        at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1266)
        at javax.media.opengl.GLProfile.access$000(GLProfile.java:71)
        at javax.media.opengl.GLProfile$1.run(GLProfile.java:117)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:115)
        at javax.media.opengl.GLProfile.validateInitialization(GLProfile.java:1428)
        at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:1580)
        at javax.media.opengl.GLProfile.get(GLProfile.java:623)
        at javax.media.opengl.GLProfile.getDefault(GLProfile.java:480)
        at javax.media.opengl.GLProfile.getDefault(GLProfile.java:486)
        at com.jogamp.newt.opengl.GLWindow.main(GLWindow.java:907)
GLProfile.init map decon, desktopCtxUndef true, eglCtxUndef true
GLProfile.init map GLProfile[GL4bc/GL4bc] on devide decon
GLProfile.init map default GLProfile[GL4bc/GL4bc] on device decon
GLProfile.init map GLProfile[GL3bc/GL3bc] on devide decon
GLProfile.init map GLProfile[GL2/GL2] on devide decon
GLProfile.init map GLProfile[GL2GL3/GL2] on devide decon
GLProfile.init map GLProfile[GL4/GL4] on devide decon
GLProfile.init map GLProfile[GL3/GL3] on devide decon
GLProfile.init map GLProfile[GL2ES2/GL2] on devide decon
GLProfile.init map *** no mapping for GLES2 on device decon
GLProfile.init map GLProfile[GL2ES1/GL2] on devide decon
GLProfile.init map *** no mapping for GLES1 on device decon
getOrCreateShared() decon: trying
main doAndWait START init: decon, release: null
main initializeAndWait set command init: decon, release: null
main-SharedResourceRunner woke up for device connection init: decon, release: null
main-SharedResourceRunner create Shared for: decon
RegisteredClassFactory getSharedClass (0) initialized: RegisteredClass[handle 0x400000, _dummyWindow_clazz0]
updateGraphicsConfiguration(using target): hdc 0x18010032
!!! user chosen caps GLCaps[on-scr, rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]
updateGraphicsConfigurationARB: SharedResource is null: WindowsGraphicsDevice[type Windows, connection decon, unitID 0, handle 0x0]
updateGraphicsConfigurationGDI: ChoosePixelFormat(HDC 0x18010032) = 7, idx 6 (LastError: 0)
chooseCapabilities: Using recommendedIndex: idx 6
!!! chosen pfdID (GDI): native recommended 7, caps GLCaps[7 gdi: on-scr, rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms: 24/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]
!!! setPixelFormat (GDI): hdc 0x18010032, 0 -> 7
*** setCapsPFD: GLCaps[7 gdi: on-scr, rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms: 24/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]
!!! WindowsDummyWGLDrawable: WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type Windows, connection decon, unitID 0, handle 0x0], idx 0], pfdID 7, ARB-Choosen false,
        requested GLCaps[on-scr, rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]],
        chosen    GLCaps[7 gdi: on-scr, rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms: 24/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]]
An unrecoverable stack overflow has occurred.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x04389e87, pid=4060, tid=1892
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [nvoglnt.dll+0x939e87]
#
# An error report file with more information is saved as:
# C:\Documents and Settings\Test\Desktop\jogl-2.0-b23-20110303-windows-i586\hs_err_pid4060.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.
#
Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

Wade Walker
Administrator
Well, nothing looks obviously wrong with the debug output (unfortunately). It seems like there are two possibilities:

1. An Open GL driver bug. Did you say that this worked fine until you updated your drivers, or has it always been broken?
2. JOGL hasn't set up the GL context correctly on the thread, so the driver crashes when it tries to use the context.

One thing you might try is using JOGL 1.1.1a (from http://download.java.net/media/jogl/builds/archive/jsr-231-1.1.1a/) to see if it works any better. If JOGL 1.1.1a works, we would know that this is definitely a JOGL 2 bug, which would be invaluable. It looks like you're using the GL2 profile, so JOGL 1.1.1a may have all the functionality you need (JOGL 1.1.1a doesn't support GL3 or GL4). If you want to try this, I can assist you in changing any code you have from JOGL 1 to JOGL 2 (mostly it's just a matter of changing "GL2" to "GL").

I've also got some ideas about how we could add more self-checking to JOGL 2 to make sure it's setting up contexts correctly, but I need to run that past Sven before I try it out, and it would be nice to have confirmation that this is really a JOGL 2 bug before I try it, since it could require a lot of new code.
Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

beth
Thank you so much for you help.
JOGL definitely worked on this machine before.  The only thing that seemed to have changed when it became broken was that the graphics drivers were updated.  In the course of trying to fix this bug, I updated the graphics drivers again to the most recent version, but that did not fix anything.

Unfortunately (or perhaps fortunately...), JOGL 1.1.1a is also broken.  It crashed on even the simplest of programs:
public class Test3
{
    public static void main(String[] args)
    {
        JFrame frame = new JFrame("JOGL Test");
        GLJPanel panel = new GLJPanel();
        frame.setContentPane(panel);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(300, 300);
        frame.setVisible(true);
    }
}
but no stack trace or useful information was given.

Based on this, it might seem reasonable that there is a problem with OpenGL and the graphics driver.  I tried running the OpenGL Extensions Viewer from realtechVR, and that seemed to work just fine aside from a few minor errors about missing textures.  So I am back to assuming that the problem must be related to JOGL, somehow.

Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

Wade Walker
Administrator
Hi Beth,

Yes, it does seem like there's a real possibility that this is a JOGL bug somehow. The next step of debugging could take some effort, though -- do you have the time to help out?

What I might do (pending Sven's approval) is create some more logging/debugging code in the driver-related parts of JOGL, then ask you to try my private builds on your machine to gather more information about what's going on.

We've seen these sorts of problems before, and the only way we've debugged them previously is by Sven logging into the user's machine, which is very intrusive and time-consuming. We really need a better and easier way to do this, which is why I'd like to develop some more logging/debugging code if you're available to test out the results.
Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

beth
Yes, I have time to help out.
Thank you SO much!  I really appreciate you going to the extra effort on this.
Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

Wade Walker
Administrator
Hi Beth,

I've created a bug report for this, at https://jogamp.org/bugzilla/show_bug.cgi?id=513. Could you CC yourself on that report so we can interact there instead of on the forum?

Also, just as a confirmation that OpenGL really works on your system via C/C++, could you run the Geeks3D GPU caps viewer? You can find it at http://www.ozone3d.net/gpu_caps_viewer/, just scroll down past the spammy ads to find the real download link). You should be able to see the OpenGL caps, and you should also be able to run the OpenGL demos. If the demos run successfully, that's final confirmation that the fault is in JOGL somehow. Please paste the caps and a list of the demos that run into the bug report for future reference.

I'll get started on the logging code and let you know on the bug report page when I've got a version ready.
Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

Wade Walker
Administrator
Fixed. The problem was caused by an NVIDIA driver change that greatly increased its stack usage -- a single function call inside the driver consumes 300 KB of stack! Increasing the JVM's C stack size with -Xss fixes the problem.

See the bug page at https://jogamp.org/bugzilla/show_bug.cgi?id=513 for more details, and to laugh at how many bizarre and difficult things I tried before finding the (retrospectively obvious) answer .
Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

Sven Gothel
Administrator
On Friday, October 28, 2011 11:21:58 PM Wade Walker [via jogamp] wrote:
>
> Fixed. The problem was caused by an NVIDIA driver change that greatly
> increased its stack usage -- a single function call inside the driver
> consumes 300 KB of stack! Increasing the JVM's C stack size with -Xss fixes
> the problem.

wow :)

>
> See the bug page at https://jogamp.org/bugzilla/show_bug.cgi?id=513 for more
> details, and to laugh at how many bizarre and difficult things I tried
> before finding the (retrospectively obvious) answer .

You sir, earned the medal of persistence!

Actually your analysis also proofs that our code is OK,
awesome review.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

gouessej
Administrator
In reply to this post by Wade Walker
Nice job. Could you do something to add these complementary logs into the master branch please? It would be nice for me before I plan to test some buggy hardwares (Matrox Millenium G200 and ATI Radeon 9250 Pro with XOrg driver).
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Crash in native code - dispatch_wglMakeCurrent1

Wade Walker
Administrator
Yes, I'll try adding the logging code to the master next. I just need to clean up a few things to make it less intrusive.