GLCanvas() crash on MacOS 10.15

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

GLCanvas() crash on MacOS 10.15

captainfat
I am trying to utilize JOGL for a project at work. I am using Java SE 14, the most recent version of JOGL, and Gluegen-rt. I can get the program to run on Windows 10, but I need it to work on MacOS 10.15 as well. The issue is that every time I call GLCanvas() the following error message appears:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007fff31959797 __exceptionPreprocess + 250
        1   libobjc.A.dylib                     0x00007fff6a653a9e objc_exception_throw + 48
        2   CoreFoundation                      0x00007fff3198211c -[NSException raise] + 9
        3   AppKit                              0x00007fff2eb6eddc -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 310
        4   AppKit                              0x00007fff2eb56842 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416
        5   AppKit                              0x00007fff2eb562b3 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
        6   libnativewindow_macosx.jnilib       0x000000015f87e3fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398
        7   ???                                 0x000000011a5f66b0 0x0 + 4737427120
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Java Result: 134


I have tried using older libraries and trying to use GLJPanel() as well, but neither changed the outcome. I am not sure how to even begin attacking this error. Any help would be appreciated!
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas() crash on MacOS 10.15

Wade Walker
Administrator
One thing to try might be the -XstartOnFirstThread VM switch. This is needed on Mac for SWT and GWT applications. Another thing to check would be the multithreadedness of your own app. Some OpenGL features are tricky to get right across threads, so if your app is multithreaded, that might be causing a problem.
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas() crash on MacOS 10.15

captainfat
So I guess I posted a little too soon. The issue was that i was not using the most recent version of JOGL. I thought that by selecting current->zip on the main page for jogamp.org I would get the most recent version, but instead it is JOGL 2.3.2. After downloading JOGL 2.4.0, everything works fine.
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas() crash on MacOS 10.15

gouessej
Administrator
For the follow-up:
https://stackoverflow.com/q/63569487/458157
Julien Gouesse | Personal blog | Website