aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-09-01 05:19:14 +0200
committerSven Gothel <[email protected]>2015-09-01 05:19:14 +0200
commit85b32bac4f031dbdb55caa380d5a20440aecbbbd (patch)
tree7c458b43e770b6046c7f918b8383077432389488 /src/nativewindow/classes
parentaacc8afdca0b1376f91dcc68aa3ae3b39c7aba51 (diff)
Bug 1212 - OSX: Crash using CALayer at UnsetJAWTRootSurfaceLayer0(..) w/ Java 1.8.0_60
- OSX 10.10.5 - Java 1.8.0_60 Crash using CALayer at UnsetJAWTRootSurfaceLayer0(..) as called within MacOSXJAWTWindow.invalidateNative() (caller: destroy()) on the MainThread. It has been observed that the JAWT_SurfaceLayers protocol instance 'surfaceLayers' has been pulled beforehand. 'surfaceLayers' is fetched from the locked JAWT instance via JAWT_DrawingSurfaceInfo's platformInfo. It now seems required to retain the instance at GetJAWTSurfaceLayersHandle0 and release it at UnsetJAWTRootSurfaceLayer0 to keep it alive. +++ Manually executed 'ant junit.run' on OSX, no failures or errors.
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
index 264bdf9d3..5a0c8a79a 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
@@ -101,14 +101,15 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface {
OSXUtil.RunOnMainThread(false, true /* kickNSApp */, new Runnable() {
@Override
public void run() {
+ if( 0 != jawtSurfaceLayersHandle) {
+ // null rootSurfaceLayer OK
+ UnsetJAWTRootSurfaceLayer0(jawtSurfaceLayersHandle, rootSurfaceLayer);
+ }
+ jawtSurfaceLayersHandle = 0;
if( 0 != rootSurfaceLayer ) {
- if( 0 != jawtSurfaceLayersHandle) {
- UnsetJAWTRootSurfaceLayer0(jawtSurfaceLayersHandle, rootSurfaceLayer);
- }
OSXUtil.DestroyCALayer(rootSurfaceLayer);
rootSurfaceLayer = 0;
}
- jawtSurfaceLayersHandle = 0;
}
});
}