[CLOSED] 'Getting started' code crashes OSX10.11

Started by davidtriphon, November 07, 2015, 02:19:20

Previous topic - Next topic

davidtriphon

Hello, new user here.

I doubt this is a bug, but it is keeping me from using LWJGL at all, and I need support to try to fix it.

I properly inserted the LWJGL library into my eclipse environment (3.0.0b build 54) and pasted in the tutorial code from the getting started page. My compiler says everything is completely fine, but when I run it, it crashes.

Excerpt from Mac crash log: (full crash file attached)
Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY


Console log inside eclipse compiler:
Hello LWJGL 3.0.0b build 54!
2015-11-06 17:59:37.695 java[1847:131501] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /Library/Caches/com.apple.xbs/Sources/Foundation/Foundation-1255.1/Misc.subproj/NSUndoManager.m:359
2015-11-06 17:59:37.696 java[1847:131501] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2015-11-06 17:59:37.696 java[1847:131501] (
	0   CoreFoundation                      0x00007fff97172e32 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff872344fa objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff97177b0a +[NSException raise:format:arguments:] + 106
	3   Foundation                          0x00007fff8f025e16 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
	4   Foundation                          0x00007fff8efaaf31 +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 170
	5   AppKit                              0x00007fff88fa4dca -[NSApplication run] + 844
	6   libglfw.dylib                       0x000000011fbbc7ae initializeAppKit + 1342
	7   libglfw.dylib                       0x000000011fbbbec2 _glfwPlatformCreateWindow + 34
	8   libglfw.dylib                       0x000000011fbb87f1 glfwCreateWindow + 513
	9   ???                                 0x000000010319e954 0x0 + 4346997076
)
2015-11-06 17:59:37.696 java[1847:131501] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /Library/Caches/com.apple.xbs/Sources/Foundation/Foundation-1255.1/Misc.subproj/NSUndoManager.m:359
2015-11-06 17:59:37.696 java[1847:131501] An uncaught exception was raised
2015-11-06 17:59:37.696 java[1847:131501] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2015-11-06 17:59:37.696 java[1847:131501] (
	0   CoreFoundation                      0x00007fff97172e32 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff872344fa objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff97177b0a +[NSException raise:format:arguments:] + 106
	3   Foundation                          0x00007fff8f025e16 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
	4   Foundation                          0x00007fff8efaaf31 +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 170
	5   AppKit                              0x00007fff88fa4e66 -[NSApplication run] + 1000
	6   libglfw.dylib                       0x000000011fbbc7ae initializeAppKit + 1342
	7   libglfw.dylib                       0x000000011fbbbec2 _glfwPlatformCreateWindow + 34
	8   libglfw.dylib                       0x000000011fbb87f1 glfwCreateWindow + 513
	9   ???                                 0x000000010319e954 0x0 + 4346997076
)
2015-11-06 17:59:37.696 java[1847:131501] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff97172e32 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff872344fa objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff97177b0a +[NSException raise:format:arguments:] + 106
	3   Foundation                          0x00007fff8f025e16 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
	4   Foundation                          0x00007fff8efaaf31 +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 170
	5   AppKit                              0x00007fff88fa4e66 -[NSApplication run] + 1000
	6   libglfw.dylib                       0x000000011fbbc7ae initializeAppKit + 1342
	7   libglfw.dylib                       0x000000011fbbbec2 _glfwPlatformCreateWindow + 34
	8   libglfw.dylib                       0x000000011fbb87f1 glfwCreateWindow + 513
	9   ???                                 0x000000010319e954 0x0 + 4346997076
)
libc++abi.dylib: terminating with uncaught exception of type NSException


I'm running a Mac with OS X 10.11 installed, and since I've installed El Capitan, I've had other applications that use OpenGL crash with the exact same error note "EXC_CORPSE_NOTIFY". However, I know there are other people with El Capitan installed that have not crashed in the same circumstance.

I am suspicious that a specific function caused the crash, and would not mind being told what to mess around with to figure out which function causes it to crash. If you are familiar with whatever this is and know a simple quick workaround, I am all ears. Especially since it might solve my other crashing problems.

spasi

You must launch the JVM with -XstartOnFirstThread. In build 3.0.0b #55 or later there is a new check for this situation that triggers an exception instead of the crash you're seeing.

davidtriphon

Thank you! It took me a little bit to figure out how to do that in eclipse, but I got it working. I appreciate that you spent some time helping me when you probably had more important things to do. Wish me luck!