Login  Register

Crash in native code - dispatch_wglMakeCurrent1

Posted by beth on Aug 23, 2011; 9:46pm
URL: https://forum.jogamp.org/Crash-in-native-code-dispatch-wglMakeCurrent1-tp3279419.html

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!