From 14de6c518d11fde8696f76b4bbe9768de65e0b4a Mon Sep 17 00:00:00 2001 From: kappaOne Date: Sun, 24 Mar 2013 17:39:39 +0000 Subject: [PATCH 1/7] Fix crash on close of the Display when using Java 7 on OS X --- src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m | 1 + 1 file changed, 1 insertion(+) diff --git a/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m b/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m index c1c0a9eb..64a5b804 100644 --- a/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m +++ b/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m @@ -225,6 +225,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nDestro [context_info->context performSelectorOnMainThread:@selector(clearDrawable) withObject:nil waitUntilDone:YES]; if (context_info->peer_info->isWindowed) { + [context_info->peer_info->window_info->view setOpenGLContext:nil]; [context_info->context release]; context_info->context = nil; context_info->peer_info->window_info->context = nil; From c53e957833e364aa0c8cdcf324e408ab1284abfe Mon Sep 17 00:00:00 2001 From: kappaOne Date: Sun, 24 Mar 2013 20:49:23 +0000 Subject: [PATCH 2/7] Remove dependency on Java Native Foundation framework, remove non working JAWT manually loading, change to use headers from JavaVM.framework when compiling due to JDK7 bug --- platform_build/macosx_ant/build.xml | 2 +- src/java/org/lwjgl/MacOSXSysImplementation.java | 13 ------------- .../macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m | 2 +- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/platform_build/macosx_ant/build.xml b/platform_build/macosx_ant/build.xml index 0cde0b42..589f2dca 100644 --- a/platform_build/macosx_ant/build.xml +++ b/platform_build/macosx_ant/build.xml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/java/org/lwjgl/MacOSXSysImplementation.java b/src/java/org/lwjgl/MacOSXSysImplementation.java index fa1d56da..5698ed8a 100644 --- a/src/java/org/lwjgl/MacOSXSysImplementation.java +++ b/src/java/org/lwjgl/MacOSXSysImplementation.java @@ -49,19 +49,6 @@ final class MacOSXSysImplementation extends J2SESysImplementation { static { // Manually start the AWT Application Loop java.awt.Toolkit.getDefaultToolkit(); - - // manually load libjawt.dylib into vm, needed since Java 7 - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - try { - System.loadLibrary("jawt"); - } catch (UnsatisfiedLinkError e) { - // catch and ignore an already loaded in another classloader - // exception, as vm already has it loaded - } - return null; - } - }); } public int getRequiredJNIVersion() { diff --git a/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m b/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m index b217509c..e0a52ed2 100644 --- a/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m +++ b/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m @@ -40,7 +40,7 @@ #import #include -#include +#include #include "awt_tools.h" #include "org_lwjgl_opengl_MacOSXCanvasPeerInfo.h" #include "context.h" From b83f27e9700fb8eea98d251ed9b050135ab453f0 Mon Sep 17 00:00:00 2001 From: kappaOne Date: Mon, 25 Mar 2013 12:35:06 +0000 Subject: [PATCH 3/7] undo some changes to the OS X build.xml file as it broke the nightly build server --- platform_build/macosx_ant/build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform_build/macosx_ant/build.xml b/platform_build/macosx_ant/build.xml index 589f2dca..5f05fc44 100644 --- a/platform_build/macosx_ant/build.xml +++ b/platform_build/macosx_ant/build.xml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From bc7061717ef93172558cba8ad7c1575efcc3385f Mon Sep 17 00:00:00 2001 From: kappaOne Date: Mon, 25 Mar 2013 14:06:42 +0000 Subject: [PATCH 4/7] Another attempt to try fix nightly builds --- platform_build/macosx_ant/build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform_build/macosx_ant/build.xml b/platform_build/macosx_ant/build.xml index 5f05fc44..4a9cc5ce 100644 --- a/platform_build/macosx_ant/build.xml +++ b/platform_build/macosx_ant/build.xml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From 38612a402d9ff3031e35365bb136463e77d4d5c7 Mon Sep 17 00:00:00 2001 From: kappaOne Date: Mon, 25 Mar 2013 22:14:17 +0000 Subject: [PATCH 5/7] third attempt to revert changes and fix nightly build server, gah! --- src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m b/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m index e0a52ed2..b217509c 100644 --- a/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m +++ b/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m @@ -40,7 +40,7 @@ #import #include -#include +#include #include "awt_tools.h" #include "org_lwjgl_opengl_MacOSXCanvasPeerInfo.h" #include "context.h" From 76f02c9187f556e097db126c5d92d02f95e0a3e4 Mon Sep 17 00:00:00 2001 From: kappaOne Date: Mon, 25 Mar 2013 22:55:46 +0000 Subject: [PATCH 6/7] Fix the now infamous "Could not get the JAWT interface" exception when running on OS X and Java 7 --- platform_build/macosx_ant/build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform_build/macosx_ant/build.xml b/platform_build/macosx_ant/build.xml index 4a9cc5ce..d5b5debe 100644 --- a/platform_build/macosx_ant/build.xml +++ b/platform_build/macosx_ant/build.xml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From 27f66983fceae37520f70100038f52c40cb18be9 Mon Sep 17 00:00:00 2001 From: kappaOne Date: Mon, 25 Mar 2013 23:08:45 +0000 Subject: [PATCH 7/7] bump OS X JNI version --- src/java/org/lwjgl/MacOSXSysImplementation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/lwjgl/MacOSXSysImplementation.java b/src/java/org/lwjgl/MacOSXSysImplementation.java index 5698ed8a..7bb82f4e 100644 --- a/src/java/org/lwjgl/MacOSXSysImplementation.java +++ b/src/java/org/lwjgl/MacOSXSysImplementation.java @@ -44,7 +44,7 @@ import java.lang.UnsatisfiedLinkError; * $Id$ */ final class MacOSXSysImplementation extends J2SESysImplementation { - private static final int JNI_VERSION = 23; + private static final int JNI_VERSION = 24; static { // Manually start the AWT Application Loop