diff options
author | Sven Gothel <[email protected]> | 2019-09-08 12:56:57 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-09-08 12:56:57 +0200 |
commit | 534d764474cacf8bc380123cbfd164c7c55f236a (patch) | |
tree | f87a883e0962df6a8e6d9270967527fba943e37c /src/jogl | |
parent | 125e4bd1c8e0a8f4b434209b155e6cd0d8f09092 (diff) |
Buig 1389: Fix SIGSEGV on OpenJDK11 on [NSApplicationAWT sendEvent:]
Culprit of the crash and the non propagated action on NSApp main-thread
was _simply_ our OSXUtil_KickNSApp() 'kick alive'
NSApplicationDefined NSEvent sent to the NSApp.
Java11's NSApp code overrides sendEvent and handles
NSApplicationDefined + subtype=ExecuteBlockEvent
using the given data1 as a function pointer. 8-O
ExecuteBlockEvent defined as 0, which we have sent.
Simply passing subtype=8888 avoids this side-effect.
Whether it is still required to KickNSApp() is another question.
+++
Further, make code a bit more robuts regarding the offscreenSurfaceLayer
at JAWTWindow invalidate. I.e. if still not detached, do the late cleanup there.
This just in case the OSX Context callback to disassociate the drawable
has been missed.
Diffstat (limited to 'src/jogl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index 995ff870e..718216315 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -924,7 +924,7 @@ public class MacOSXCGLContext extends GLContextImpl // All CALayer lifecycle ops are deferred on main-thread final DetachGLLayerCmd dCmd = new DetachGLLayerCmd(cmd); if(DEBUG) { - System.err.println("MaxOSXCGLContext.NSOpenGLImpl.associateDrawable(false): "+dCmd); + System.err.println("MaxOSXCGLContext.NSOpenGLImpl.associateDrawable(false): "+dCmd+" - "+Thread.currentThread().getName()); } OSXUtil.RunOnMainThread(false, true /* kickNSApp */, dCmd); if( null != gl3ShaderProgram ) { |