GL 4.3 Debug-Callback Setup Crash

Started by jakj, November 10, 2012, 14:11:35

Previous topic - Next topic

jakj

I tried to do the following, but it crashes the JVM, and I don't know how to get any useful debugging information out of that.

GL43 . glDebugMessageCallback ( new KHRDebugCallback ( new KHRDebugCallback . Handler ( )
		{
			public void handleMessage ( int Source , int Type , int Id , int Severity , String Message )
			{
				Log . Log ( "GL Debug: " + Source + " " + Type + " " + Id + " " + Severity + " " + Message ) ;
			}
		} ) ) ;

		GL43 . glDebugMessageInsert ( GL43 . GL_DEBUG_SOURCE_APPLICATION , GL43 . GL_DEBUG_TYPE_OTHER , 1123 , GL43 . GL_DEBUG_SEVERITY_NOTIFICATION , "Foo." ) ;


If I comment out the callback setup, the program runs fine (but obviously doesn't print out the inserted error). If I comment out the error insertion, the program runs fine (but I don't know whether or not it works, because I'm not causing GL to emit any errors in the program). If I comment out the logging line within the callback (making it an empty body), it still crashes.

LWJGL 2.9.0 nightly, newest nVidia beta driver, GTX 460, Windows 7 64-bit, Java 7u9 64-bit.

spasi

Could you attach the crash dump the JVM produces? I don't have access to a decent NV GPU atm and AMD hasn't released a 4.3 driver yet, so I won't be able to reproduce it.

jakj

I'd love to, if I could figure out where it's putting the crash dump. I already checked my C: root directory, my desktop, and my application's execution directory.

I even just tried with the -XX:HeapDumpPath= option, and nothing. I really don't think it's even generating a dump.

spasi

Is ARB_debug_output available? Does it work if you try that instead? I can verify that it works here on AMD.

jakj

Using ARBDebugOutput/ARBDebugOutputCallback instead of GL43/KHRDebugCallback worked perfectly fine, so the crash is in only the latter.

Code that worked:

ARBDebugOutput . glDebugMessageCallbackARB ( new ARBDebugOutputCallback ( new ARBDebugOutputCallback . Handler ( )
		{
			public void handleMessage ( int Source , int Type , int Id , int Severity , String Message )
			{
				Log . Log ( "GL Debug: " + Source + " " + Type + " " + Id + " " + Severity + " " + Message ) ;
			}
		} ) ) ;

		ARBDebugOutput . glDebugMessageInsertARB ( ARBDebugOutput . GL_DEBUG_SOURCE_APPLICATION_ARB ,
			ARBDebugOutput . GL_DEBUG_TYPE_OTHER_ARB , 1123 , ARBDebugOutput . GL_DEBUG_SEVERITY_HIGH_ARB , "Foo." ) ;

elFarto

I've got the same issue. ARBDebugOutput works, but KHRDebug and GL43 crash. GTX570, driver version 320.18, Windows 7, JDK 6 64-bit or 7 64-bit.

I always get an error like:

Stack: [0x0000000002af0000,0x0000000002bf0000],  sp=0x0000000002bef6c8,  free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [lwjgl64.dll+0x4a5f8]  Java_org_lwjgl_opengl_WindowsRegistry_nQueryRegistrationKey+0x3c288

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.lwjgl.opengl.GL43.nglDebugMessageInsert(IIIIIJJ)V+0
j  org.lwjgl.opengl.GL43.glDebugMessageInsert(IIIILjava/lang/CharSequence;)V+37
j  lwjgltest.Main2.main([Ljava/lang/String;)V+232
v  ~StubRoutines::call_stub


Regards
elFarto

spasi

Fixed, was a stupid typo, please try the next build.

elFarto

Thanks, that fixed the issue.

Regards
elFarto