From 4fad4869d4a929739c830f6ce3ac171d8dd5427a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 21 Feb 2020 14:58:10 +0100 Subject: Bug 1398: Importing Jani's native test, attempting to reproduce the crash using XCode 11 and JOGL 2.3.2 as well as current tip This change imports 'jani@nexcus.com' patch as reported and provided in Bug 1398. I can not execute this patch properly, as received a error message regarding missing Info.plist at start. --- .../bug1398/Bug1398macOSContextOpsOnMainThread.c | 241 +++++++++++++++++++++ .../Bug1398macOSContextOpsOnMainThread.java | 126 +++++++++++ src/test-native/bug1398/make-bug1398.sh | 6 + 3 files changed, 373 insertions(+) create mode 100644 src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c create mode 100644 src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java create mode 100755 src/test-native/bug1398/make-bug1398.sh (limited to 'src/test-native/bug1398') diff --git a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c new file mode 100644 index 000000000..08dd7d7ac --- /dev/null +++ b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c @@ -0,0 +1,241 @@ +#include +#include +#include +#include + +#define DEBUG_TRACE 1 +#define TRACE(fmt, ...) \ + do { if (DEBUG_TRACE) fprintf(err, "%s:%d:%s(): " fmt "\n", __FILE__, __LINE__, __func__, __VA_ARGS__); fflush(err); } while (0) + +// JNI_CreateJavaVM +typedef jint (JNICALL CREATEVM)(JavaVM **pvm, void **env, void *args); + +void die(JNIEnv *env); + +@interface AppDelegate : NSObject + +@end + +FILE *err = NULL; +JavaVM *jvm = NULL; + +static const char *JNI_CREATEJAVAVM = "JNI_CreateJavaVM"; +void *jvm_lib = NULL; + +void *create_vm(const char *jvm_lib_path) +{ + void *sym = NULL; + jvm_lib = dlopen(jvm_lib_path, RTLD_LAZY | RTLD_GLOBAL); + if (jvm_lib) { + TRACE("Found libjli.dylib%s", ""); + sym = dlsym(jvm_lib, JNI_CREATEJAVAVM); + } else { + TRACE("Unable to find libjli.dylib%s", ""); + } + return sym; +} + +static void *launchJava(void *ptr) +{ + int k = 0; + + JNIEnv *env = NULL; + JNINativeMethod nm_activity[20]; + jint res; + jclass cls; + jmethodID mid; + jobject gui; + jthrowable ex; + // JDK > 1.5 + JavaVMInitArgs vm_args; + + vm_args.nOptions = 3; + JavaVMOption options[vm_args.nOptions]; + options[0].optionString = "-Djava.class.path=.:../../../gluegen/build/gluegen-rt.jar:../../build/jar/jogl-all.jar"; +// options[1].optionString = "-Djava.library.path=lib"; + options[1].optionString = "-Dnativewindow.debug=all"; + options[2].optionString = "-Djogl.debug=all"; + + vm_args.version = JNI_VERSION_1_4; + vm_args.options = options; + vm_args.ignoreUnrecognized = JNI_TRUE; + + /* Create the Java VM */ + CREATEVM *CreateVM = create_vm((char *)ptr); + TRACE("CreateVM:%lx env:%lx vm_args:%lx", (long unsigned int)CreateVM, (long unsigned int)&env, (long unsigned int)&vm_args); + res = CreateVM(&jvm, (void**)&env, &vm_args); + if (res < 0) { + TRACE("Can't create Java VM%s", ""); + exit(1); + } else { + TRACE("VM Created%s", ""); + } + + cls = (*env)->FindClass(env, "Bug1398macOSContextOpsOnMainThread"); + ex = (*env)->ExceptionOccurred(env); + if (ex) { + die(env); + } + + mid = (*env)->GetMethodID(env, cls, "", "()V"); + if (mid == NULL) + goto destroy; + + gui = (*env)->NewObject(env, cls, mid); + TRACE("Just passed NewObject()...%s", ""); + +destroy: + if ((*env)->ExceptionOccurred(env)) { + // handle exception + } + + if (err) + fclose(err); + + if (jvm_lib) { + dlclose(jvm_lib); + jvm_lib = NULL; + } + + die(env); + + return 0; +} + +void show_error_dialog(JNIEnv *env, jthrowable ex) +{ + jclass dialogClass = (*env)->FindClass(env, "javax/swing/JOptionPane"); + jmethodID showMsg = (*env)->GetStaticMethodID(env, dialogClass, "showMessageDialog", "(Ljava/awt/Component;Ljava/lang/Object;Ljava/lang/String;I)V"); + + jstring msg = (*env)->NewStringUTF(env, "\nWe be dead...\n\n"); + + // extract message from exception + jclass stringClass = (*env)->FindClass(env, "java/lang/String"); + jclass exClass = (*env)->GetObjectClass(env, ex); + jmethodID exGetMessage = (*env)->GetMethodID(env, exClass, "getMessage", "()Ljava/lang/String;"); + jmethodID concat = (*env)->GetMethodID(env, stringClass, "concat", "(Ljava/lang/String;)Ljava/lang/String;"); + jstring exMsg = (*env)->CallObjectMethod(env, ex, exGetMessage); + msg = (*env)->CallObjectMethod(env, msg, concat, exMsg); // append exception message to msg + + jstring title = (*env)->NewStringUTF(env, "Error"); + (*env)->CallStaticVoidMethod(env, dialogClass, showMsg, NULL, msg, title, (jint)0); +} + +void die(JNIEnv *env) +{ + TRACE("\n*\n*\n*\ndieing...\n%s", ""); + + jthrowable ex = (*env)->ExceptionOccurred(env); + if (ex) { + (*env)->ExceptionDescribe(env); + show_error_dialog(env, ex); + } + + // DestroyJavaVM hangs on Windows so just exit for now +#ifndef WIN32 + (*jvm)->DestroyJavaVM(jvm); +#else + if (jvm_lib) + FreeLibrary(jvm_lib); + if (c_lib) + FreeLibrary(c_lib); +#endif + TRACE("VM = DEAD!%s\n", ""); + exit(0); +} + +void create_jvm_thread(const char *jvm_lib_path) +{ + pthread_t vmthread; + + struct rlimit limit; + size_t stack_size = 0; + int rc = getrlimit(RLIMIT_STACK, &limit); + + if (rc == 0) { + if (limit.rlim_cur != 0LL) { + stack_size = (size_t)limit.rlim_cur; + } + } + + pthread_attr_t thread_attr; + pthread_attr_init(&thread_attr); + pthread_attr_setscope(&thread_attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED); + if (stack_size > 0) { + pthread_attr_setstacksize(&thread_attr, stack_size); + } + + pthread_create(&vmthread, &thread_attr, launchJava, (void *)jvm_lib_path); + pthread_attr_destroy(&thread_attr); +} + +static AppDelegate* _appDelegate; + +int main(int argc, const char *argv[]) +{ + err = stderr; + + for (int k = 1; k < argc; k++) { + TRACE("argv[%d]:%s", k, argv[k]); + } + if (argc < 2) { + TRACE("Usage: Bug1398macOSContextOpsOnMainThread %s", "[libjli.dylib path]"); + exit(1); + } + @autoreleasepool + { + _appDelegate = [AppDelegate new]; + [NSApplication sharedApplication]; + [NSApp activateIgnoringOtherApps:YES]; + [NSApp setDelegate:_appDelegate]; + + create_jvm_thread(argv[1]); + + return NSApplicationMain(argc, (const char **)argv); + } +} + + +@interface AppDelegate () + +@property (strong) IBOutlet NSWindow *window; + +@end + +@implementation AppDelegate + +-(id) init +{ + self = [super init]; + NSLog(@"init"); + return self; +} + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + + NSLog(@"App starting..."); + + //Create a new Block Operation and add it to the Operation Queue + NSOperationQueue *operationQueue = [NSOperationQueue new]; + + NSBlockOperation *startUpCompletionOperation = [NSBlockOperation blockOperationWithBlock:^{ + //The startup Object has been loaded now close the splash screen + //This the completion block operation + [[NSOperationQueue mainQueue] addOperationWithBlock:^{ + NSLog(@"startUpCompletionOperation main thread? ANS - %@",[NSThread isMainThread]? @"YES":@"NO"); +// launchJava((void *)"jre/lib/jli/libjli.dylib"); + }]; + }]; + + NSBlockOperation *startUpOperation = [NSBlockOperation blockOperationWithBlock:^{ + // wait for everything to load and JVM to power up + sleep(3); // wait for a bit for NewObject to complete + }]; + + [startUpCompletionOperation addDependency:startUpOperation]; + [operationQueue addOperation:startUpCompletionOperation]; + [operationQueue addOperation:startUpOperation]; +} + +@end diff --git a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java new file mode 100644 index 000000000..82578acbb --- /dev/null +++ b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java @@ -0,0 +1,126 @@ +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.DisplayMode; +import java.awt.GraphicsDevice; +import java.awt.GraphicsConfiguration; +import java.awt.Rectangle; +import java.awt.Toolkit; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.JFrame; +import javax.swing.JPanel; +import com.jogamp.opengl.GL2; +import com.jogamp.opengl.GLAutoDrawable; +import com.jogamp.opengl.GLCapabilities; +import com.jogamp.opengl.GLEventListener; +import com.jogamp.opengl.GLProfile; +import com.jogamp.opengl.awt.GLCanvas; +import com.jogamp.opengl.util.FPSAnimator; + +public class Bug1398macOSContextOpsOnMainThread extends JFrame implements GLEventListener { + + protected GLCanvas canvas; + + static { + GLProfile.initSingleton(); + } + + public Bug1398macOSContextOpsOnMainThread() throws Exception { + System.out.println("Java version: " + Runtime.class.getPackage().getSpecificationVersion() + " (" + Runtime.class.getPackage().getImplementationVersion() + ")"); + System.out.println("classloader:" + Thread.currentThread().getContextClassLoader()); + System.out.println("OS: " + System.getProperty("os.name") + " " + System.getProperty("os.version") + " " + System.getProperty("os.arch")); + + setTitle("Bug1398macOSContextOpsOnMainThread"); + //setUndecorated(true); + //setResizable(false); + setDefaultCloseOperation(EXIT_ON_CLOSE); + setBackground(Color.WHITE); + Dimension dim = new Dimension(800, 600); + GraphicsDevice device = getGraphicsConfiguration().getDevice(); + DisplayMode dm = device.getDisplayMode(); + System.out.println("w:" + dm.getWidth() + " h:" + dm.getHeight() + " rr:" + dm.getRefreshRate() + " bits:" + dm.getBitDepth() + " dim.w:" + dim.width + " dim.h:" + dim.height); + GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2)); + canvas = new GLCanvas(caps); + canvas.setBounds(0, 0, 1, 1); + + JPanel panel = new JPanel(); + panel.setLayout(null); + panel.setPreferredSize(dim); + panel.add(canvas); + + Container c = getContentPane(); + c.setLayout(new BorderLayout()); + c.add(panel, BorderLayout.CENTER); + + pack(); + + // center window + GraphicsConfiguration gc = getGraphicsConfiguration(); + Rectangle bounds = gc.getBounds(); + System.out.println("gc.bounds: " + bounds); + dim = Toolkit.getDefaultToolkit().getScreenSize(); + System.out.println("dim: " + dim); + int w = getSize().width; + int h = getSize().height; + int x = (dim.width - w) / 2; + int y = (dim.height - h) / 2; + setLocation(x, y); + setVisible(true); + + final FPSAnimator animator = new FPSAnimator(canvas, 5, true); + addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + // Run this on another thread than the AWT event queue to + // make sure the call to Animator.stop() completes before + // exiting + new Thread(new Runnable() { + public void run() { + animator.stop(); + } + }).start(); + } + }); + animator.start(); + } + + /** + * OpenGL funcs + */ + private void initExtension(GL2 gl, String glExtensionName) { + if (!gl.isExtensionAvailable(glExtensionName)) { + final String message = "OpenGL extension \"" + glExtensionName + "\" not available.\n\nPlease update your display driver to the latest version."; + throw new RuntimeException(message); + } + } + + @Override + public void init(GLAutoDrawable drawable) { + GL2 gl = drawable.getGL().getGL2(); + + int[] arg = new int[1]; + gl.glGetIntegerv(GL2.GL_MAX_TEXTURE_SIZE, arg, 0); + System.out.println("GL_MAX_TEXTURE_SIZE:" + arg[0]); + + System.out.println("Available GL Extensions: " + gl.glGetString(GL2.GL_EXTENSIONS)); + + initExtension(gl, "GL_ARB_texture_non_power_of_two"); + } + + @Override + public void dispose(GLAutoDrawable drawable) { + GL2 gl = drawable.getGL().getGL2(); + } + + @Override + public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { + GL2 gl = drawable.getGL().getGL2(); + } + + @Override + public void display(GLAutoDrawable drawable) { + GL2 gl = drawable.getGL().getGL2(); + } +} + diff --git a/src/test-native/bug1398/make-bug1398.sh b/src/test-native/bug1398/make-bug1398.sh new file mode 100755 index 000000000..cc6ec6800 --- /dev/null +++ b/src/test-native/bug1398/make-bug1398.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +set -x + +gcc -x objective-c -framework Cocoa -o Bug1398macOSContextOpsOnMainThread Bug1398macOSContextOpsOnMainThread.c \ + && javac -source 1.8 -target 1.8 -classpath ../../../gluegen/build/gluegen-rt.jar:../../build/jar/jogl-all.jar Bug1398macOSContextOpsOnMainThread.java -- cgit v1.2.3 From f4f92cdc0eb89c62070a865601527097e6d5cc72 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 21 Feb 2020 15:03:42 +0100 Subject: Bug 1398: Fixing native test allowing its execution using JOGL 2.3.2 and latest tip using XCode 11 Changes to test - Using own 'NSApplicationMain' entry to avoid the 'missing Info.plist' message! - Configurable CLASSPATH and LIBPATH at compile time. Note that the java.library.path is now hardcoded as well. - Don't close stderr in test, just fflush - Don't close the JVM after launch via 'die(env)', let it run. - Java: Add GLEventListener RedSquareES2 to see something in action @ 30fps - Java: GLCanvase visible bounds --- .../bug1398/Bug1398macOSContextOpsOnMainThread.c | 91 ++++++- .../Bug1398macOSContextOpsOnMainThread.java | 6 +- src/test-native/bug1398/RedSquareES2.java | 274 +++++++++++++++++++++ src/test-native/bug1398/make-bug1398.sh | 24 +- src/test-native/bug1398/run-bug1398.sh | 16 ++ src/test-native/bug1398/shader/RedSquareShader.fp | 16 ++ src/test-native/bug1398/shader/RedSquareShader.vp | 18 ++ src/test-native/bug1398/shader/RedSquareShader2.fp | 16 ++ src/test-native/bug1398/test1398-jogamp232-01.log | 66 +++++ .../bug1398/test1398-jogamp240rc-01.log | 59 +++++ 10 files changed, 575 insertions(+), 11 deletions(-) create mode 100644 src/test-native/bug1398/RedSquareES2.java create mode 100644 src/test-native/bug1398/run-bug1398.sh create mode 100644 src/test-native/bug1398/shader/RedSquareShader.fp create mode 100644 src/test-native/bug1398/shader/RedSquareShader.vp create mode 100644 src/test-native/bug1398/shader/RedSquareShader2.fp create mode 100644 src/test-native/bug1398/test1398-jogamp232-01.log create mode 100644 src/test-native/bug1398/test1398-jogamp240rc-01.log (limited to 'src/test-native/bug1398') diff --git a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c index 08dd7d7ac..8fe51f97e 100644 --- a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c +++ b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c @@ -35,6 +35,13 @@ void *create_vm(const char *jvm_lib_path) return sym; } +#ifndef CLASSPATH +#define CLASSPATH ".:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar" +#endif +#ifndef LIBPATH +#define LIBPATH "/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib" +#endif + static void *launchJava(void *ptr) { int k = 0; @@ -49,17 +56,25 @@ static void *launchJava(void *ptr) // JDK > 1.5 JavaVMInitArgs vm_args; - vm_args.nOptions = 3; + TRACE("launchJava.1.1%s", ""); + vm_args.nOptions = 7; JavaVMOption options[vm_args.nOptions]; - options[0].optionString = "-Djava.class.path=.:../../../gluegen/build/gluegen-rt.jar:../../build/jar/jogl-all.jar"; -// options[1].optionString = "-Djava.library.path=lib"; - options[1].optionString = "-Dnativewindow.debug=all"; - options[2].optionString = "-Djogl.debug=all"; + options[0].optionString = "-Djava.class.path="CLASSPATH; + options[1].optionString = "-Djava.library.path="LIBPATH; + options[2].optionString = "-DNjogamp.debug=all"; + options[3].optionString = "-DNjogamp.debug.NativeLibrary=true"; + options[4].optionString = "-DNjogamp.debug.JNILibLoader=true"; + options[5].optionString = "-DNnativewindow.debug=all"; + options[6].optionString = "-DNjogl.debug=all"; vm_args.version = JNI_VERSION_1_4; vm_args.options = options; vm_args.ignoreUnrecognized = JNI_TRUE; + TRACE("launchJava.1.2%s", ""); + TRACE(".. using CLASSPATH %s", CLASSPATH); + TRACE(".. using LIBPATH %s", LIBPATH); + /* Create the Java VM */ CREATEVM *CreateVM = create_vm((char *)ptr); TRACE("CreateVM:%lx env:%lx vm_args:%lx", (long unsigned int)CreateVM, (long unsigned int)&env, (long unsigned int)&vm_args); @@ -71,34 +86,40 @@ static void *launchJava(void *ptr) TRACE("VM Created%s", ""); } + TRACE("launchJava.1.3%s", ""); cls = (*env)->FindClass(env, "Bug1398macOSContextOpsOnMainThread"); ex = (*env)->ExceptionOccurred(env); if (ex) { die(env); } + TRACE("launchJava.1.4%s", ""); mid = (*env)->GetMethodID(env, cls, "", "()V"); if (mid == NULL) goto destroy; + TRACE("launchJava.1.5%s", ""); gui = (*env)->NewObject(env, cls, mid); TRACE("Just passed NewObject()...%s", ""); + destroy: if ((*env)->ExceptionOccurred(env)) { // handle exception + TRACE("Exception occured...%s", ""); } if (err) - fclose(err); + fflush(err); if (jvm_lib) { dlclose(jvm_lib); jvm_lib = NULL; } - die(env); + // die(env); + TRACE("launchJava.1.X%s", ""); return 0; } @@ -158,6 +179,7 @@ void create_jvm_thread(const char *jvm_lib_path) } } + TRACE("create_jvm_thread.1.1%s", ""); pthread_attr_t thread_attr; pthread_attr_init(&thread_attr); pthread_attr_setscope(&thread_attr, PTHREAD_SCOPE_SYSTEM); @@ -165,13 +187,17 @@ void create_jvm_thread(const char *jvm_lib_path) if (stack_size > 0) { pthread_attr_setstacksize(&thread_attr, stack_size); } + TRACE("create_jvm_thread.1.2%s", ""); pthread_create(&vmthread, &thread_attr, launchJava, (void *)jvm_lib_path); pthread_attr_destroy(&thread_attr); + TRACE("create_jvm_thread.1.X%s", ""); } static AppDelegate* _appDelegate; +#if 0 + int main(int argc, const char *argv[]) { err = stderr; @@ -183,19 +209,70 @@ int main(int argc, const char *argv[]) TRACE("Usage: Bug1398macOSContextOpsOnMainThread %s", "[libjli.dylib path]"); exit(1); } + TRACE("main.1%s", ""); @autoreleasepool { + TRACE("main.1.1%s", ""); _appDelegate = [AppDelegate new]; + TRACE("main.1.2%s", ""); [NSApplication sharedApplication]; + TRACE("main.1.3%s", ""); [NSApp activateIgnoringOtherApps:YES]; [NSApp setDelegate:_appDelegate]; + TRACE("main.1.5%s", ""); create_jvm_thread(argv[1]); + TRACE("main.1.6%s", ""); return NSApplicationMain(argc, (const char **)argv); + TRACE("main.1.X%s", ""); } } +#else + +int NSApplicationMain(int argc, const char *argv[]) { + // [NSApplication sharedApplication]; + // [NSBundle loadNibNamed:@"myMain" owner:NSApp]; + // [NSApp run]; + + err = stderr; + + for (int k = 1; k < argc; k++) { + TRACE("argv[%d]:%s", k, argv[k]); + } + if (argc < 2) { + TRACE("Usage: Bug1398macOSContextOpsOnMainThread %s", "[libjli.dylib path]"); + exit(1); + } + TRACE("main.1%s", ""); + @autoreleasepool + { + TRACE("main.1.1%s", ""); + _appDelegate = [AppDelegate new]; + TRACE("main.1.2%s", ""); + [NSApplication sharedApplication]; + TRACE("main.1.3%s", ""); + [NSApp activateIgnoringOtherApps:YES]; + [NSApp setDelegate:_appDelegate]; + TRACE("main.1.5%s", ""); + + create_jvm_thread(argv[1]); + TRACE("main.1.6%s", ""); + + [NSApp run]; + // return NSApplicationMain(argc, (const char **)argv); + TRACE("main.1.X%s", ""); + } + return 0; +} + +int main(int argc, const char *argv[]) +{ + return NSApplicationMain(argc, (const char **)argv); +} + +#endif @interface AppDelegate () diff --git a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java index 82578acbb..65b3d3f59 100644 --- a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java +++ b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java @@ -43,7 +43,9 @@ public class Bug1398macOSContextOpsOnMainThread extends JFrame implements GLEven System.out.println("w:" + dm.getWidth() + " h:" + dm.getHeight() + " rr:" + dm.getRefreshRate() + " bits:" + dm.getBitDepth() + " dim.w:" + dim.width + " dim.h:" + dim.height); GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2)); canvas = new GLCanvas(caps); - canvas.setBounds(0, 0, 1, 1); + canvas.addGLEventListener(new RedSquareES2()); + // canvas.setBounds(0, 0, 1, 1); + canvas.setBounds(0, 0, 800, 600); JPanel panel = new JPanel(); panel.setLayout(null); @@ -69,7 +71,7 @@ public class Bug1398macOSContextOpsOnMainThread extends JFrame implements GLEven setLocation(x, y); setVisible(true); - final FPSAnimator animator = new FPSAnimator(canvas, 5, true); + final FPSAnimator animator = new FPSAnimator(canvas, 30, true); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { // Run this on another thread than the AWT event queue to diff --git a/src/test-native/bug1398/RedSquareES2.java b/src/test-native/bug1398/RedSquareES2.java new file mode 100644 index 000000000..86de51701 --- /dev/null +++ b/src/test-native/bug1398/RedSquareES2.java @@ -0,0 +1,274 @@ +/** + * Copyright 2010 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +// package com.jogamp.opengl.demos.es2; + +import com.jogamp.opengl.JoglVersion; +import com.jogamp.opengl.util.GLArrayDataServer; +import com.jogamp.opengl.util.PMVMatrix; +import com.jogamp.opengl.util.TileRendererBase; +import com.jogamp.opengl.util.glsl.ShaderCode; +import com.jogamp.opengl.util.glsl.ShaderProgram; +import com.jogamp.opengl.util.glsl.ShaderState; + +import com.jogamp.opengl.GL; +import com.jogamp.opengl.GL2ES2; +import com.jogamp.opengl.GLAutoDrawable; +import com.jogamp.opengl.GLEventListener; +import com.jogamp.opengl.GLUniformData; +import com.jogamp.opengl.fixedfunc.GLMatrixFunc; + +public class RedSquareES2 implements GLEventListener, TileRendererBase.TileRendererListener { + private ShaderState st; + private PMVMatrix pmvMatrix; + private GLUniformData pmvMatrixUniform; + private GLArrayDataServer vertices ; + private GLArrayDataServer colors ; + private long t0; + private int swapInterval = 0; + private float aspect = 1.0f; + private boolean doRotate = true; + private boolean verbose = true; + private boolean clearBuffers = true; + private TileRendererBase tileRendererInUse = null; + private boolean doRotateBeforePrinting; + + public RedSquareES2(final int swapInterval) { + this.swapInterval = swapInterval; + } + + public RedSquareES2() { + this.swapInterval = 1; + } + + @Override + public void addTileRendererNotify(final TileRendererBase tr) { + tileRendererInUse = tr; + doRotateBeforePrinting = doRotate; + setDoRotation(false); + } + @Override + public void removeTileRendererNotify(final TileRendererBase tr) { + tileRendererInUse = null; + setDoRotation(doRotateBeforePrinting); + } + @Override + public void startTileRendering(final TileRendererBase tr) { + System.err.println("RedSquareES2.startTileRendering: "+tr); + } + @Override + public void endTileRendering(final TileRendererBase tr) { + System.err.println("RedSquareES2.endTileRendering: "+tr); + } + + public void setAspect(final float aspect) { this.aspect = aspect; } + public void setDoRotation(final boolean rotate) { this.doRotate = rotate; } + public void setClearBuffers(final boolean v) { clearBuffers = v; } + public void setVerbose(final boolean v) { verbose = v; } + + @Override + public void init(final GLAutoDrawable glad) { + if(verbose) { + System.err.println(Thread.currentThread()+" RedSquareES2.init: tileRendererInUse "+tileRendererInUse); + } + final GL2ES2 gl = glad.getGL().getGL2ES2(); + + if(verbose) { + System.err.println("RedSquareES2 init on "+Thread.currentThread()); + System.err.println("Chosen GLCapabilities: " + glad.getChosenGLCapabilities()); + System.err.println("INIT GL IS: " + gl.getClass().getName()); + System.err.println(JoglVersion.getGLStrings(gl, null, false).toString()); + } + if( !gl.hasGLSL() ) { + System.err.println("No GLSL available, no rendering."); + return; + } + st = new ShaderState(); + st.setVerbose(true); + final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, this.getClass(), "shader", + "shader/bin", "RedSquareShader", true); + final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, this.getClass(), "shader", + "shader/bin", "RedSquareShader", true); + vp0.defaultShaderCustomization(gl, true, true); + fp0.defaultShaderCustomization(gl, true, true); + final ShaderProgram sp0 = new ShaderProgram(); + sp0.add(gl, vp0, System.err); + sp0.add(gl, fp0, System.err); + st.attachShaderProgram(gl, sp0, true); + + // setup mgl_PMVMatrix + pmvMatrix = new PMVMatrix(); + pmvMatrix.glMatrixMode(GLMatrixFunc.GL_PROJECTION); + pmvMatrix.glLoadIdentity(); + pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); + pmvMatrix.glLoadIdentity(); + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf()); // P, Mv + st.ownUniform(pmvMatrixUniform); + st.uniform(gl, pmvMatrixUniform); + + // Allocate Vertex Array + vertices = GLArrayDataServer.createGLSL("mgl_Vertex", 3, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW); + vertices.putf(-2); vertices.putf( 2); vertices.putf( 0); + vertices.putf( 2); vertices.putf( 2); vertices.putf( 0); + vertices.putf(-2); vertices.putf(-2); vertices.putf( 0); + vertices.putf( 2); vertices.putf(-2); vertices.putf( 0); + vertices.seal(gl, true); + st.ownAttribute(vertices, true); + vertices.enableBuffer(gl, false); + + // Allocate Color Array + colors= GLArrayDataServer.createGLSL("mgl_Color", 4, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW); + colors.putf(1); colors.putf(0); colors.putf(0); colors.putf(1); + colors.putf(0); colors.putf(0); colors.putf(1); colors.putf(1); + colors.putf(1); colors.putf(0); colors.putf(0); colors.putf(1); + colors.putf(1); colors.putf(0); colors.putf(0); colors.putf(1); + colors.seal(gl, true); + st.ownAttribute(colors, true); + colors.enableBuffer(gl, false); + + // OpenGL Render Settings + gl.glEnable(GL.GL_DEPTH_TEST); + st.useProgram(gl, false); + + t0 = System.currentTimeMillis(); + if(verbose) { + System.err.println(Thread.currentThread()+" RedSquareES2.init FIN"); + } + } + + @Override + public void display(final GLAutoDrawable glad) { + final long t1 = System.currentTimeMillis(); + + final GL2ES2 gl = glad.getGL().getGL2ES2(); + if( clearBuffers ) { + if( null != tileRendererInUse ) { + gl.glClearColor(1.0f, 1.0f, 1.0f, 0.0f); + } else { + gl.glClearColor(0, 0, 0, 0); + } + gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); + } + if( !gl.hasGLSL() ) { + return; + } + st.useProgram(gl, true); + // One rotation every four seconds + pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); + pmvMatrix.glLoadIdentity(); + pmvMatrix.glTranslatef(0, 0, -10); + if(doRotate) { + final float ang = ((t1 - t0) * 360.0F) / 4000.0F; + pmvMatrix.glRotatef(ang, 0, 0, 1); + pmvMatrix.glRotatef(ang, 0, 1, 0); + } + st.uniform(gl, pmvMatrixUniform); + + // Draw a square + vertices.enableBuffer(gl, true); + colors.enableBuffer(gl, true); + gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4); + vertices.enableBuffer(gl, false); + colors.enableBuffer(gl, false); + st.useProgram(gl, false); + } + + @Override + public void reshape(final GLAutoDrawable glad, final int x, final int y, final int width, final int height) { + final GL2ES2 gl = glad.getGL().getGL2ES2(); + gl.setSwapInterval(swapInterval); + reshapeImpl(gl, x, y, width, height, width, height); + } + + @Override + public void reshapeTile(final TileRendererBase tr, + final int tileX, final int tileY, final int tileWidth, final int tileHeight, + final int imageWidth, final int imageHeight) { + final GL2ES2 gl = tr.getAttachedDrawable().getGL().getGL2ES2(); + gl.setSwapInterval(0); + reshapeImpl(gl, tileX, tileY, tileWidth, tileHeight, imageWidth, imageHeight); + } + + void reshapeImpl(final GL2ES2 gl, final int tileX, final int tileY, final int tileWidth, final int tileHeight, final int imageWidth, final int imageHeight) { + if(verbose) { + System.err.println(Thread.currentThread()+" RedSquareES2.reshape "+tileX+"/"+tileY+" "+tileWidth+"x"+tileHeight+" of "+imageWidth+"x"+imageHeight+", swapInterval "+swapInterval+", drawable 0x"+Long.toHexString(gl.getContext().getGLDrawable().getHandle())+", tileRendererInUse "+tileRendererInUse); + } + // Thread.dumpStack(); + if( !gl.hasGLSL() ) { + return; + } + + st.useProgram(gl, true); + // Set location in front of camera + pmvMatrix.glMatrixMode(GLMatrixFunc.GL_PROJECTION); + pmvMatrix.glLoadIdentity(); + + // compute projection parameters 'normal' perspective + final float fovy=45f; + final float aspect2 = ( (float) imageWidth / (float) imageHeight ) / aspect; + final float zNear=1f; + final float zFar=100f; + + // compute projection parameters 'normal' frustum + final float top=(float)Math.tan(fovy*((float)Math.PI)/360.0f)*zNear; + final float bottom=-1.0f*top; + final float left=aspect2*bottom; + final float right=aspect2*top; + final float w = right - left; + final float h = top - bottom; + + // compute projection parameters 'tiled' + final float l = left + tileX * w / imageWidth; + final float r = l + tileWidth * w / imageWidth; + final float b = bottom + tileY * h / imageHeight; + final float t = b + tileHeight * h / imageHeight; + + pmvMatrix.glFrustumf(l, r, b, t, zNear, zFar); + //pmvMatrix.glOrthof(-4.0f, 4.0f, -4.0f, 4.0f, 1.0f, 100.0f); + st.uniform(gl, pmvMatrixUniform); + st.useProgram(gl, false); + + System.err.println(Thread.currentThread()+" RedSquareES2.reshape FIN"); + } + + @Override + public void dispose(final GLAutoDrawable glad) { + if(verbose) { + System.err.println(Thread.currentThread()+" RedSquareES2.dispose: tileRendererInUse "+tileRendererInUse); + } + final GL2ES2 gl = glad.getGL().getGL2ES2(); + if( !gl.hasGLSL() ) { + return; + } + st.destroy(gl); + st = null; + pmvMatrix = null; + if(verbose) { + System.err.println(Thread.currentThread()+" RedSquareES2.dispose FIN"); + } + } +} diff --git a/src/test-native/bug1398/make-bug1398.sh b/src/test-native/bug1398/make-bug1398.sh index cc6ec6800..d410f7066 100755 --- a/src/test-native/bug1398/make-bug1398.sh +++ b/src/test-native/bug1398/make-bug1398.sh @@ -2,5 +2,25 @@ set -x -gcc -x objective-c -framework Cocoa -o Bug1398macOSContextOpsOnMainThread Bug1398macOSContextOpsOnMainThread.c \ - && javac -source 1.8 -target 1.8 -classpath ../../../gluegen/build/gluegen-rt.jar:../../build/jar/jogl-all.jar Bug1398macOSContextOpsOnMainThread.java +USE_232=1 +ok=0 + +if [ $USE_232 -eq 0 ] ; then + xcrun clang -x objective-c -framework Cocoa \ + -DCLASSPATH="\".:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar\"" \ + -DLIBPATH="\"/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib\"" \ + -o Bug1398macOSContextOpsOnMainThread Bug1398macOSContextOpsOnMainThread.c \ + && ok=1 +else + xcrun clang -x objective-c -framework Cocoa \ + -DCLASSPATH="\".:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar\"" \ + -DLIBPATH="\"/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal\"" \ + -o Bug1398macOSContextOpsOnMainThread Bug1398macOSContextOpsOnMainThread.c \ + && ok=1 +fi + +if [ $ok -eq 1 ] ; then + javac -source 1.8 -target 1.8 -classpath ../../../../gluegen/build/gluegen-rt.jar:../../../build/jar/jogl-all.jar RedSquareES2.java Bug1398macOSContextOpsOnMainThread.java +fi + +# ./Bug1398macOSContextOpsOnMainThread /Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib/lib diff --git a/src/test-native/bug1398/run-bug1398.sh b/src/test-native/bug1398/run-bug1398.sh new file mode 100644 index 000000000..b4252bbdd --- /dev/null +++ b/src/test-native/bug1398/run-bug1398.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +# export LD_LIBRARY_PATH=/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib +# export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH + +#rm -rf natives +#mkdir -p natives/macosx-universal +#cp -av /Users/jogamp/projects/JogAmp/gluegen/build/obj/libgluegen_rt.so natives/macosx-universal/ +#cp -av natives/macosx-universal/libgluegen_rt.so natives/macosx-universal/libgluegen_rt.dylib +#cp -av /Users/jogamp/projects/JogAmp/jogl/build/lib/*dylib natives/macosx-universal/ + +# ./Bug1398macOSContextOpsOnMainThread /Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib/lib +# ./Bug1398macOSContextOpsOnMainThread /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/server/libjvm.dylib + +./Bug1398macOSContextOpsOnMainThread /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib +# ./Bug1398macOSContextOpsOnMainThread /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib diff --git a/src/test-native/bug1398/shader/RedSquareShader.fp b/src/test-native/bug1398/shader/RedSquareShader.fp new file mode 100644 index 000000000..60b92401e --- /dev/null +++ b/src/test-native/bug1398/shader/RedSquareShader.fp @@ -0,0 +1,16 @@ +// Copyright 2010 JogAmp Community. All rights reserved. + +#if __VERSION__ >= 130 + #define varying in + out vec4 mgl_FragColor; +#else + #define mgl_FragColor gl_FragColor +#endif + +varying vec4 frontColor; + +void main (void) +{ + mgl_FragColor = frontColor; +} + diff --git a/src/test-native/bug1398/shader/RedSquareShader.vp b/src/test-native/bug1398/shader/RedSquareShader.vp new file mode 100644 index 000000000..9283dd7bd --- /dev/null +++ b/src/test-native/bug1398/shader/RedSquareShader.vp @@ -0,0 +1,18 @@ +// Copyright 2010 JogAmp Community. All rights reserved. + +#if __VERSION__ >= 130 + #define attribute in + #define varying out +#endif + +uniform mat4 mgl_PMVMatrix[2]; +attribute vec4 mgl_Vertex; +attribute vec4 mgl_Color; +varying vec4 frontColor; + +void main(void) +{ + frontColor=mgl_Color; + gl_Position = mgl_PMVMatrix[0] * mgl_PMVMatrix[1] * mgl_Vertex; +} + diff --git a/src/test-native/bug1398/shader/RedSquareShader2.fp b/src/test-native/bug1398/shader/RedSquareShader2.fp new file mode 100644 index 000000000..25a2df2d7 --- /dev/null +++ b/src/test-native/bug1398/shader/RedSquareShader2.fp @@ -0,0 +1,16 @@ +// Copyright 2010 JogAmp Community. All rights reserved. + +#if __VERSION__ >= 130 + #define varying in + out vec4 mgl_FragColor; +#else + #define mgl_FragColor gl_FragColor +#endif + +varying vec4 frontColor; + +void main (void) +{ + mgl_FragColor = vec4(0.0, frontColor.g, frontColor.b, 1.0); +} + diff --git a/src/test-native/bug1398/test1398-jogamp232-01.log b/src/test-native/bug1398/test1398-jogamp232-01.log new file mode 100644 index 000000000..bfc11684a --- /dev/null +++ b/src/test-native/bug1398/test1398-jogamp232-01.log @@ -0,0 +1,66 @@ ++ ./Bug1398macOSContextOpsOnMainThread /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:242:NSApplicationMain(): argv[1]:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:248:NSApplicationMain(): main.1 +Bug1398macOSContextOpsOnMainThread.c:251:NSApplicationMain(): main.1.1 +2020-02-19 21:36:02.797 Bug1398macOSContextOpsOnMainThread[1710:65756] init +Bug1398macOSContextOpsOnMainThread.c:253:NSApplicationMain(): main.1.2 +Bug1398macOSContextOpsOnMainThread.c:255:NSApplicationMain(): main.1.3 +Bug1398macOSContextOpsOnMainThread.c:258:NSApplicationMain(): main.1.5 +Bug1398macOSContextOpsOnMainThread.c:182:create_jvm_thread(): create_jvm_thread.1.1 +Bug1398macOSContextOpsOnMainThread.c:190:create_jvm_thread(): create_jvm_thread.1.2 +Bug1398macOSContextOpsOnMainThread.c:194:create_jvm_thread(): create_jvm_thread.1.X +Bug1398macOSContextOpsOnMainThread.c:261:NSApplicationMain(): main.1.6 +Bug1398macOSContextOpsOnMainThread.c:59:launchJava(): launchJava.1.1 +Bug1398macOSContextOpsOnMainThread.c:74:launchJava(): launchJava.1.2 +Bug1398macOSContextOpsOnMainThread.c:75:launchJava(): .. using CLASSPATH .:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar +Bug1398macOSContextOpsOnMainThread.c:76:launchJava(): .. using LIBPATH /Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal +Bug1398macOSContextOpsOnMainThread.c:30:create_vm(): Found libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:80:launchJava(): CreateVM:104c47b80 env:70000bb98da8 vm_args:70000bb98d68 +2020-02-19 21:36:02.934 Bug1398macOSContextOpsOnMainThread[1710:65756] App starting... +Bug1398macOSContextOpsOnMainThread.c:86:launchJava(): VM Created +Bug1398macOSContextOpsOnMainThread.c:89:launchJava(): launchJava.1.3 +2020-02-19 21:36:04.091 Bug1398macOSContextOpsOnMainThread[1710:65801] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from ( + 0 AppKit 0x00007fff2c051575 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 371 + 1 AppKit 0x00007fff2c038ed5 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416 + 2 AppKit 0x00007fff2c038947 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42 + 3 libnativewindow_macosx.jnilib 0x00000001099203fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398 + 4 ??? 0x000000010ae94667 0x0 + 4478027367 +) +Bug1398macOSContextOpsOnMainThread.c:96:launchJava(): launchJava.1.4 +Bug1398macOSContextOpsOnMainThread.c:101:launchJava(): launchJava.1.5 +Java version: 1.8 (1.8.0_192) +classloader:sun.misc.Launcher$AppClassLoader@764c12b6 +OS: Mac OS X 10.15.2 x86_64 +w:1920 h:1080 rr:60 bits:32 dim.w:800 dim.h:600 +gc.bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080] +dim: java.awt.Dimension[width=1920,height=1080] +Bug1398macOSContextOpsOnMainThread.c:103:launchJava(): Just passed NewObject()... +Bug1398macOSContextOpsOnMainThread.c:122:launchJava(): launchJava.1.X +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init: tileRendererInUse null +RedSquareES2 init on Thread[AWT-EventQueue-0,6,main] +Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] +INIT GL IS: jogamp.opengl.gl4.GL4bcImpl +Swap Interval 0 +GL Profile GLProfile[GL2/GL2.hw] +GL Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.3.9 [GL 2.1.0, vendor 14.3.9 (INTEL-14.3.9)] +Quirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +Impl. class jogamp.opengl.gl4.GL4bcImpl +GL_VENDOR Intel Inc. +GL_RENDERER Intel Iris OpenGL Engine +GL_VERSION 2.1 INTEL-14.3.9 +GLSL true, has-compiler-func: true, version: 1.20 / 1.20.0 +GL FBO: basic true, full true +GL_EXTENSIONS 128 +GLX_EXTENSIONS 0 +----------------------------------------------------------------------------------------------------- +ShaderState: attachShaderProgram: -1 -> 1 (enable: true) + null + ShaderProgram[id=1, linked=false, inUse=false, program: 1, + ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader: 2, source] + ShaderCode[id=2, type=FRAGMENT_SHADER, valid=true, shader: 3, source]] +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init FIN +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape 0/0 800x600 of 800x600, swapInterval 1, drawable 0x7f9d55d94400, tileRendererInUse null +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape FIN +2020-02-19 21:36:05.940 Bug1398macOSContextOpsOnMainThread[1710:65756] startUpCompletionOperation main thread? ANS - YES +Thread[AWT-EventQueue-0,6,main] RedSquareES2.dispose: tileRendererInUse null +Thread[AWT-EventQueue-0,6,main] RedSquareES2.dispose FIN diff --git a/src/test-native/bug1398/test1398-jogamp240rc-01.log b/src/test-native/bug1398/test1398-jogamp240rc-01.log new file mode 100644 index 000000000..e2c1d310b --- /dev/null +++ b/src/test-native/bug1398/test1398-jogamp240rc-01.log @@ -0,0 +1,59 @@ ++ ./Bug1398macOSContextOpsOnMainThread /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:242:NSApplicationMain(): argv[1]:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:248:NSApplicationMain(): main.1 +Bug1398macOSContextOpsOnMainThread.c:251:NSApplicationMain(): main.1.1 +2020-02-19 21:35:33.383 Bug1398macOSContextOpsOnMainThread[1697:65492] init +Bug1398macOSContextOpsOnMainThread.c:253:NSApplicationMain(): main.1.2 +Bug1398macOSContextOpsOnMainThread.c:255:NSApplicationMain(): main.1.3 +Bug1398macOSContextOpsOnMainThread.c:258:NSApplicationMain(): main.1.5 +Bug1398macOSContextOpsOnMainThread.c:182:create_jvm_thread(): create_jvm_thread.1.1 +Bug1398macOSContextOpsOnMainThread.c:190:create_jvm_thread(): create_jvm_thread.1.2 +Bug1398macOSContextOpsOnMainThread.c:194:create_jvm_thread(): create_jvm_thread.1.X +Bug1398macOSContextOpsOnMainThread.c:261:NSApplicationMain(): main.1.6 +Bug1398macOSContextOpsOnMainThread.c:59:launchJava(): launchJava.1.1 +Bug1398macOSContextOpsOnMainThread.c:74:launchJava(): launchJava.1.2 +Bug1398macOSContextOpsOnMainThread.c:75:launchJava(): .. using CLASSPATH .:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar +Bug1398macOSContextOpsOnMainThread.c:76:launchJava(): .. using LIBPATH /Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib +Bug1398macOSContextOpsOnMainThread.c:30:create_vm(): Found libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:80:launchJava(): CreateVM:10ad85b80 env:700004022da8 vm_args:700004022d68 +2020-02-19 21:35:33.502 Bug1398macOSContextOpsOnMainThread[1697:65492] App starting... +Bug1398macOSContextOpsOnMainThread.c:86:launchJava(): VM Created +Bug1398macOSContextOpsOnMainThread.c:89:launchJava(): launchJava.1.3 +Bug1398macOSContextOpsOnMainThread.c:96:launchJava(): launchJava.1.4 +Bug1398macOSContextOpsOnMainThread.c:101:launchJava(): launchJava.1.5 +Java version: 1.8 (1.8.0_192) +classloader:sun.misc.Launcher$AppClassLoader@764c12b6 +OS: Mac OS X 10.15.2 x86_64 +w:1920 h:1080 rr:60 bits:32 dim.w:800 dim.h:600 +gc.bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080] +dim: java.awt.Dimension[width=1920,height=1080] +Bug1398macOSContextOpsOnMainThread.c:103:launchJava(): Just passed NewObject()... +Bug1398macOSContextOpsOnMainThread.c:122:launchJava(): launchJava.1.X +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init: tileRendererInUse null +RedSquareES2 init on Thread[AWT-EventQueue-0,6,main] +Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] +INIT GL IS: jogamp.opengl.gl4.GL4bcImpl +Swap Interval 0 +GL Profile GLProfile[GL2/GL2.hw] +GL Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.3.9 [GL 2.1.0, vendor 14.3.9 (INTEL-14.3.9)] +Quirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +Impl. class jogamp.opengl.gl4.GL4bcImpl +GL_VENDOR Intel Inc. +GL_RENDERER Intel Iris OpenGL Engine +GL_VERSION 2.1 INTEL-14.3.9 +GLSL true, has-compiler-func: true, version: 1.20 / 1.20.0 +GL FBO: basic true, full true +GL_EXTENSIONS 128 +GLX_EXTENSIONS 0 +----------------------------------------------------------------------------------------------------- +ShaderState: attachShaderProgram: -1 -> 1 (enable: true) + null + ShaderProgram[id=1, linked=false, inUse=false, program: 1, + ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader: 2, source] + ShaderCode[id=2, type=FRAGMENT_SHADER, valid=true, shader: 3, source]] +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init FIN +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape 0/0 800x600 of 800x600, swapInterval 1, drawable 0x7fdd09c14d10, tileRendererInUse null +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape FIN +2020-02-19 21:35:36.508 Bug1398macOSContextOpsOnMainThread[1697:65492] startUpCompletionOperation main thread? ANS - YES +Thread[AWT-EventQueue-0,6,main] RedSquareES2.dispose: tileRendererInUse null +Thread[AWT-EventQueue-0,6,main] RedSquareES2.dispose FIN -- cgit v1.2.3 From ff780fc11602fb79a7ce1dcf879fdaeb865b9fa8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 21 Feb 2020 19:23:52 +0100 Subject: Bug 1398: Refine test case: Make classpath and libpath runtime configurable + show JOGL version --- .../bug1398/Bug1398macOSContextOpsOnMainThread.c | 73 +++++++++++------ .../Bug1398macOSContextOpsOnMainThread.java | 7 ++ src/test-native/bug1398/RedSquareES2.java | 6 +- src/test-native/bug1398/make-bug1398.sh | 25 +++--- src/test-native/bug1398/run-bug1398.sh | 26 +++--- src/test-native/bug1398/test1398-jogamp232-01.log | 66 --------------- .../bug1398/test1398-jogamp232_java08-01.log | 88 ++++++++++++++++++++ .../bug1398/test1398-jogamp232_java11-01.log | 93 ++++++++++++++++++++++ .../bug1398/test1398-jogamp240rc-01.log | 59 -------------- .../bug1398/test1398-jogamp240rc_java08-01.log | 86 ++++++++++++++++++++ 10 files changed, 352 insertions(+), 177 deletions(-) delete mode 100644 src/test-native/bug1398/test1398-jogamp232-01.log create mode 100644 src/test-native/bug1398/test1398-jogamp232_java08-01.log create mode 100644 src/test-native/bug1398/test1398-jogamp232_java11-01.log delete mode 100644 src/test-native/bug1398/test1398-jogamp240rc-01.log create mode 100644 src/test-native/bug1398/test1398-jogamp240rc_java08-01.log (limited to 'src/test-native/bug1398') diff --git a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c index 8fe51f97e..8491887c7 100644 --- a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c +++ b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -7,6 +8,14 @@ #define TRACE(fmt, ...) \ do { if (DEBUG_TRACE) fprintf(err, "%s:%d:%s(): " fmt "\n", __FILE__, __LINE__, __func__, __VA_ARGS__); fflush(err); } while (0) +static const char * classpath_arg_prelim = "-Djava.class.path="; +static const char * libpath_arg_prelim = "-Djava.library.path="; +static const char * arg_closing = ""; + +static char * classpath_arg = NULL; +static char * libpath_arg = NULL; +static char * jvm_libjli_path = NULL; + // JNI_CreateJavaVM typedef jint (JNICALL CREATEVM)(JavaVM **pvm, void **env, void *args); @@ -22,27 +31,20 @@ JavaVM *jvm = NULL; static const char *JNI_CREATEJAVAVM = "JNI_CreateJavaVM"; void *jvm_lib = NULL; -void *create_vm(const char *jvm_lib_path) +void *create_vm(void) { void *sym = NULL; - jvm_lib = dlopen(jvm_lib_path, RTLD_LAZY | RTLD_GLOBAL); + jvm_lib = dlopen(jvm_libjli_path, RTLD_LAZY | RTLD_GLOBAL); if (jvm_lib) { - TRACE("Found libjli.dylib%s", ""); + TRACE("Found libjli.dylib %s", jvm_libjli_path); sym = dlsym(jvm_lib, JNI_CREATEJAVAVM); } else { - TRACE("Unable to find libjli.dylib%s", ""); + TRACE("Unable to find libjli.dylib %s", jvm_libjli_path); } return sym; } -#ifndef CLASSPATH -#define CLASSPATH ".:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar" -#endif -#ifndef LIBPATH -#define LIBPATH "/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib" -#endif - -static void *launchJava(void *ptr) +static void *launchJava(void *unused) { int k = 0; @@ -59,8 +61,8 @@ static void *launchJava(void *ptr) TRACE("launchJava.1.1%s", ""); vm_args.nOptions = 7; JavaVMOption options[vm_args.nOptions]; - options[0].optionString = "-Djava.class.path="CLASSPATH; - options[1].optionString = "-Djava.library.path="LIBPATH; + options[0].optionString = classpath_arg; + options[1].optionString = libpath_arg; options[2].optionString = "-DNjogamp.debug=all"; options[3].optionString = "-DNjogamp.debug.NativeLibrary=true"; options[4].optionString = "-DNjogamp.debug.JNILibLoader=true"; @@ -72,11 +74,11 @@ static void *launchJava(void *ptr) vm_args.ignoreUnrecognized = JNI_TRUE; TRACE("launchJava.1.2%s", ""); - TRACE(".. using CLASSPATH %s", CLASSPATH); - TRACE(".. using LIBPATH %s", LIBPATH); + TRACE(".. using CLASSPATH %s", classpath_arg); + TRACE(".. using LIBPATH %s", libpath_arg); /* Create the Java VM */ - CREATEVM *CreateVM = create_vm((char *)ptr); + CREATEVM *CreateVM = create_vm(); TRACE("CreateVM:%lx env:%lx vm_args:%lx", (long unsigned int)CreateVM, (long unsigned int)&env, (long unsigned int)&vm_args); res = CreateVM(&jvm, (void**)&env, &vm_args); if (res < 0) { @@ -165,7 +167,7 @@ void die(JNIEnv *env) exit(0); } -void create_jvm_thread(const char *jvm_lib_path) +void create_jvm_thread(void) { pthread_t vmthread; @@ -189,7 +191,7 @@ void create_jvm_thread(const char *jvm_lib_path) } TRACE("create_jvm_thread.1.2%s", ""); - pthread_create(&vmthread, &thread_attr, launchJava, (void *)jvm_lib_path); + pthread_create(&vmthread, &thread_attr, launchJava, NULL); pthread_attr_destroy(&thread_attr); TRACE("create_jvm_thread.1.X%s", ""); } @@ -238,11 +240,36 @@ int NSApplicationMain(int argc, const char *argv[]) { err = stderr; + const int arg_closing_len = strlen(arg_closing); + for (int k = 1; k < argc; k++) { - TRACE("argv[%d]:%s", k, argv[k]); + if( !strcmp("-classpath", argv[k]) && k+1 < argc ) { + const int classpath_arg_prelim_len = strlen(classpath_arg_prelim); + const int classpath_len = strlen(argv[++k]); + classpath_arg = calloc(classpath_len + classpath_arg_prelim_len + arg_closing_len + 1, 1); + strncpy(classpath_arg, classpath_arg_prelim, classpath_arg_prelim_len+1); + strncpy(classpath_arg+classpath_arg_prelim_len, argv[k], classpath_len+1); + strncpy(classpath_arg+classpath_arg_prelim_len+classpath_len, arg_closing, arg_closing_len+1); + TRACE("argv[%d]: classpath arg %s", k, classpath_arg); + } else if( !strcmp("-libpath", argv[k]) && k+1 < argc ) { + const int libpath_arg_prelim_len = strlen(libpath_arg_prelim); + const int libpath_len = strlen(argv[++k]); + libpath_arg = calloc(libpath_len + libpath_arg_prelim_len + arg_closing_len + 1, 1); + strncpy(libpath_arg, libpath_arg_prelim, libpath_arg_prelim_len+1); + strncpy(libpath_arg+libpath_arg_prelim_len, argv[k], libpath_len+1); + strncpy(libpath_arg+libpath_arg_prelim_len+libpath_len, arg_closing, arg_closing_len+1); + TRACE("argv[%d]: libpath arg %s", k, libpath_arg); + } else if( !strcmp("-jvmlibjli", argv[k]) && k+1 < argc ) { + const int len = strlen(argv[++k]); + jvm_libjli_path = calloc(len + 1, 1); + strncpy(jvm_libjli_path, argv[k], len+1); + TRACE("argv[%d]: jvmlibjli %s", k, jvm_libjli_path); + } else { + TRACE("argv[%d]:%s", k, argv[k]); + } } - if (argc < 2) { - TRACE("Usage: Bug1398macOSContextOpsOnMainThread %s", "[libjli.dylib path]"); + if ( NULL == classpath_arg || NULL == libpath_arg || NULL == jvm_libjli_path ) { + TRACE("Usage: Bug1398macOSContextOpsOnMainThread -classpath CLASSPATH -libpath LIBPATH -jvmlibjli libjli.dylib%s", ""); exit(1); } TRACE("main.1%s", ""); @@ -257,7 +284,7 @@ int NSApplicationMain(int argc, const char *argv[]) { [NSApp setDelegate:_appDelegate]; TRACE("main.1.5%s", ""); - create_jvm_thread(argv[1]); + create_jvm_thread(); TRACE("main.1.6%s", ""); [NSApp run]; diff --git a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java index 65b3d3f59..b887e7428 100644 --- a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java +++ b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java @@ -85,6 +85,13 @@ public class Bug1398macOSContextOpsOnMainThread extends JFrame implements GLEven } }); animator.start(); + + try { + Thread.sleep(1000); + } catch (Exception e) {} + + animator.stop(); + System.exit(0); } /** diff --git a/src/test-native/bug1398/RedSquareES2.java b/src/test-native/bug1398/RedSquareES2.java index 86de51701..d65de45b2 100644 --- a/src/test-native/bug1398/RedSquareES2.java +++ b/src/test-native/bug1398/RedSquareES2.java @@ -27,6 +27,7 @@ */ // package com.jogamp.opengl.demos.es2; +import com.jogamp.common.util.VersionUtil; import com.jogamp.opengl.JoglVersion; import com.jogamp.opengl.util.GLArrayDataServer; import com.jogamp.opengl.util.PMVMatrix; @@ -93,12 +94,13 @@ public class RedSquareES2 implements GLEventListener, TileRendererBase.TileRende @Override public void init(final GLAutoDrawable glad) { if(verbose) { - System.err.println(Thread.currentThread()+" RedSquareES2.init: tileRendererInUse "+tileRendererInUse); + System.err.println(Thread.currentThread()+" RedSquareES2.init: tileRendererInUse "+tileRendererInUse+" on "+Thread.currentThread()); + System.err.println(VersionUtil.getPlatformInfo()); + System.err.println(JoglVersion.getInstance()); } final GL2ES2 gl = glad.getGL().getGL2ES2(); if(verbose) { - System.err.println("RedSquareES2 init on "+Thread.currentThread()); System.err.println("Chosen GLCapabilities: " + glad.getChosenGLCapabilities()); System.err.println("INIT GL IS: " + gl.getClass().getName()); System.err.println(JoglVersion.getGLStrings(gl, null, false).toString()); diff --git a/src/test-native/bug1398/make-bug1398.sh b/src/test-native/bug1398/make-bug1398.sh index d410f7066..7ec9935d9 100755 --- a/src/test-native/bug1398/make-bug1398.sh +++ b/src/test-native/bug1398/make-bug1398.sh @@ -2,25 +2,18 @@ set -x -USE_232=1 +JOGAMP_VERSION=v2.3.2 +#JOGAMP_VERSION=v2.2.4 + +CLASSPATH=".:/Users/jogamp/projects/JogAmp/builds/$JOGAMP_VERSION/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/$JOGAMP_VERSION/jogamp-all-platforms/jar/jogl-all.jar" + ok=0 -if [ $USE_232 -eq 0 ] ; then - xcrun clang -x objective-c -framework Cocoa \ - -DCLASSPATH="\".:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar\"" \ - -DLIBPATH="\"/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib\"" \ - -o Bug1398macOSContextOpsOnMainThread Bug1398macOSContextOpsOnMainThread.c \ - && ok=1 -else - xcrun clang -x objective-c -framework Cocoa \ - -DCLASSPATH="\".:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar\"" \ - -DLIBPATH="\"/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal\"" \ - -o Bug1398macOSContextOpsOnMainThread Bug1398macOSContextOpsOnMainThread.c \ - && ok=1 -fi +xcrun clang -x objective-c -framework Cocoa \ + -o Bug1398macOSContextOpsOnMainThread Bug1398macOSContextOpsOnMainThread.c \ + && ok=1 if [ $ok -eq 1 ] ; then - javac -source 1.8 -target 1.8 -classpath ../../../../gluegen/build/gluegen-rt.jar:../../../build/jar/jogl-all.jar RedSquareES2.java Bug1398macOSContextOpsOnMainThread.java + javac -source 1.8 -target 1.8 -classpath $CLASSPATH RedSquareES2.java Bug1398macOSContextOpsOnMainThread.java fi -# ./Bug1398macOSContextOpsOnMainThread /Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib/lib diff --git a/src/test-native/bug1398/run-bug1398.sh b/src/test-native/bug1398/run-bug1398.sh index b4252bbdd..a014d13d2 100644 --- a/src/test-native/bug1398/run-bug1398.sh +++ b/src/test-native/bug1398/run-bug1398.sh @@ -1,16 +1,20 @@ #! /bin/bash -# export LD_LIBRARY_PATH=/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib -# export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH +JVM_JLI_LIB=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib +# JVM_JLI_LIB=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib -#rm -rf natives -#mkdir -p natives/macosx-universal -#cp -av /Users/jogamp/projects/JogAmp/gluegen/build/obj/libgluegen_rt.so natives/macosx-universal/ -#cp -av natives/macosx-universal/libgluegen_rt.so natives/macosx-universal/libgluegen_rt.dylib -#cp -av /Users/jogamp/projects/JogAmp/jogl/build/lib/*dylib natives/macosx-universal/ +JOGAMP_VERSION=v2.3.2 +#JOGAMP_VERSION=v2.2.4 -# ./Bug1398macOSContextOpsOnMainThread /Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib/lib -# ./Bug1398macOSContextOpsOnMainThread /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/server/libjvm.dylib +if [ -z "$JOGAMP_VERSION" ] ; then + ./Bug1398macOSContextOpsOnMainThread -jvmlibjli $JVM_JLI_LIB \ + -classpath ".:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar" \ + -libpath "/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib" +else + + ./Bug1398macOSContextOpsOnMainThread -jvmlibjli $JVM_JLI_LIB \ + -classpath ".:/Users/jogamp/projects/JogAmp/builds/$JOGAMP_VERSION/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar" \ + -libpath "/Users/jogamp/projects/JogAmp/builds/$JOGAMP_VERSION/jogamp-all-platforms/lib/macosx-universal" + +fi -./Bug1398macOSContextOpsOnMainThread /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib -# ./Bug1398macOSContextOpsOnMainThread /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib diff --git a/src/test-native/bug1398/test1398-jogamp232-01.log b/src/test-native/bug1398/test1398-jogamp232-01.log deleted file mode 100644 index bfc11684a..000000000 --- a/src/test-native/bug1398/test1398-jogamp232-01.log +++ /dev/null @@ -1,66 +0,0 @@ -+ ./Bug1398macOSContextOpsOnMainThread /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:242:NSApplicationMain(): argv[1]:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:248:NSApplicationMain(): main.1 -Bug1398macOSContextOpsOnMainThread.c:251:NSApplicationMain(): main.1.1 -2020-02-19 21:36:02.797 Bug1398macOSContextOpsOnMainThread[1710:65756] init -Bug1398macOSContextOpsOnMainThread.c:253:NSApplicationMain(): main.1.2 -Bug1398macOSContextOpsOnMainThread.c:255:NSApplicationMain(): main.1.3 -Bug1398macOSContextOpsOnMainThread.c:258:NSApplicationMain(): main.1.5 -Bug1398macOSContextOpsOnMainThread.c:182:create_jvm_thread(): create_jvm_thread.1.1 -Bug1398macOSContextOpsOnMainThread.c:190:create_jvm_thread(): create_jvm_thread.1.2 -Bug1398macOSContextOpsOnMainThread.c:194:create_jvm_thread(): create_jvm_thread.1.X -Bug1398macOSContextOpsOnMainThread.c:261:NSApplicationMain(): main.1.6 -Bug1398macOSContextOpsOnMainThread.c:59:launchJava(): launchJava.1.1 -Bug1398macOSContextOpsOnMainThread.c:74:launchJava(): launchJava.1.2 -Bug1398macOSContextOpsOnMainThread.c:75:launchJava(): .. using CLASSPATH .:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar -Bug1398macOSContextOpsOnMainThread.c:76:launchJava(): .. using LIBPATH /Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal -Bug1398macOSContextOpsOnMainThread.c:30:create_vm(): Found libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:80:launchJava(): CreateVM:104c47b80 env:70000bb98da8 vm_args:70000bb98d68 -2020-02-19 21:36:02.934 Bug1398macOSContextOpsOnMainThread[1710:65756] App starting... -Bug1398macOSContextOpsOnMainThread.c:86:launchJava(): VM Created -Bug1398macOSContextOpsOnMainThread.c:89:launchJava(): launchJava.1.3 -2020-02-19 21:36:04.091 Bug1398macOSContextOpsOnMainThread[1710:65801] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from ( - 0 AppKit 0x00007fff2c051575 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 371 - 1 AppKit 0x00007fff2c038ed5 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416 - 2 AppKit 0x00007fff2c038947 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42 - 3 libnativewindow_macosx.jnilib 0x00000001099203fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398 - 4 ??? 0x000000010ae94667 0x0 + 4478027367 -) -Bug1398macOSContextOpsOnMainThread.c:96:launchJava(): launchJava.1.4 -Bug1398macOSContextOpsOnMainThread.c:101:launchJava(): launchJava.1.5 -Java version: 1.8 (1.8.0_192) -classloader:sun.misc.Launcher$AppClassLoader@764c12b6 -OS: Mac OS X 10.15.2 x86_64 -w:1920 h:1080 rr:60 bits:32 dim.w:800 dim.h:600 -gc.bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080] -dim: java.awt.Dimension[width=1920,height=1080] -Bug1398macOSContextOpsOnMainThread.c:103:launchJava(): Just passed NewObject()... -Bug1398macOSContextOpsOnMainThread.c:122:launchJava(): launchJava.1.X -Thread[AWT-EventQueue-0,6,main] RedSquareES2.init: tileRendererInUse null -RedSquareES2 init on Thread[AWT-EventQueue-0,6,main] -Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] -INIT GL IS: jogamp.opengl.gl4.GL4bcImpl -Swap Interval 0 -GL Profile GLProfile[GL2/GL2.hw] -GL Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.3.9 [GL 2.1.0, vendor 14.3.9 (INTEL-14.3.9)] -Quirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] -Impl. class jogamp.opengl.gl4.GL4bcImpl -GL_VENDOR Intel Inc. -GL_RENDERER Intel Iris OpenGL Engine -GL_VERSION 2.1 INTEL-14.3.9 -GLSL true, has-compiler-func: true, version: 1.20 / 1.20.0 -GL FBO: basic true, full true -GL_EXTENSIONS 128 -GLX_EXTENSIONS 0 ------------------------------------------------------------------------------------------------------ -ShaderState: attachShaderProgram: -1 -> 1 (enable: true) - null - ShaderProgram[id=1, linked=false, inUse=false, program: 1, - ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader: 2, source] - ShaderCode[id=2, type=FRAGMENT_SHADER, valid=true, shader: 3, source]] -Thread[AWT-EventQueue-0,6,main] RedSquareES2.init FIN -Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape 0/0 800x600 of 800x600, swapInterval 1, drawable 0x7f9d55d94400, tileRendererInUse null -Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape FIN -2020-02-19 21:36:05.940 Bug1398macOSContextOpsOnMainThread[1710:65756] startUpCompletionOperation main thread? ANS - YES -Thread[AWT-EventQueue-0,6,main] RedSquareES2.dispose: tileRendererInUse null -Thread[AWT-EventQueue-0,6,main] RedSquareES2.dispose FIN diff --git a/src/test-native/bug1398/test1398-jogamp232_java08-01.log b/src/test-native/bug1398/test1398-jogamp232_java08-01.log new file mode 100644 index 000000000..2c1e108a2 --- /dev/null +++ b/src/test-native/bug1398/test1398-jogamp232_java08-01.log @@ -0,0 +1,88 @@ +Bug1398macOSContextOpsOnMainThread.c:266:NSApplicationMain(): argv[2]: jvmlibjli /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:253:NSApplicationMain(): argv[4]: classpath arg -Djava.class.path=.:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar +Bug1398macOSContextOpsOnMainThread.c:261:NSApplicationMain(): argv[6]: libpath arg -Djava.library.path=/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal +Bug1398macOSContextOpsOnMainThread.c:275:NSApplicationMain(): main.1 +Bug1398macOSContextOpsOnMainThread.c:278:NSApplicationMain(): main.1.1 +2020-02-21 19:13:41.768 Bug1398macOSContextOpsOnMainThread[1045:20769] init +Bug1398macOSContextOpsOnMainThread.c:280:NSApplicationMain(): main.1.2 +Bug1398macOSContextOpsOnMainThread.c:282:NSApplicationMain(): main.1.3 +Bug1398macOSContextOpsOnMainThread.c:285:NSApplicationMain(): main.1.5 +Bug1398macOSContextOpsOnMainThread.c:184:create_jvm_thread(): create_jvm_thread.1.1 +Bug1398macOSContextOpsOnMainThread.c:192:create_jvm_thread(): create_jvm_thread.1.2 +Bug1398macOSContextOpsOnMainThread.c:196:create_jvm_thread(): create_jvm_thread.1.X +Bug1398macOSContextOpsOnMainThread.c:288:NSApplicationMain(): main.1.6 +Bug1398macOSContextOpsOnMainThread.c:61:launchJava(): launchJava.1.1 +Bug1398macOSContextOpsOnMainThread.c:76:launchJava(): launchJava.1.2 +Bug1398macOSContextOpsOnMainThread.c:77:launchJava(): .. using CLASSPATH -Djava.class.path=.:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar +Bug1398macOSContextOpsOnMainThread.c:78:launchJava(): .. using LIBPATH -Djava.library.path=/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal +Bug1398macOSContextOpsOnMainThread.c:39:create_vm(): Found libjli.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:82:launchJava(): CreateVM:10884fb80 env:700006d99da8 vm_args:700006d99d68 +2020-02-21 19:13:41.829 Bug1398macOSContextOpsOnMainThread[1045:20769] App starting... +Bug1398macOSContextOpsOnMainThread.c:88:launchJava(): VM Created +Bug1398macOSContextOpsOnMainThread.c:91:launchJava(): launchJava.1.3 +2020-02-21 19:13:42.870 Bug1398macOSContextOpsOnMainThread[1045:20790] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from ( + 0 AppKit 0x00007fff2a3e0575 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 371 + 1 AppKit 0x00007fff2a3c7ed5 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416 + 2 AppKit 0x00007fff2a3c7947 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42 + 3 libnativewindow_macosx.jnilib 0x00000001229f53fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398 + 4 ??? 0x000000010ca4e667 0x0 + 4507100775 +) +Bug1398macOSContextOpsOnMainThread.c:98:launchJava(): launchJava.1.4 +Bug1398macOSContextOpsOnMainThread.c:103:launchJava(): launchJava.1.5 +Java version: 1.8 (1.8.0_192) +classloader:sun.misc.Launcher$AppClassLoader@764c12b6 +OS: Mac OS X 10.15.2 x86_64 +w:1920 h:1080 rr:60 bits:32 dim.w:800 dim.h:600 +gc.bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080] +dim: java.awt.Dimension[width=1920,height=1080] +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init: tileRendererInUse null on Thread[AWT-EventQueue-0,6,main] +----------------------------------------------------------------------------------------------------- +Platform: MACOS / Mac OS X 10.15.2 (10.15.2), x86_64 (X86_64, GENERIC_ABI), 4 cores, littleEndian true +MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment: + int8 1 / 1, int16 2 / 2 + int 4 / 4, long 8 / 8 + int32 4 / 4, int64 8 / 8 + float 4 / 4, double 8 / 8, ldouble 16 / 16 + pointer 8 / 8, page 4096 +Platform: Java Version: 1.8.0_192 (1.8.0u192), VM: Java HotSpot(TM) 64-Bit Server VM, Runtime: Java(TM) SE Runtime Environment +Platform: Java Vendor: Oracle Corporation, http://java.oracle.com/, JavaSE: true, Java6: true, AWT enabled: true +----------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------- +Package: com.jogamp.opengl +Extension Name: com.jogamp.opengl +Specification Title: Java Bindings for OpenGL API Specification +Specification Vendor: JogAmp Community +Specification Version: 2.3 +Implementation Title: Java Bindings for OpenGL Runtime Environment +Implementation Vendor: JogAmp Community +Implementation Vendor ID: com.jogamp +Implementation URL: http://jogamp.org/ +Implementation Version: 2.3.2 +Implementation Build: 2.3-b1469-20151010 +Implementation Branch: origin/master +Implementation Commit: e794fc40ba723f2fca4ac892e873975fb393e007 +----------------------------------------------------------------------------------------------------- +Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] +INIT GL IS: jogamp.opengl.gl4.GL4bcImpl +Swap Interval 0 +GL Profile GLProfile[GL2/GL2.hw] +GL Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.3.9 [GL 2.1.0, vendor 14.3.9 (INTEL-14.3.9)] +Quirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +Impl. class jogamp.opengl.gl4.GL4bcImpl +GL_VENDOR Intel Inc. +GL_RENDERER Intel Iris OpenGL Engine +GL_VERSION 2.1 INTEL-14.3.9 +GLSL true, has-compiler-func: true, version: 1.20 / 1.20.0 +GL FBO: basic true, full true +GL_EXTENSIONS 128 +GLX_EXTENSIONS 0 +----------------------------------------------------------------------------------------------------- +ShaderState: attachShaderProgram: -1 -> 1 (enable: true) + null + ShaderProgram[id=1, linked=false, inUse=false, program: 1, + ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader: 2, source] + ShaderCode[id=2, type=FRAGMENT_SHADER, valid=true, shader: 3, source]] +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init FIN +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape 0/0 800x600 of 800x600, swapInterval 1, drawable 0x7fe933379570, tileRendererInUse null +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape FIN +2020-02-21 19:13:44.831 Bug1398macOSContextOpsOnMainThread[1045:20769] startUpCompletionOperation main thread? ANS - YES diff --git a/src/test-native/bug1398/test1398-jogamp232_java11-01.log b/src/test-native/bug1398/test1398-jogamp232_java11-01.log new file mode 100644 index 000000000..fd7144364 --- /dev/null +++ b/src/test-native/bug1398/test1398-jogamp232_java11-01.log @@ -0,0 +1,93 @@ +Bug1398macOSContextOpsOnMainThread.c:266:NSApplicationMain(): argv[2]: jvmlibjli /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:253:NSApplicationMain(): argv[4]: classpath arg -Djava.class.path=.:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar +Bug1398macOSContextOpsOnMainThread.c:261:NSApplicationMain(): argv[6]: libpath arg -Djava.library.path=/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal +Bug1398macOSContextOpsOnMainThread.c:275:NSApplicationMain(): main.1 +Bug1398macOSContextOpsOnMainThread.c:278:NSApplicationMain(): main.1.1 +2020-02-21 19:11:55.398 Bug1398macOSContextOpsOnMainThread[1030:20387] init +Bug1398macOSContextOpsOnMainThread.c:280:NSApplicationMain(): main.1.2 +Bug1398macOSContextOpsOnMainThread.c:282:NSApplicationMain(): main.1.3 +Bug1398macOSContextOpsOnMainThread.c:285:NSApplicationMain(): main.1.5 +Bug1398macOSContextOpsOnMainThread.c:184:create_jvm_thread(): create_jvm_thread.1.1 +Bug1398macOSContextOpsOnMainThread.c:192:create_jvm_thread(): create_jvm_thread.1.2 +Bug1398macOSContextOpsOnMainThread.c:196:create_jvm_thread(): create_jvm_thread.1.X +Bug1398macOSContextOpsOnMainThread.c:288:NSApplicationMain(): main.1.6 +Bug1398macOSContextOpsOnMainThread.c:61:launchJava(): launchJava.1.1 +Bug1398macOSContextOpsOnMainThread.c:76:launchJava(): launchJava.1.2 +Bug1398macOSContextOpsOnMainThread.c:77:launchJava(): .. using CLASSPATH -Djava.class.path=.:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar +Bug1398macOSContextOpsOnMainThread.c:78:launchJava(): .. using LIBPATH -Djava.library.path=/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal +Bug1398macOSContextOpsOnMainThread.c:39:create_vm(): Found libjli.dylib /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:82:launchJava(): CreateVM:108243151 env:70000f0dcda8 vm_args:70000f0dcd68 +2020-02-21 19:11:55.459 Bug1398macOSContextOpsOnMainThread[1030:20387] App starting... +Bug1398macOSContextOpsOnMainThread.c:88:launchJava(): VM Created +Bug1398macOSContextOpsOnMainThread.c:91:launchJava(): launchJava.1.3 +WARNING: An illegal reflective access operation has occurred +WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/usr/local/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String) +WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3 +WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations +WARNING: All illegal access operations will be denied in a future release +2020-02-21 19:11:56.559 Bug1398macOSContextOpsOnMainThread[1030:20412] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from ( + 0 AppKit 0x00007fff2a3e0575 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 371 + 1 AppKit 0x00007fff2a3c7ed5 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416 + 2 AppKit 0x00007fff2a3c7947 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42 + 3 libnativewindow_macosx.jnilib 0x000000010d2fa3fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398 + 4 ??? 0x0000000115b23950 0x0 + 4658968912 +) +Bug1398macOSContextOpsOnMainThread.c:98:launchJava(): launchJava.1.4 +Bug1398macOSContextOpsOnMainThread.c:103:launchJava(): launchJava.1.5 +Java version: null (null) +classloader:jdk.internal.loader.ClassLoaders$AppClassLoader@799f7e29 +OS: Mac OS X 10.15.2 x86_64 +w:1920 h:1080 rr:60 bits:32 dim.w:800 dim.h:600 +gc.bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080] +dim: java.awt.Dimension[width=1920,height=1080] +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init: tileRendererInUse null on Thread[AWT-EventQueue-0,6,main] +----------------------------------------------------------------------------------------------------- +Platform: MACOS / Mac OS X 10.15.2 (10.15.2), x86_64 (X86_64, GENERIC_ABI), 4 cores, littleEndian true +MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment: + int8 1 / 1, int16 2 / 2 + int 4 / 4, long 8 / 8 + int32 4 / 4, int64 8 / 8 + float 4 / 4, double 8 / 8, ldouble 16 / 16 + pointer 8 / 8, page 4096 +Platform: Java Version: 11.0.3 (11.0.3u0), VM: OpenJDK 64-Bit Server VM, Runtime: OpenJDK Runtime Environment +Platform: Java Vendor: AdoptOpenJDK, https://adoptopenjdk.net/, JavaSE: true, Java6: true, AWT enabled: true +----------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------- +Package: com.jogamp.opengl +Extension Name: com.jogamp.opengl +Specification Title: Java Bindings for OpenGL API Specification +Specification Vendor: JogAmp Community +Specification Version: 2.3 +Implementation Title: Java Bindings for OpenGL Runtime Environment +Implementation Vendor: JogAmp Community +Implementation Vendor ID: com.jogamp +Implementation URL: http://jogamp.org/ +Implementation Version: 2.3.2 +Implementation Build: 2.3-b1469-20151010 +Implementation Branch: origin/master +Implementation Commit: e794fc40ba723f2fca4ac892e873975fb393e007 +----------------------------------------------------------------------------------------------------- +Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] +INIT GL IS: jogamp.opengl.gl4.GL4bcImpl +Swap Interval 0 +GL Profile GLProfile[GL2/GL2.hw] +GL Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.3.9 [GL 2.1.0, vendor 14.3.9 (INTEL-14.3.9)] +Quirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +Impl. class jogamp.opengl.gl4.GL4bcImpl +GL_VENDOR Intel Inc. +GL_RENDERER Intel Iris OpenGL Engine +GL_VERSION 2.1 INTEL-14.3.9 +GLSL true, has-compiler-func: true, version: 1.20 / 1.20.0 +GL FBO: basic true, full true +GL_EXTENSIONS 128 +GLX_EXTENSIONS 0 +----------------------------------------------------------------------------------------------------- +ShaderState: attachShaderProgram: -1 -> 1 (enable: true) + null + ShaderProgram[id=1, linked=false, inUse=false, program: 1, + ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader: 2, source] + ShaderCode[id=2, type=FRAGMENT_SHADER, valid=true, shader: 3, source]] +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init FIN +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape 0/0 800x600 of 800x600, swapInterval 1, drawable 0x7f8deb4bf3d0, tileRendererInUse null +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape FIN +2020-02-21 19:11:58.466 Bug1398macOSContextOpsOnMainThread[1030:20387] startUpCompletionOperation main thread? ANS - YES diff --git a/src/test-native/bug1398/test1398-jogamp240rc-01.log b/src/test-native/bug1398/test1398-jogamp240rc-01.log deleted file mode 100644 index e2c1d310b..000000000 --- a/src/test-native/bug1398/test1398-jogamp240rc-01.log +++ /dev/null @@ -1,59 +0,0 @@ -+ ./Bug1398macOSContextOpsOnMainThread /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:242:NSApplicationMain(): argv[1]:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:248:NSApplicationMain(): main.1 -Bug1398macOSContextOpsOnMainThread.c:251:NSApplicationMain(): main.1.1 -2020-02-19 21:35:33.383 Bug1398macOSContextOpsOnMainThread[1697:65492] init -Bug1398macOSContextOpsOnMainThread.c:253:NSApplicationMain(): main.1.2 -Bug1398macOSContextOpsOnMainThread.c:255:NSApplicationMain(): main.1.3 -Bug1398macOSContextOpsOnMainThread.c:258:NSApplicationMain(): main.1.5 -Bug1398macOSContextOpsOnMainThread.c:182:create_jvm_thread(): create_jvm_thread.1.1 -Bug1398macOSContextOpsOnMainThread.c:190:create_jvm_thread(): create_jvm_thread.1.2 -Bug1398macOSContextOpsOnMainThread.c:194:create_jvm_thread(): create_jvm_thread.1.X -Bug1398macOSContextOpsOnMainThread.c:261:NSApplicationMain(): main.1.6 -Bug1398macOSContextOpsOnMainThread.c:59:launchJava(): launchJava.1.1 -Bug1398macOSContextOpsOnMainThread.c:74:launchJava(): launchJava.1.2 -Bug1398macOSContextOpsOnMainThread.c:75:launchJava(): .. using CLASSPATH .:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar -Bug1398macOSContextOpsOnMainThread.c:76:launchJava(): .. using LIBPATH /Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib -Bug1398macOSContextOpsOnMainThread.c:30:create_vm(): Found libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:80:launchJava(): CreateVM:10ad85b80 env:700004022da8 vm_args:700004022d68 -2020-02-19 21:35:33.502 Bug1398macOSContextOpsOnMainThread[1697:65492] App starting... -Bug1398macOSContextOpsOnMainThread.c:86:launchJava(): VM Created -Bug1398macOSContextOpsOnMainThread.c:89:launchJava(): launchJava.1.3 -Bug1398macOSContextOpsOnMainThread.c:96:launchJava(): launchJava.1.4 -Bug1398macOSContextOpsOnMainThread.c:101:launchJava(): launchJava.1.5 -Java version: 1.8 (1.8.0_192) -classloader:sun.misc.Launcher$AppClassLoader@764c12b6 -OS: Mac OS X 10.15.2 x86_64 -w:1920 h:1080 rr:60 bits:32 dim.w:800 dim.h:600 -gc.bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080] -dim: java.awt.Dimension[width=1920,height=1080] -Bug1398macOSContextOpsOnMainThread.c:103:launchJava(): Just passed NewObject()... -Bug1398macOSContextOpsOnMainThread.c:122:launchJava(): launchJava.1.X -Thread[AWT-EventQueue-0,6,main] RedSquareES2.init: tileRendererInUse null -RedSquareES2 init on Thread[AWT-EventQueue-0,6,main] -Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] -INIT GL IS: jogamp.opengl.gl4.GL4bcImpl -Swap Interval 0 -GL Profile GLProfile[GL2/GL2.hw] -GL Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.3.9 [GL 2.1.0, vendor 14.3.9 (INTEL-14.3.9)] -Quirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] -Impl. class jogamp.opengl.gl4.GL4bcImpl -GL_VENDOR Intel Inc. -GL_RENDERER Intel Iris OpenGL Engine -GL_VERSION 2.1 INTEL-14.3.9 -GLSL true, has-compiler-func: true, version: 1.20 / 1.20.0 -GL FBO: basic true, full true -GL_EXTENSIONS 128 -GLX_EXTENSIONS 0 ------------------------------------------------------------------------------------------------------ -ShaderState: attachShaderProgram: -1 -> 1 (enable: true) - null - ShaderProgram[id=1, linked=false, inUse=false, program: 1, - ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader: 2, source] - ShaderCode[id=2, type=FRAGMENT_SHADER, valid=true, shader: 3, source]] -Thread[AWT-EventQueue-0,6,main] RedSquareES2.init FIN -Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape 0/0 800x600 of 800x600, swapInterval 1, drawable 0x7fdd09c14d10, tileRendererInUse null -Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape FIN -2020-02-19 21:35:36.508 Bug1398macOSContextOpsOnMainThread[1697:65492] startUpCompletionOperation main thread? ANS - YES -Thread[AWT-EventQueue-0,6,main] RedSquareES2.dispose: tileRendererInUse null -Thread[AWT-EventQueue-0,6,main] RedSquareES2.dispose FIN diff --git a/src/test-native/bug1398/test1398-jogamp240rc_java08-01.log b/src/test-native/bug1398/test1398-jogamp240rc_java08-01.log new file mode 100644 index 000000000..cf7b37789 --- /dev/null +++ b/src/test-native/bug1398/test1398-jogamp240rc_java08-01.log @@ -0,0 +1,86 @@ +Bug1398macOSContextOpsOnMainThread.c:266:NSApplicationMain(): argv[2]: jvmlibjli /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:253:NSApplicationMain(): argv[4]: classpath arg -Djava.class.path=.:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar +Bug1398macOSContextOpsOnMainThread.c:261:NSApplicationMain(): argv[6]: libpath arg -Djava.library.path=/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib +Bug1398macOSContextOpsOnMainThread.c:275:NSApplicationMain(): main.1 +Bug1398macOSContextOpsOnMainThread.c:278:NSApplicationMain(): main.1.1 +2020-02-21 19:14:37.376 Bug1398macOSContextOpsOnMainThread[1057:21063] init +Bug1398macOSContextOpsOnMainThread.c:280:NSApplicationMain(): main.1.2 +Bug1398macOSContextOpsOnMainThread.c:282:NSApplicationMain(): main.1.3 +Bug1398macOSContextOpsOnMainThread.c:285:NSApplicationMain(): main.1.5 +Bug1398macOSContextOpsOnMainThread.c:184:create_jvm_thread(): create_jvm_thread.1.1 +Bug1398macOSContextOpsOnMainThread.c:192:create_jvm_thread(): create_jvm_thread.1.2 +Bug1398macOSContextOpsOnMainThread.c:61:launchJava(): launchJava.1.1 +Bug1398macOSContextOpsOnMainThread.c:76:launchJava(): launchJava.1.2 +Bug1398macOSContextOpsOnMainThread.c:77:launchJava(): .. using CLASSPATH -Djava.class.path=.:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar +Bug1398macOSContextOpsOnMainThread.c:78:launchJava(): .. using LIBPATH -Djava.library.path=/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib +Bug1398macOSContextOpsOnMainThread.c:196:create_jvm_thread(): create_jvm_thread.1.X +Bug1398macOSContextOpsOnMainThread.c:288:NSApplicationMain(): main.1.6 +Bug1398macOSContextOpsOnMainThread.c:39:create_vm(): Found libjli.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib +Bug1398macOSContextOpsOnMainThread.c:82:launchJava(): CreateVM:110285b80 env:700003d1ada8 vm_args:700003d1ad68 +2020-02-21 19:14:37.439 Bug1398macOSContextOpsOnMainThread[1057:21063] App starting... +Bug1398macOSContextOpsOnMainThread.c:88:launchJava(): VM Created +Bug1398macOSContextOpsOnMainThread.c:91:launchJava(): launchJava.1.3 +Bug1398macOSContextOpsOnMainThread.c:98:launchJava(): launchJava.1.4 +Bug1398macOSContextOpsOnMainThread.c:103:launchJava(): launchJava.1.5 +Java version: 1.8 (1.8.0_192) +classloader:sun.misc.Launcher$AppClassLoader@764c12b6 +OS: Mac OS X 10.15.2 x86_64 +w:1920 h:1080 rr:60 bits:32 dim.w:800 dim.h:600 +gc.bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080] +dim: java.awt.Dimension[width=1920,height=1080] +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init: tileRendererInUse null on Thread[AWT-EventQueue-0,6,main] +----------------------------------------------------------------------------------------------------- +Platform: MACOS / Mac OS X 10.15.2 (10.15.2), x86_64 (X86_64, GENERIC_ABI), 4 cores, littleEndian true +MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment: + int8 1 / 1, int16 2 / 2 + int 4 / 4, long 8 / 8 + int32 4 / 4, int64 8 / 8 + float 4 / 4, double 8 / 8, ldouble 16 / 16 + pointer 8 / 8, page 4096 +Platform: Java Version: 1.8.0_192 (1.8.0u192), VM: Java HotSpot(TM) 64-Bit Server VM, Runtime: Java(TM) SE Runtime Environment +Platform: Java Vendor: Oracle Corporation, http://java.oracle.com/, JavaSE: true, Java9: false, Java6: true, dynamicLib: true, AWT enabled: true +----------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------- +Package: com.jogamp.opengl +Extension Name: com.jogamp.opengl +Specification Title: Java Bindings for OpenGL API Specification +Specification Vendor: JogAmp Community +Specification Version: 2.4 +Implementation Title: Java Bindings for OpenGL Runtime Environment +Implementation Vendor: JogAmp Community +Implementation Vendor ID: com.jogamp +Implementation URL: http://jogamp.org/ +Implementation Version: 2.4.0-rc-20200106 +Implementation Build: 2.4-bmanual-20200106 +Implementation Branch: master +Implementation Commit: 0209655c26e9240639c5f0a76ca6ca54ae0584b1 +Implementation SHA Sources: null +Implementation SHA Classes: null +Implementation SHA Classes-this: null +Implementation SHA Natives: null +Implementation SHA Natives-this: null +----------------------------------------------------------------------------------------------------- +Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] +INIT GL IS: jogamp.opengl.gl4.GL4bcImpl +Swap Interval 0 +GL Profile GLProfile[GL2/GL2.hw] +GL Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.3.9 [GL 2.1.0, vendor 14.3.9 (INTEL-14.3.9)] +Quirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +Impl. class jogamp.opengl.gl4.GL4bcImpl +GL_VENDOR Intel Inc. +GL_RENDERER Intel Iris OpenGL Engine +GL_VERSION 2.1 INTEL-14.3.9 +GLSL true, has-compiler-func: true, version: 1.20 / 1.20.0 +GL FBO: basic true, full true +GL_EXTENSIONS 128 +GLX_EXTENSIONS 0 +----------------------------------------------------------------------------------------------------- +ShaderState: attachShaderProgram: -1 -> 1 (enable: true) + null + ShaderProgram[id=1, linked=false, inUse=false, program: 1, + ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader: 2, source] + ShaderCode[id=2, type=FRAGMENT_SHADER, valid=true, shader: 3, source]] +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init FIN +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape 0/0 800x600 of 800x600, swapInterval 1, drawable 0x7ff875d200c0, tileRendererInUse null +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape FIN +2020-02-21 19:14:40.445 Bug1398macOSContextOpsOnMainThread[1057:21063] startUpCompletionOperation main thread? ANS - YES -- cgit v1.2.3 From 78b96b89a68ff35969aea83de294cd3cc1178f26 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 22 Feb 2020 15:11:17 +0100 Subject: Bug 1398: Crash only occurs @ -[NSOpenGLContext setView:] when using XCode 11 _and_ its default SDK 'macosx10.15' This patch demonstrates that using the SDK 'macosx10.11' does not cause the crash @ -[NSOpenGLContext setView:]. SDK 'macosx10.15' enforces Apple's own Cargo Cult of 'main-thread' by throwing a SIGILL signal (or SIGABRT) - essentially an exception. This surely renders our code officially invalid due to this policy, i.e. we are not allowed to issue [* setView] on any non main-thread. +++ The crash occurs independently of used Java version on Java 8 - 11, as well as on JogAmp 2.3.2 - current master tip. +++ The initial remedy to issue said action on the main-thread in a blocking/wait manner has the risk to deadlock, due to 1) [NSOpenGLContext setView:] itself using a mutex (Thanks to Ken Harris's analysis) and (2) in case where we are 'thread hopping': - [main-thread] Event like 'window ready' -> kick off action on EDT-thread *blocking* - [EDT-thread] Create stuff incl OpenGLContext -> kick off setView on main-thread *blocking* This has to be further investigated. This crash finally has been reliably reproduced now. --- src/test-native/bug1398/Bug1398Launcher.c | 349 +++++++ src/test-native/bug1398/Bug1398MainClass.java | 135 +++ .../bug1398/Bug1398macOSContextOpsOnMainThread.c | 345 ------- .../Bug1398macOSContextOpsOnMainThread.java | 135 --- src/test-native/bug1398/log/hs_err_pid2328.log | 803 +++++++++++++++ .../bug1398/log/run-bug1398-sdk1011.log | 1020 ++++++++++++++++++++ .../bug1398/log/run-bug1398-sdk1015.log | 187 ++++ src/test-native/bug1398/make-bug1398.sh | 16 +- src/test-native/bug1398/run-bug1398.sh | 33 +- .../bug1398/test1398-jogamp232_java08-01.log | 88 -- .../bug1398/test1398-jogamp232_java11-01.log | 93 -- .../bug1398/test1398-jogamp240rc_java08-01.log | 86 -- 12 files changed, 2535 insertions(+), 755 deletions(-) create mode 100644 src/test-native/bug1398/Bug1398Launcher.c create mode 100644 src/test-native/bug1398/Bug1398MainClass.java delete mode 100644 src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c delete mode 100644 src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java create mode 100644 src/test-native/bug1398/log/hs_err_pid2328.log create mode 100644 src/test-native/bug1398/log/run-bug1398-sdk1011.log create mode 100644 src/test-native/bug1398/log/run-bug1398-sdk1015.log delete mode 100644 src/test-native/bug1398/test1398-jogamp232_java08-01.log delete mode 100644 src/test-native/bug1398/test1398-jogamp232_java11-01.log delete mode 100644 src/test-native/bug1398/test1398-jogamp240rc_java08-01.log (limited to 'src/test-native/bug1398') diff --git a/src/test-native/bug1398/Bug1398Launcher.c b/src/test-native/bug1398/Bug1398Launcher.c new file mode 100644 index 000000000..ee5407eff --- /dev/null +++ b/src/test-native/bug1398/Bug1398Launcher.c @@ -0,0 +1,349 @@ +#include +#include +#include +#include +#include + +#define DEBUG_TRACE 1 +#define TRACE(fmt, ...) \ + do { if (DEBUG_TRACE) fprintf(err, "%s:%d:%s(): " fmt "\n", __FILE__, __LINE__, __func__, __VA_ARGS__); fflush(err); } while (0) + +static const char * classpath_arg_prelim = "-Djava.class.path="; +static const char * libpath_arg_prelim = "-Djava.library.path="; +static const char * arg_closing = ""; + +static char * classpath_arg = NULL; +static char * libpath_arg = NULL; +static char * jvm_libjli_path = NULL; + +// JNI_CreateJavaVM +typedef jint (JNICALL CREATEVM)(JavaVM **pvm, void **env, void *args); + +void die(JNIEnv *env); + +@interface AppDelegate : NSObject + +@end + +FILE *err = NULL; +JavaVM *jvm = NULL; + +static const char *JNI_CREATEJAVAVM = "JNI_CreateJavaVM"; +void *jvm_lib = NULL; + +void *create_vm(void) +{ + void *sym = NULL; + jvm_lib = dlopen(jvm_libjli_path, RTLD_LAZY | RTLD_GLOBAL); + if (jvm_lib) { + TRACE("Found libjli.dylib %s", jvm_libjli_path); + sym = dlsym(jvm_lib, JNI_CREATEJAVAVM); + } else { + TRACE("Unable to find libjli.dylib %s", jvm_libjli_path); + } + return sym; +} + +static void *launchJava(void *unused) +{ + int k = 0; + + JNIEnv *env = NULL; + JNINativeMethod nm_activity[20]; + jint res; + jclass cls; + jmethodID mid; + jobject gui; + jthrowable ex; + // JDK > 1.5 + JavaVMInitArgs vm_args; + + TRACE("launchJava.1.1%s", ""); + vm_args.nOptions = 9; + JavaVMOption options[vm_args.nOptions]; + options[0].optionString = classpath_arg; + options[1].optionString = libpath_arg; + options[2].optionString = "-DNjogamp.debug=all"; + options[3].optionString = "-DNjogamp.debug.NativeLibrary=true"; + options[4].optionString = "-DNjogamp.debug.JNILibLoader=true"; + options[5].optionString = "-DNnativewindow.debug=all"; + options[6].optionString = "-Djogl.debug.GLContext"; + options[7].optionString = "-Djogl.debug.GLDrawable"; + options[8].optionString = "-Djogl.debug.GLProfile"; + + vm_args.version = JNI_VERSION_1_4; + vm_args.options = options; + vm_args.ignoreUnrecognized = JNI_TRUE; + + TRACE("launchJava.1.2%s", ""); + TRACE(".. using CLASSPATH %s", classpath_arg); + TRACE(".. using LIBPATH %s", libpath_arg); + + /* Create the Java VM */ + CREATEVM *CreateVM = create_vm(); + TRACE("CreateVM:%lx env:%lx vm_args:%lx", (long unsigned int)CreateVM, (long unsigned int)&env, (long unsigned int)&vm_args); + res = CreateVM(&jvm, (void**)&env, &vm_args); + if (res < 0) { + TRACE("Can't create Java VM%s", ""); + exit(1); + } else { + TRACE("VM Created%s", ""); + } + + TRACE("launchJava.1.3%s", ""); + cls = (*env)->FindClass(env, "Bug1398MainClass"); + ex = (*env)->ExceptionOccurred(env); + if (ex) { + die(env); + } + + TRACE("launchJava.1.4%s", ""); + mid = (*env)->GetMethodID(env, cls, "", "()V"); + if (mid == NULL) + goto destroy; + + TRACE("launchJava.1.5%s", ""); + gui = (*env)->NewObject(env, cls, mid); + TRACE("Just passed NewObject()...%s", ""); + + +destroy: + if ((*env)->ExceptionOccurred(env)) { + // handle exception + TRACE("Exception occured...%s", ""); + } + + if (err) + fflush(err); + + if (jvm_lib) { + dlclose(jvm_lib); + jvm_lib = NULL; + } + + // die(env); + + TRACE("launchJava.1.X%s", ""); + return 0; +} + +void show_error_dialog(JNIEnv *env, jthrowable ex) +{ + jclass dialogClass = (*env)->FindClass(env, "javax/swing/JOptionPane"); + jmethodID showMsg = (*env)->GetStaticMethodID(env, dialogClass, "showMessageDialog", "(Ljava/awt/Component;Ljava/lang/Object;Ljava/lang/String;I)V"); + + jstring msg = (*env)->NewStringUTF(env, "\nWe be dead...\n\n"); + + // extract message from exception + jclass stringClass = (*env)->FindClass(env, "java/lang/String"); + jclass exClass = (*env)->GetObjectClass(env, ex); + jmethodID exGetMessage = (*env)->GetMethodID(env, exClass, "getMessage", "()Ljava/lang/String;"); + jmethodID concat = (*env)->GetMethodID(env, stringClass, "concat", "(Ljava/lang/String;)Ljava/lang/String;"); + jstring exMsg = (*env)->CallObjectMethod(env, ex, exGetMessage); + msg = (*env)->CallObjectMethod(env, msg, concat, exMsg); // append exception message to msg + + jstring title = (*env)->NewStringUTF(env, "Error"); + (*env)->CallStaticVoidMethod(env, dialogClass, showMsg, NULL, msg, title, (jint)0); +} + +void die(JNIEnv *env) +{ + TRACE("\n*\n*\n*\ndieing...\n%s", ""); + + jthrowable ex = (*env)->ExceptionOccurred(env); + if (ex) { + (*env)->ExceptionDescribe(env); + show_error_dialog(env, ex); + } + + // DestroyJavaVM hangs on Windows so just exit for now +#ifndef WIN32 + (*jvm)->DestroyJavaVM(jvm); +#else + if (jvm_lib) + FreeLibrary(jvm_lib); + if (c_lib) + FreeLibrary(c_lib); +#endif + TRACE("VM = DEAD!%s\n", ""); + exit(0); +} + +void create_jvm_thread(void) +{ + pthread_t vmthread; + + struct rlimit limit; + size_t stack_size = 0; + int rc = getrlimit(RLIMIT_STACK, &limit); + + if (rc == 0) { + if (limit.rlim_cur != 0LL) { + stack_size = (size_t)limit.rlim_cur; + } + } + + TRACE("create_jvm_thread.1.1%s", ""); + pthread_attr_t thread_attr; + pthread_attr_init(&thread_attr); + pthread_attr_setscope(&thread_attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED); + if (stack_size > 0) { + pthread_attr_setstacksize(&thread_attr, stack_size); + } + TRACE("create_jvm_thread.1.2%s", ""); + + pthread_create(&vmthread, &thread_attr, launchJava, NULL); + pthread_attr_destroy(&thread_attr); + TRACE("create_jvm_thread.1.X%s", ""); +} + +static AppDelegate* _appDelegate; + +#if 0 + +int main(int argc, const char *argv[]) +{ + err = stderr; + + for (int k = 1; k < argc; k++) { + TRACE("argv[%d]:%s", k, argv[k]); + } + if (argc < 2) { + TRACE("Usage: Bug1398Launcher %s", "[libjli.dylib path]"); + exit(1); + } + TRACE("main.1%s", ""); + @autoreleasepool + { + TRACE("main.1.1%s", ""); + _appDelegate = [AppDelegate new]; + TRACE("main.1.2%s", ""); + [NSApplication sharedApplication]; + TRACE("main.1.3%s", ""); + [NSApp activateIgnoringOtherApps:YES]; + [NSApp setDelegate:_appDelegate]; + TRACE("main.1.5%s", ""); + + create_jvm_thread(argv[1]); + TRACE("main.1.6%s", ""); + + return NSApplicationMain(argc, (const char **)argv); + TRACE("main.1.X%s", ""); + } +} + +#else + +int NSApplicationMain(int argc, const char *argv[]) { + // [NSApplication sharedApplication]; + // [NSBundle loadNibNamed:@"myMain" owner:NSApp]; + // [NSApp run]; + + err = stderr; + + fprintf(stderr, "Starting Bug1398Launcher: %s\n", argv[0]); + + const int arg_closing_len = strlen(arg_closing); + + for (int k = 1; k < argc; k++) { + if( !strcmp("-classpath", argv[k]) && k+1 < argc ) { + const int classpath_arg_prelim_len = strlen(classpath_arg_prelim); + const int classpath_len = strlen(argv[++k]); + classpath_arg = calloc(classpath_len + classpath_arg_prelim_len + arg_closing_len + 1, 1); + strncpy(classpath_arg, classpath_arg_prelim, classpath_arg_prelim_len+1); + strncpy(classpath_arg+classpath_arg_prelim_len, argv[k], classpath_len+1); + strncpy(classpath_arg+classpath_arg_prelim_len+classpath_len, arg_closing, arg_closing_len+1); + TRACE("argv[%d]: classpath arg %s", k, classpath_arg); + } else if( !strcmp("-libpath", argv[k]) && k+1 < argc ) { + const int libpath_arg_prelim_len = strlen(libpath_arg_prelim); + const int libpath_len = strlen(argv[++k]); + libpath_arg = calloc(libpath_len + libpath_arg_prelim_len + arg_closing_len + 1, 1); + strncpy(libpath_arg, libpath_arg_prelim, libpath_arg_prelim_len+1); + strncpy(libpath_arg+libpath_arg_prelim_len, argv[k], libpath_len+1); + strncpy(libpath_arg+libpath_arg_prelim_len+libpath_len, arg_closing, arg_closing_len+1); + TRACE("argv[%d]: libpath arg %s", k, libpath_arg); + } else if( !strcmp("-jvmlibjli", argv[k]) && k+1 < argc ) { + const int len = strlen(argv[++k]); + jvm_libjli_path = calloc(len + 1, 1); + strncpy(jvm_libjli_path, argv[k], len+1); + TRACE("argv[%d]: jvmlibjli %s", k, jvm_libjli_path); + } else { + TRACE("argv[%d]:%s", k, argv[k]); + } + } + if ( NULL == classpath_arg || NULL == libpath_arg || NULL == jvm_libjli_path ) { + TRACE("Usage: %s -classpath CLASSPATH -libpath LIBPATH -jvmlibjli libjli.dylib", argv[0]); + exit(1); + } + TRACE("main.1%s", ""); + @autoreleasepool + { + TRACE("main.1.1%s", ""); + _appDelegate = [AppDelegate new]; + TRACE("main.1.2%s", ""); + [NSApplication sharedApplication]; + TRACE("main.1.3%s", ""); + [NSApp activateIgnoringOtherApps:YES]; + [NSApp setDelegate:_appDelegate]; + TRACE("main.1.5%s", ""); + + create_jvm_thread(); + TRACE("main.1.6%s", ""); + + [NSApp run]; + // return NSApplicationMain(argc, (const char **)argv); + TRACE("main.1.X%s", ""); + } + return 0; +} + +int main(int argc, const char *argv[]) +{ + return NSApplicationMain(argc, (const char **)argv); +} + +#endif + +@interface AppDelegate () + +@property (strong) IBOutlet NSWindow *window; + +@end + +@implementation AppDelegate + +-(id) init +{ + self = [super init]; + NSLog(@"init"); + return self; +} + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + + NSLog(@"App starting..."); + + //Create a new Block Operation and add it to the Operation Queue + NSOperationQueue *operationQueue = [NSOperationQueue new]; + + NSBlockOperation *startUpCompletionOperation = [NSBlockOperation blockOperationWithBlock:^{ + //The startup Object has been loaded now close the splash screen + //This the completion block operation + [[NSOperationQueue mainQueue] addOperationWithBlock:^{ + NSLog(@"startUpCompletionOperation main thread? ANS - %@",[NSThread isMainThread]? @"YES":@"NO"); +// launchJava((void *)"jre/lib/jli/libjli.dylib"); + }]; + }]; + + NSBlockOperation *startUpOperation = [NSBlockOperation blockOperationWithBlock:^{ + // wait for everything to load and JVM to power up + sleep(3); // wait for a bit for NewObject to complete + }]; + + [startUpCompletionOperation addDependency:startUpOperation]; + [operationQueue addOperation:startUpCompletionOperation]; + [operationQueue addOperation:startUpOperation]; +} + +@end diff --git a/src/test-native/bug1398/Bug1398MainClass.java b/src/test-native/bug1398/Bug1398MainClass.java new file mode 100644 index 000000000..5b07e7f25 --- /dev/null +++ b/src/test-native/bug1398/Bug1398MainClass.java @@ -0,0 +1,135 @@ +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.DisplayMode; +import java.awt.GraphicsDevice; +import java.awt.GraphicsConfiguration; +import java.awt.Rectangle; +import java.awt.Toolkit; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.JFrame; +import javax.swing.JPanel; +import com.jogamp.opengl.GL2; +import com.jogamp.opengl.GLAutoDrawable; +import com.jogamp.opengl.GLCapabilities; +import com.jogamp.opengl.GLEventListener; +import com.jogamp.opengl.GLProfile; +import com.jogamp.opengl.awt.GLCanvas; +import com.jogamp.opengl.util.FPSAnimator; + +public class Bug1398MainClass extends JFrame implements GLEventListener { + + protected GLCanvas canvas; + + static { + GLProfile.initSingleton(); + } + + public Bug1398MainClass() throws Exception { + System.out.println("Java version: " + Runtime.class.getPackage().getSpecificationVersion() + " (" + Runtime.class.getPackage().getImplementationVersion() + ")"); + System.out.println("classloader:" + Thread.currentThread().getContextClassLoader()); + System.out.println("OS: " + System.getProperty("os.name") + " " + System.getProperty("os.version") + " " + System.getProperty("os.arch")); + + setTitle("Bug1398MainClass"); + //setUndecorated(true); + //setResizable(false); + setDefaultCloseOperation(EXIT_ON_CLOSE); + setBackground(Color.WHITE); + Dimension dim = new Dimension(800, 600); + GraphicsDevice device = getGraphicsConfiguration().getDevice(); + DisplayMode dm = device.getDisplayMode(); + System.out.println("w:" + dm.getWidth() + " h:" + dm.getHeight() + " rr:" + dm.getRefreshRate() + " bits:" + dm.getBitDepth() + " dim.w:" + dim.width + " dim.h:" + dim.height); + GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2)); + canvas = new GLCanvas(caps); + canvas.addGLEventListener(new RedSquareES2()); + // canvas.setBounds(0, 0, 1, 1); + canvas.setBounds(0, 0, 800, 600); + + JPanel panel = new JPanel(); + panel.setLayout(null); + panel.setPreferredSize(dim); + panel.add(canvas); + + Container c = getContentPane(); + c.setLayout(new BorderLayout()); + c.add(panel, BorderLayout.CENTER); + + pack(); + + // center window + GraphicsConfiguration gc = getGraphicsConfiguration(); + Rectangle bounds = gc.getBounds(); + System.out.println("gc.bounds: " + bounds); + dim = Toolkit.getDefaultToolkit().getScreenSize(); + System.out.println("dim: " + dim); + int w = getSize().width; + int h = getSize().height; + int x = (dim.width - w) / 2; + int y = (dim.height - h) / 2; + setLocation(x, y); + setVisible(true); + + final FPSAnimator animator = new FPSAnimator(canvas, 30, true); + addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + // Run this on another thread than the AWT event queue to + // make sure the call to Animator.stop() completes before + // exiting + new Thread(new Runnable() { + public void run() { + animator.stop(); + } + }).start(); + } + }); + animator.start(); + + try { + Thread.sleep(1000); + } catch (Exception e) {} + + animator.stop(); + System.exit(0); + } + + /** + * OpenGL funcs + */ + private void initExtension(GL2 gl, String glExtensionName) { + if (!gl.isExtensionAvailable(glExtensionName)) { + final String message = "OpenGL extension \"" + glExtensionName + "\" not available.\n\nPlease update your display driver to the latest version."; + throw new RuntimeException(message); + } + } + + @Override + public void init(GLAutoDrawable drawable) { + GL2 gl = drawable.getGL().getGL2(); + + int[] arg = new int[1]; + gl.glGetIntegerv(GL2.GL_MAX_TEXTURE_SIZE, arg, 0); + System.out.println("GL_MAX_TEXTURE_SIZE:" + arg[0]); + + System.out.println("Available GL Extensions: " + gl.glGetString(GL2.GL_EXTENSIONS)); + + initExtension(gl, "GL_ARB_texture_non_power_of_two"); + } + + @Override + public void dispose(GLAutoDrawable drawable) { + GL2 gl = drawable.getGL().getGL2(); + } + + @Override + public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { + GL2 gl = drawable.getGL().getGL2(); + } + + @Override + public void display(GLAutoDrawable drawable) { + GL2 gl = drawable.getGL().getGL2(); + } +} + diff --git a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c deleted file mode 100644 index 8491887c7..000000000 --- a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.c +++ /dev/null @@ -1,345 +0,0 @@ -#include -#include -#include -#include -#include - -#define DEBUG_TRACE 1 -#define TRACE(fmt, ...) \ - do { if (DEBUG_TRACE) fprintf(err, "%s:%d:%s(): " fmt "\n", __FILE__, __LINE__, __func__, __VA_ARGS__); fflush(err); } while (0) - -static const char * classpath_arg_prelim = "-Djava.class.path="; -static const char * libpath_arg_prelim = "-Djava.library.path="; -static const char * arg_closing = ""; - -static char * classpath_arg = NULL; -static char * libpath_arg = NULL; -static char * jvm_libjli_path = NULL; - -// JNI_CreateJavaVM -typedef jint (JNICALL CREATEVM)(JavaVM **pvm, void **env, void *args); - -void die(JNIEnv *env); - -@interface AppDelegate : NSObject - -@end - -FILE *err = NULL; -JavaVM *jvm = NULL; - -static const char *JNI_CREATEJAVAVM = "JNI_CreateJavaVM"; -void *jvm_lib = NULL; - -void *create_vm(void) -{ - void *sym = NULL; - jvm_lib = dlopen(jvm_libjli_path, RTLD_LAZY | RTLD_GLOBAL); - if (jvm_lib) { - TRACE("Found libjli.dylib %s", jvm_libjli_path); - sym = dlsym(jvm_lib, JNI_CREATEJAVAVM); - } else { - TRACE("Unable to find libjli.dylib %s", jvm_libjli_path); - } - return sym; -} - -static void *launchJava(void *unused) -{ - int k = 0; - - JNIEnv *env = NULL; - JNINativeMethod nm_activity[20]; - jint res; - jclass cls; - jmethodID mid; - jobject gui; - jthrowable ex; - // JDK > 1.5 - JavaVMInitArgs vm_args; - - TRACE("launchJava.1.1%s", ""); - vm_args.nOptions = 7; - JavaVMOption options[vm_args.nOptions]; - options[0].optionString = classpath_arg; - options[1].optionString = libpath_arg; - options[2].optionString = "-DNjogamp.debug=all"; - options[3].optionString = "-DNjogamp.debug.NativeLibrary=true"; - options[4].optionString = "-DNjogamp.debug.JNILibLoader=true"; - options[5].optionString = "-DNnativewindow.debug=all"; - options[6].optionString = "-DNjogl.debug=all"; - - vm_args.version = JNI_VERSION_1_4; - vm_args.options = options; - vm_args.ignoreUnrecognized = JNI_TRUE; - - TRACE("launchJava.1.2%s", ""); - TRACE(".. using CLASSPATH %s", classpath_arg); - TRACE(".. using LIBPATH %s", libpath_arg); - - /* Create the Java VM */ - CREATEVM *CreateVM = create_vm(); - TRACE("CreateVM:%lx env:%lx vm_args:%lx", (long unsigned int)CreateVM, (long unsigned int)&env, (long unsigned int)&vm_args); - res = CreateVM(&jvm, (void**)&env, &vm_args); - if (res < 0) { - TRACE("Can't create Java VM%s", ""); - exit(1); - } else { - TRACE("VM Created%s", ""); - } - - TRACE("launchJava.1.3%s", ""); - cls = (*env)->FindClass(env, "Bug1398macOSContextOpsOnMainThread"); - ex = (*env)->ExceptionOccurred(env); - if (ex) { - die(env); - } - - TRACE("launchJava.1.4%s", ""); - mid = (*env)->GetMethodID(env, cls, "", "()V"); - if (mid == NULL) - goto destroy; - - TRACE("launchJava.1.5%s", ""); - gui = (*env)->NewObject(env, cls, mid); - TRACE("Just passed NewObject()...%s", ""); - - -destroy: - if ((*env)->ExceptionOccurred(env)) { - // handle exception - TRACE("Exception occured...%s", ""); - } - - if (err) - fflush(err); - - if (jvm_lib) { - dlclose(jvm_lib); - jvm_lib = NULL; - } - - // die(env); - - TRACE("launchJava.1.X%s", ""); - return 0; -} - -void show_error_dialog(JNIEnv *env, jthrowable ex) -{ - jclass dialogClass = (*env)->FindClass(env, "javax/swing/JOptionPane"); - jmethodID showMsg = (*env)->GetStaticMethodID(env, dialogClass, "showMessageDialog", "(Ljava/awt/Component;Ljava/lang/Object;Ljava/lang/String;I)V"); - - jstring msg = (*env)->NewStringUTF(env, "\nWe be dead...\n\n"); - - // extract message from exception - jclass stringClass = (*env)->FindClass(env, "java/lang/String"); - jclass exClass = (*env)->GetObjectClass(env, ex); - jmethodID exGetMessage = (*env)->GetMethodID(env, exClass, "getMessage", "()Ljava/lang/String;"); - jmethodID concat = (*env)->GetMethodID(env, stringClass, "concat", "(Ljava/lang/String;)Ljava/lang/String;"); - jstring exMsg = (*env)->CallObjectMethod(env, ex, exGetMessage); - msg = (*env)->CallObjectMethod(env, msg, concat, exMsg); // append exception message to msg - - jstring title = (*env)->NewStringUTF(env, "Error"); - (*env)->CallStaticVoidMethod(env, dialogClass, showMsg, NULL, msg, title, (jint)0); -} - -void die(JNIEnv *env) -{ - TRACE("\n*\n*\n*\ndieing...\n%s", ""); - - jthrowable ex = (*env)->ExceptionOccurred(env); - if (ex) { - (*env)->ExceptionDescribe(env); - show_error_dialog(env, ex); - } - - // DestroyJavaVM hangs on Windows so just exit for now -#ifndef WIN32 - (*jvm)->DestroyJavaVM(jvm); -#else - if (jvm_lib) - FreeLibrary(jvm_lib); - if (c_lib) - FreeLibrary(c_lib); -#endif - TRACE("VM = DEAD!%s\n", ""); - exit(0); -} - -void create_jvm_thread(void) -{ - pthread_t vmthread; - - struct rlimit limit; - size_t stack_size = 0; - int rc = getrlimit(RLIMIT_STACK, &limit); - - if (rc == 0) { - if (limit.rlim_cur != 0LL) { - stack_size = (size_t)limit.rlim_cur; - } - } - - TRACE("create_jvm_thread.1.1%s", ""); - pthread_attr_t thread_attr; - pthread_attr_init(&thread_attr); - pthread_attr_setscope(&thread_attr, PTHREAD_SCOPE_SYSTEM); - pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED); - if (stack_size > 0) { - pthread_attr_setstacksize(&thread_attr, stack_size); - } - TRACE("create_jvm_thread.1.2%s", ""); - - pthread_create(&vmthread, &thread_attr, launchJava, NULL); - pthread_attr_destroy(&thread_attr); - TRACE("create_jvm_thread.1.X%s", ""); -} - -static AppDelegate* _appDelegate; - -#if 0 - -int main(int argc, const char *argv[]) -{ - err = stderr; - - for (int k = 1; k < argc; k++) { - TRACE("argv[%d]:%s", k, argv[k]); - } - if (argc < 2) { - TRACE("Usage: Bug1398macOSContextOpsOnMainThread %s", "[libjli.dylib path]"); - exit(1); - } - TRACE("main.1%s", ""); - @autoreleasepool - { - TRACE("main.1.1%s", ""); - _appDelegate = [AppDelegate new]; - TRACE("main.1.2%s", ""); - [NSApplication sharedApplication]; - TRACE("main.1.3%s", ""); - [NSApp activateIgnoringOtherApps:YES]; - [NSApp setDelegate:_appDelegate]; - TRACE("main.1.5%s", ""); - - create_jvm_thread(argv[1]); - TRACE("main.1.6%s", ""); - - return NSApplicationMain(argc, (const char **)argv); - TRACE("main.1.X%s", ""); - } -} - -#else - -int NSApplicationMain(int argc, const char *argv[]) { - // [NSApplication sharedApplication]; - // [NSBundle loadNibNamed:@"myMain" owner:NSApp]; - // [NSApp run]; - - err = stderr; - - const int arg_closing_len = strlen(arg_closing); - - for (int k = 1; k < argc; k++) { - if( !strcmp("-classpath", argv[k]) && k+1 < argc ) { - const int classpath_arg_prelim_len = strlen(classpath_arg_prelim); - const int classpath_len = strlen(argv[++k]); - classpath_arg = calloc(classpath_len + classpath_arg_prelim_len + arg_closing_len + 1, 1); - strncpy(classpath_arg, classpath_arg_prelim, classpath_arg_prelim_len+1); - strncpy(classpath_arg+classpath_arg_prelim_len, argv[k], classpath_len+1); - strncpy(classpath_arg+classpath_arg_prelim_len+classpath_len, arg_closing, arg_closing_len+1); - TRACE("argv[%d]: classpath arg %s", k, classpath_arg); - } else if( !strcmp("-libpath", argv[k]) && k+1 < argc ) { - const int libpath_arg_prelim_len = strlen(libpath_arg_prelim); - const int libpath_len = strlen(argv[++k]); - libpath_arg = calloc(libpath_len + libpath_arg_prelim_len + arg_closing_len + 1, 1); - strncpy(libpath_arg, libpath_arg_prelim, libpath_arg_prelim_len+1); - strncpy(libpath_arg+libpath_arg_prelim_len, argv[k], libpath_len+1); - strncpy(libpath_arg+libpath_arg_prelim_len+libpath_len, arg_closing, arg_closing_len+1); - TRACE("argv[%d]: libpath arg %s", k, libpath_arg); - } else if( !strcmp("-jvmlibjli", argv[k]) && k+1 < argc ) { - const int len = strlen(argv[++k]); - jvm_libjli_path = calloc(len + 1, 1); - strncpy(jvm_libjli_path, argv[k], len+1); - TRACE("argv[%d]: jvmlibjli %s", k, jvm_libjli_path); - } else { - TRACE("argv[%d]:%s", k, argv[k]); - } - } - if ( NULL == classpath_arg || NULL == libpath_arg || NULL == jvm_libjli_path ) { - TRACE("Usage: Bug1398macOSContextOpsOnMainThread -classpath CLASSPATH -libpath LIBPATH -jvmlibjli libjli.dylib%s", ""); - exit(1); - } - TRACE("main.1%s", ""); - @autoreleasepool - { - TRACE("main.1.1%s", ""); - _appDelegate = [AppDelegate new]; - TRACE("main.1.2%s", ""); - [NSApplication sharedApplication]; - TRACE("main.1.3%s", ""); - [NSApp activateIgnoringOtherApps:YES]; - [NSApp setDelegate:_appDelegate]; - TRACE("main.1.5%s", ""); - - create_jvm_thread(); - TRACE("main.1.6%s", ""); - - [NSApp run]; - // return NSApplicationMain(argc, (const char **)argv); - TRACE("main.1.X%s", ""); - } - return 0; -} - -int main(int argc, const char *argv[]) -{ - return NSApplicationMain(argc, (const char **)argv); -} - -#endif - -@interface AppDelegate () - -@property (strong) IBOutlet NSWindow *window; - -@end - -@implementation AppDelegate - --(id) init -{ - self = [super init]; - NSLog(@"init"); - return self; -} - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - - NSLog(@"App starting..."); - - //Create a new Block Operation and add it to the Operation Queue - NSOperationQueue *operationQueue = [NSOperationQueue new]; - - NSBlockOperation *startUpCompletionOperation = [NSBlockOperation blockOperationWithBlock:^{ - //The startup Object has been loaded now close the splash screen - //This the completion block operation - [[NSOperationQueue mainQueue] addOperationWithBlock:^{ - NSLog(@"startUpCompletionOperation main thread? ANS - %@",[NSThread isMainThread]? @"YES":@"NO"); -// launchJava((void *)"jre/lib/jli/libjli.dylib"); - }]; - }]; - - NSBlockOperation *startUpOperation = [NSBlockOperation blockOperationWithBlock:^{ - // wait for everything to load and JVM to power up - sleep(3); // wait for a bit for NewObject to complete - }]; - - [startUpCompletionOperation addDependency:startUpOperation]; - [operationQueue addOperation:startUpCompletionOperation]; - [operationQueue addOperation:startUpOperation]; -} - -@end diff --git a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java b/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java deleted file mode 100644 index b887e7428..000000000 --- a/src/test-native/bug1398/Bug1398macOSContextOpsOnMainThread.java +++ /dev/null @@ -1,135 +0,0 @@ -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.DisplayMode; -import java.awt.GraphicsDevice; -import java.awt.GraphicsConfiguration; -import java.awt.Rectangle; -import java.awt.Toolkit; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.JFrame; -import javax.swing.JPanel; -import com.jogamp.opengl.GL2; -import com.jogamp.opengl.GLAutoDrawable; -import com.jogamp.opengl.GLCapabilities; -import com.jogamp.opengl.GLEventListener; -import com.jogamp.opengl.GLProfile; -import com.jogamp.opengl.awt.GLCanvas; -import com.jogamp.opengl.util.FPSAnimator; - -public class Bug1398macOSContextOpsOnMainThread extends JFrame implements GLEventListener { - - protected GLCanvas canvas; - - static { - GLProfile.initSingleton(); - } - - public Bug1398macOSContextOpsOnMainThread() throws Exception { - System.out.println("Java version: " + Runtime.class.getPackage().getSpecificationVersion() + " (" + Runtime.class.getPackage().getImplementationVersion() + ")"); - System.out.println("classloader:" + Thread.currentThread().getContextClassLoader()); - System.out.println("OS: " + System.getProperty("os.name") + " " + System.getProperty("os.version") + " " + System.getProperty("os.arch")); - - setTitle("Bug1398macOSContextOpsOnMainThread"); - //setUndecorated(true); - //setResizable(false); - setDefaultCloseOperation(EXIT_ON_CLOSE); - setBackground(Color.WHITE); - Dimension dim = new Dimension(800, 600); - GraphicsDevice device = getGraphicsConfiguration().getDevice(); - DisplayMode dm = device.getDisplayMode(); - System.out.println("w:" + dm.getWidth() + " h:" + dm.getHeight() + " rr:" + dm.getRefreshRate() + " bits:" + dm.getBitDepth() + " dim.w:" + dim.width + " dim.h:" + dim.height); - GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2)); - canvas = new GLCanvas(caps); - canvas.addGLEventListener(new RedSquareES2()); - // canvas.setBounds(0, 0, 1, 1); - canvas.setBounds(0, 0, 800, 600); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setPreferredSize(dim); - panel.add(canvas); - - Container c = getContentPane(); - c.setLayout(new BorderLayout()); - c.add(panel, BorderLayout.CENTER); - - pack(); - - // center window - GraphicsConfiguration gc = getGraphicsConfiguration(); - Rectangle bounds = gc.getBounds(); - System.out.println("gc.bounds: " + bounds); - dim = Toolkit.getDefaultToolkit().getScreenSize(); - System.out.println("dim: " + dim); - int w = getSize().width; - int h = getSize().height; - int x = (dim.width - w) / 2; - int y = (dim.height - h) / 2; - setLocation(x, y); - setVisible(true); - - final FPSAnimator animator = new FPSAnimator(canvas, 30, true); - addWindowListener(new WindowAdapter() { - public void windowClosing(WindowEvent e) { - // Run this on another thread than the AWT event queue to - // make sure the call to Animator.stop() completes before - // exiting - new Thread(new Runnable() { - public void run() { - animator.stop(); - } - }).start(); - } - }); - animator.start(); - - try { - Thread.sleep(1000); - } catch (Exception e) {} - - animator.stop(); - System.exit(0); - } - - /** - * OpenGL funcs - */ - private void initExtension(GL2 gl, String glExtensionName) { - if (!gl.isExtensionAvailable(glExtensionName)) { - final String message = "OpenGL extension \"" + glExtensionName + "\" not available.\n\nPlease update your display driver to the latest version."; - throw new RuntimeException(message); - } - } - - @Override - public void init(GLAutoDrawable drawable) { - GL2 gl = drawable.getGL().getGL2(); - - int[] arg = new int[1]; - gl.glGetIntegerv(GL2.GL_MAX_TEXTURE_SIZE, arg, 0); - System.out.println("GL_MAX_TEXTURE_SIZE:" + arg[0]); - - System.out.println("Available GL Extensions: " + gl.glGetString(GL2.GL_EXTENSIONS)); - - initExtension(gl, "GL_ARB_texture_non_power_of_two"); - } - - @Override - public void dispose(GLAutoDrawable drawable) { - GL2 gl = drawable.getGL().getGL2(); - } - - @Override - public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { - GL2 gl = drawable.getGL().getGL2(); - } - - @Override - public void display(GLAutoDrawable drawable) { - GL2 gl = drawable.getGL().getGL2(); - } -} - diff --git a/src/test-native/bug1398/log/hs_err_pid2328.log b/src/test-native/bug1398/log/hs_err_pid2328.log new file mode 100644 index 000000000..a2a8b5890 --- /dev/null +++ b/src/test-native/bug1398/log/hs_err_pid2328.log @@ -0,0 +1,803 @@ +# +# A fatal error has been detected by the Java Runtime Environment: +# +# SIGILL (0x4) at pc=0x00007fff2efccacc, pid=2328, tid=15879 +# +# JRE version: OpenJDK Runtime Environment (11.0.3+7) (build 11.0.3+7) +# Java VM: OpenJDK 64-Bit Server VM (11.0.3+7, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64) +# Problematic frame: +# C [AppKit+0x3e4acc] -[NSOpenGLContext setView:]+0xe5 +# +# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again +# +# If you would like to submit a bug report, please visit: +# https://github.com/AdoptOpenJDK/openjdk-build/issues +# The crash happened outside the Java Virtual Machine in native code. +# See problematic frame for where to report the bug. +# + +--------------- S U M M A R Y ------------ + +Command Line: -Djava.library.path=/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib -DNjogamp.debug=all -DNjogamp.debug.NativeLibrary=true -DNjogamp.debug.JNILibLoader=true -DNnativewindow.debug=all -Djogl.debug.GLContext -Djogl.debug.GLDrawable -Djogl.debug.GLProfile + +Host: Macmini7,1 x86_64 2600 MHz, 4 cores, 8G, Darwin 19.3.0 +Time: Sat Feb 22 14:51:33 2020 CET elapsed time: 0 seconds (0d 0h 0m 0s) + +--------------- T H R E A D --------------- + +Current thread (0x00007f8477813000): JavaThread "main" [_thread_in_native, id=15879, stack(0x000070000c092000,0x000070000c892000)] + +Stack: [0x000070000c092000,0x000070000c892000], sp=0x000070000c88f150, free space=8180k +Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code) +C [AppKit+0x3e4acc] -[NSOpenGLContext setView:]+0xe5 +C [libjogl_desktop.dylib+0x18124] createContext+0x184 +C [libjogl_desktop.dylib+0x7f575] Java_jogamp_opengl_macosx_cgl_CGL_createContext0__JJZJZLjava_lang_Object_2I+0x95 +j jogamp.opengl.macosx.cgl.CGL.createContext0(JJZJZLjava/lang/Object;I)J+0 +j jogamp.opengl.macosx.cgl.CGL.createContext(JJZJZLjava/nio/IntBuffer;)J+33 +j jogamp.opengl.macosx.cgl.MacOSXCGLContext$NSOpenGLImpl.create(JIII)J+836 +j jogamp.opengl.macosx.cgl.MacOSXCGLContext.createContextARBImpl(JZIII)J+91 +j jogamp.opengl.GLContextImpl.createContextARBVersions(JZIIIII[I[I)J+169 +j jogamp.opengl.GLContextImpl.createContextARBMapVersionsAvailable(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;IIZ)Z+204 +j jogamp.opengl.GLContextImpl.mapGLVersions(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+399 +j jogamp.opengl.GLContextImpl.createContextARB(JZ)J+116 +j jogamp.opengl.macosx.cgl.MacOSXCGLContext.createImpl(J)Z+287 +j jogamp.opengl.GLContextImpl.makeCurrentWithinLock(I)I+224 +j jogamp.opengl.GLContextImpl.makeCurrent(Z)I+488 +j jogamp.opengl.GLContextImpl.makeCurrent()I+2 +j jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory$SharedResource;+227 +j jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/SharedResourceRunner$Resource;+2 +j jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/SharedResourceRunner$Resource;+13 +j jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+2 +j com.jogamp.opengl.GLDrawableFactory.createSharedResource(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+2 +j com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+231 +j com.jogamp.opengl.GLProfile.initProfilesForDevice(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+30 +j com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices()V+621 +j com.jogamp.opengl.GLProfile.access$000()V+0 +j com.jogamp.opengl.GLProfile$1.run()Ljava/lang/Object;+59 +v ~StubRoutines::call_stub +V [libjvm.dylib+0x3b1e4b] _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP6Thread+0x27d +V [libjvm.dylib+0x42ebc3] JVM_DoPrivileged+0x648 +j java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;+0 java.base@11.0.3 +j com.jogamp.opengl.GLProfile.initSingleton()V+78 +j Bug1398MainClass.()V+0 +v ~StubRoutines::call_stub +V [libjvm.dylib+0x3b1e4b] _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP6Thread+0x27d +V [libjvm.dylib+0x3984d7] _ZN13InstanceKlass22call_class_initializerEP6Thread+0x1a7 +V [libjvm.dylib+0x397ddd] _ZN13InstanceKlass15initialize_implEP6Thread+0x4cf +V [libjvm.dylib+0x42cd64] _Z28find_class_from_class_loaderP7JNIEnv_P6Symbolh6HandleS3_hP6Thread+0x57 +V [libjvm.dylib+0x3ea861] jni_FindClass+0x298 +C [Bug1398LauncherSDK1015+0x1d2a] launchJava+0x40a +C [libsystem_pthread.dylib+0x5e65] _pthread_start+0x94 +C [libsystem_pthread.dylib+0x183b] thread_start+0xf + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j jogamp.opengl.macosx.cgl.CGL.createContext0(JJZJZLjava/lang/Object;I)J+0 +j jogamp.opengl.macosx.cgl.CGL.createContext(JJZJZLjava/nio/IntBuffer;)J+33 +j jogamp.opengl.macosx.cgl.MacOSXCGLContext$NSOpenGLImpl.create(JIII)J+836 +j jogamp.opengl.macosx.cgl.MacOSXCGLContext.createContextARBImpl(JZIII)J+91 +j jogamp.opengl.GLContextImpl.createContextARBVersions(JZIIIII[I[I)J+169 +j jogamp.opengl.GLContextImpl.createContextARBMapVersionsAvailable(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;IIZ)Z+204 +j jogamp.opengl.GLContextImpl.mapGLVersions(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+399 +j jogamp.opengl.GLContextImpl.createContextARB(JZ)J+116 +j jogamp.opengl.macosx.cgl.MacOSXCGLContext.createImpl(J)Z+287 +j jogamp.opengl.GLContextImpl.makeCurrentWithinLock(I)I+224 +j jogamp.opengl.GLContextImpl.makeCurrent(Z)I+488 +j jogamp.opengl.GLContextImpl.makeCurrent()I+2 +j jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory$SharedResource;+227 +j jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/SharedResourceRunner$Resource;+2 +j jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/SharedResourceRunner$Resource;+13 +j jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+2 +j com.jogamp.opengl.GLDrawableFactory.createSharedResource(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+2 +j com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+231 +j com.jogamp.opengl.GLProfile.initProfilesForDevice(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+30 +j com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices()V+621 +j com.jogamp.opengl.GLProfile.access$000()V+0 +j com.jogamp.opengl.GLProfile$1.run()Ljava/lang/Object;+59 +v ~StubRoutines::call_stub +j java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;+0 java.base@11.0.3 +j com.jogamp.opengl.GLProfile.initSingleton()V+78 +j Bug1398MainClass.()V+0 +v ~StubRoutines::call_stub + +siginfo: si_signo: 4 (SIGILL), si_code: 1 (ILL_ILLOPC), si_addr: 0x00007fff2efccacc + +Register to memory mapping: + +RAX=0x0 is NULL +RBX=0x0 is NULL +RCX=0x0 is NULL +RDX=0x0 is NULL +RSP=0x000070000c88f150 is pointing into the stack for thread: 0x00007f8477813000 +RBP=0x000070000c88f1a0 is pointing into the stack for thread: 0x00007f8477813000 +RSI=0x000000001f08000c is an unknown value +RDI=0x0 is NULL +R8 =0x0 is NULL +R9 =0x0 is NULL +R10=0x0 is NULL +R11=0x0 is NULL +R12=0x0 is NULL +R13={method} {0x00000001252e89d0} 'createContext0' '(JJZJZLjava/lang/Object;I)J' in 'jogamp/opengl/macosx/cgl/CGL' +R14=0x00007f8476595b50 points into unknown readable memory: dd d0 17 8a ff ff 3d 00 +R15=0x00007f84764cd950 points into unknown readable memory: dd 9e 17 8a ff ff 3d 00 + + +Registers: +RAX=0x0000000000000000, RBX=0x0000000000000000, RCX=0x0000000000000000, RDX=0x0000000000000000 +RSP=0x000070000c88f150, RBP=0x000070000c88f1a0, RSI=0x000000001f08000c, RDI=0x0000000000000000 +R8 =0x0000000000000000, R9 =0x0000000000000000, R10=0x0000000000000000, R11=0x0000000000000000 +R12=0x0000000000000000, R13=0x00000001252e89d0, R14=0x00007f8476595b50, R15=0x00007f84764cd950 +RIP=0x00007fff2efccacc, EFLAGS=0x0000000000010202, ERR=0x0000000000000000 + TRAPNO=0x0000000000000006 + +Top of Stack: (sp=0x000070000c88f150) +0x000070000c88f150: bf8000003f800000 0000000000000000 +0x000070000c88f160: 00000000bf800000 0000000000000000 +0x000070000c88f170: 0000000000000000 0000000000000000 +0x000070000c88f180: 0000000000000000 0000000000000000 +0x000070000c88f190: 0000000000000000 00007f8477813000 +0x000070000c88f1a0: 000070000c88f210 00000001253a1124 +0x000070000c88f1b0: 0000000000000000 0000000100000000 +0x000070000c88f1c0: 00007f84764cd950 0000000000000000 +0x000070000c88f1d0: 00007f8476785d80 00007f84764ccf90 +0x000070000c88f1e0: 000000010c88f210 00007f84764ccb20 +0x000070000c88f1f0: 0000000103cfaae7 00007f8476595b50 +0x000070000c88f200: 0000000000000000 00007f8477813000 +0x000070000c88f210: 000070000c88f290 0000000125408575 +0x000070000c88f220: 000070000c8901a0 01007f8476719280 +0x000070000c88f230: 000070000c88f368 0000000003ca942c +0x000070000c88f240: 000070000c88f260 00007f84764ccf90 +0x000070000c88f250: 00007f84764ccb20 01007f8477813000 +0x000070000c88f260: 00007f8476595b50 0000000000000000 +0x000070000c88f270: 000070000c88f350 00007f8477813340 +0x000070000c88f280: 00000001252e89d0 000070000c88f3a8 +0x000070000c88f290: 000070000c88f340 000000010fdd1950 +0x000070000c88f2a0: 0000700000000001 000070000c88f368 +0x000070000c88f2b0: 0000700000000000 0000000103ca8565 +0x000070000c88f2c0: 00007f8477813000 00000001252e89d0 +0x000070000c88f2d0: 000070000c88f3a8 00007f8477813000 +0x000070000c88f2e0: 000070000c88f340 000000010fdd169e +0x000070000c88f2f0: 000000010fdd1656 000070000c88f2f8 +0x000070000c88f300: 00000001252e89d0 000070000c88f3a8 +0x000070000c88f310: 00000001252e9ea8 0000000000000000 +0x000070000c88f320: 000000078720c578 00000001252e89d0 +0x000070000c88f330: 0000000000000000 000070000c88f360 +0x000070000c88f340: 000070000c88f3f8 000000010fdcb790 + +Instructions: (pc=0x00007fff2efccacc) +0x00007fff2efccaac: 00 31 f6 e8 30 fa c1 ff e9 51 ff ff ff e8 de f9 +0x00007fff2efccabc: 77 00 0f 0b 48 8d 3d 4b 57 7f 00 e8 48 f4 77 00 +0x00007fff2efccacc: 0f 0b 49 89 c6 eb 13 48 89 c7 e8 91 f9 77 00 b3 +0x00007fff2efccadc: 01 eb 9a 49 89 c6 84 db 74 05 e8 a5 f9 77 00 4c + +Stack slot to memory mapping: +stack at sp + 0 slots: 0xbf8000003f800000 is an unknown value +stack at sp + 1 slots: 0x0 is NULL +stack at sp + 2 slots: 0x00000000bf800000 is an unknown value +stack at sp + 3 slots: 0x0 is NULL +stack at sp + 4 slots: 0x0 is NULL +stack at sp + 5 slots: 0x0 is NULL +stack at sp + 6 slots: 0x0 is NULL +stack at sp + 7 slots: 0x0 is NULL + + +--------------- P R O C E S S --------------- + +Threads class SMR info: +_java_thread_list=0x00007f8476657190, length=12, elements={ +0x00007f8477813000, 0x00007f8477052000, 0x00007f8477055000, 0x00007f847685a800, +0x00007f847688a800, 0x00007f8477830800, 0x00007f8477833800, 0x00007f8476929000, +0x00007f8476930800, 0x00007f8476b4e000, 0x00007f8478072000, 0x00007f8478075000 +} + +Java Threads: ( => current thread ) +=>0x00007f8477813000 JavaThread "main" [_thread_in_native, id=15879, stack(0x000070000c092000,0x000070000c892000)] + 0x00007f8477052000 JavaThread "Reference Handler" daemon [_thread_blocked, id=32515, stack(0x000070000cf2a000,0x000070000d02a000)] + 0x00007f8477055000 JavaThread "Finalizer" daemon [_thread_blocked, id=32003, stack(0x000070000d02d000,0x000070000d12d000)] + 0x00007f847685a800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=86531, stack(0x000070000d130000,0x000070000d230000)] + 0x00007f847688a800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=44035, stack(0x000070000d233000,0x000070000d333000)] + 0x00007f8477830800 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=85763, stack(0x000070000d336000,0x000070000d436000)] + 0x00007f8477833800 JavaThread "Sweeper thread" daemon [_thread_blocked, id=85507, stack(0x000070000d439000,0x000070000d539000)] + 0x00007f8476929000 JavaThread "Service Thread" daemon [_thread_blocked, id=45059, stack(0x000070000d53c000,0x000070000d63c000)] + 0x00007f8476930800 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=45827, stack(0x000070000d742000,0x000070000d842000)] + 0x00007f8476b4e000 JavaThread "AppKit Thread" daemon [_thread_in_native, id=775, stack(0x00007ffeee427000,0x00007ffeeec27000)] + 0x00007f8478072000 JavaThread "AWT-Shutdown" [_thread_blocked, id=46595, stack(0x000070000d845000,0x000070000d945000)] + 0x00007f8478075000 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=47107, stack(0x000070000d948000,0x000070000da48000)] + +Other Threads: + 0x00007f8477045000 VMThread "VM Thread" [stack: 0x000070000ce27000,0x000070000cf27000] [id=33027] + 0x00007f847692a000 WatcherThread [stack: 0x000070000d63f000,0x000070000d73f000] [id=84739] + 0x00007f8477814000 GCTaskThread "GC Thread#0" [stack: 0x000070000c895000,0x000070000c995000] [id=26371] + 0x00007f847683e800 ConcurrentGCThread "G1 Main Marker" [stack: 0x000070000c998000,0x000070000ca98000] [id=36615] + 0x00007f8478004800 ConcurrentGCThread "G1 Conc#0" [stack: 0x000070000ca9b000,0x000070000cb9b000] [id=35843] + 0x00007f847803d000 ConcurrentGCThread "G1 Refine#0" [stack: 0x000070000cb9e000,0x000070000cc9e000] [id=35591] + 0x00007f847803e000 ConcurrentGCThread "G1 Young RemSet Sampling" [stack: 0x000070000cca1000,0x000070000cda1000] [id=27139] + +Threads with active compile tasks: + +VM state:not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: None + +Heap address: 0x0000000780000000, size: 2048 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 +Narrow klass base: 0x0000000800000000, Narrow klass shift: 0 +Compressed class space size: 1073741824 Address: 0x0000000800000000 + +Heap: + garbage-first heap total 131072K, used 13312K [0x0000000780000000, 0x0000000800000000) + region size 1024K, 14 young (14336K), 0 survivors (0K) + Metaspace used 14550K, capacity 14783K, committed 15232K, reserved 1062912K + class space used 1251K, capacity 1342K, committed 1408K, reserved 1048576K +Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, A=archive, TAMS=top-at-mark-start (previous, next) +| 0|0x0000000780000000, 0x0000000780100000, 0x0000000780100000|100%|HS| |TAMS 0x0000000780000000, 0x0000000780000000| Complete +| 1|0x0000000780100000, 0x0000000780100000, 0x0000000780200000| 0%| F| |TAMS 0x0000000780100000, 0x0000000780100000| Untracked +| 2|0x0000000780200000, 0x0000000780200000, 0x0000000780300000| 0%| F| |TAMS 0x0000000780200000, 0x0000000780200000| Untracked +| 3|0x0000000780300000, 0x0000000780300000, 0x0000000780400000| 0%| F| |TAMS 0x0000000780300000, 0x0000000780300000| Untracked +| 4|0x0000000780400000, 0x0000000780400000, 0x0000000780500000| 0%| F| |TAMS 0x0000000780400000, 0x0000000780400000| Untracked +| 5|0x0000000780500000, 0x0000000780500000, 0x0000000780600000| 0%| F| |TAMS 0x0000000780500000, 0x0000000780500000| Untracked +| 6|0x0000000780600000, 0x0000000780600000, 0x0000000780700000| 0%| F| |TAMS 0x0000000780600000, 0x0000000780600000| Untracked +| 7|0x0000000780700000, 0x0000000780700000, 0x0000000780800000| 0%| F| |TAMS 0x0000000780700000, 0x0000000780700000| Untracked +| 8|0x0000000780800000, 0x0000000780800000, 0x0000000780900000| 0%| F| |TAMS 0x0000000780800000, 0x0000000780800000| Untracked +| 9|0x0000000780900000, 0x0000000780900000, 0x0000000780a00000| 0%| F| |TAMS 0x0000000780900000, 0x0000000780900000| Untracked +| 10|0x0000000780a00000, 0x0000000780a00000, 0x0000000780b00000| 0%| F| |TAMS 0x0000000780a00000, 0x0000000780a00000| Untracked +| 11|0x0000000780b00000, 0x0000000780b00000, 0x0000000780c00000| 0%| F| |TAMS 0x0000000780b00000, 0x0000000780b00000| Untracked +| 12|0x0000000780c00000, 0x0000000780c00000, 0x0000000780d00000| 0%| F| |TAMS 0x0000000780c00000, 0x0000000780c00000| Untracked +| 13|0x0000000780d00000, 0x0000000780d00000, 0x0000000780e00000| 0%| F| |TAMS 0x0000000780d00000, 0x0000000780d00000| Untracked +| 14|0x0000000780e00000, 0x0000000780e00000, 0x0000000780f00000| 0%| F| |TAMS 0x0000000780e00000, 0x0000000780e00000| Untracked +| 15|0x0000000780f00000, 0x0000000780f00000, 0x0000000781000000| 0%| F| |TAMS 0x0000000780f00000, 0x0000000780f00000| Untracked +| 16|0x0000000781000000, 0x0000000781000000, 0x0000000781100000| 0%| F| |TAMS 0x0000000781000000, 0x0000000781000000| Untracked +| 17|0x0000000781100000, 0x0000000781100000, 0x0000000781200000| 0%| F| |TAMS 0x0000000781100000, 0x0000000781100000| Untracked +| 18|0x0000000781200000, 0x0000000781200000, 0x0000000781300000| 0%| F| |TAMS 0x0000000781200000, 0x0000000781200000| Untracked +| 19|0x0000000781300000, 0x0000000781300000, 0x0000000781400000| 0%| F| |TAMS 0x0000000781300000, 0x0000000781300000| Untracked +| 20|0x0000000781400000, 0x0000000781400000, 0x0000000781500000| 0%| F| |TAMS 0x0000000781400000, 0x0000000781400000| Untracked +| 21|0x0000000781500000, 0x0000000781500000, 0x0000000781600000| 0%| F| |TAMS 0x0000000781500000, 0x0000000781500000| Untracked +| 22|0x0000000781600000, 0x0000000781600000, 0x0000000781700000| 0%| F| |TAMS 0x0000000781600000, 0x0000000781600000| Untracked +| 23|0x0000000781700000, 0x0000000781700000, 0x0000000781800000| 0%| F| |TAMS 0x0000000781700000, 0x0000000781700000| Untracked +| 24|0x0000000781800000, 0x0000000781800000, 0x0000000781900000| 0%| F| |TAMS 0x0000000781800000, 0x0000000781800000| Untracked +| 25|0x0000000781900000, 0x0000000781900000, 0x0000000781a00000| 0%| F| |TAMS 0x0000000781900000, 0x0000000781900000| Untracked +| 26|0x0000000781a00000, 0x0000000781a00000, 0x0000000781b00000| 0%| F| |TAMS 0x0000000781a00000, 0x0000000781a00000| Untracked +| 27|0x0000000781b00000, 0x0000000781b00000, 0x0000000781c00000| 0%| F| |TAMS 0x0000000781b00000, 0x0000000781b00000| Untracked +| 28|0x0000000781c00000, 0x0000000781c00000, 0x0000000781d00000| 0%| F| |TAMS 0x0000000781c00000, 0x0000000781c00000| Untracked +| 29|0x0000000781d00000, 0x0000000781d00000, 0x0000000781e00000| 0%| F| |TAMS 0x0000000781d00000, 0x0000000781d00000| Untracked +| 30|0x0000000781e00000, 0x0000000781e00000, 0x0000000781f00000| 0%| F| |TAMS 0x0000000781e00000, 0x0000000781e00000| Untracked +| 31|0x0000000781f00000, 0x0000000781f00000, 0x0000000782000000| 0%| F| |TAMS 0x0000000781f00000, 0x0000000781f00000| Untracked +| 32|0x0000000782000000, 0x0000000782000000, 0x0000000782100000| 0%| F| |TAMS 0x0000000782000000, 0x0000000782000000| Untracked +| 33|0x0000000782100000, 0x0000000782100000, 0x0000000782200000| 0%| F| |TAMS 0x0000000782100000, 0x0000000782100000| Untracked +| 34|0x0000000782200000, 0x0000000782200000, 0x0000000782300000| 0%| F| |TAMS 0x0000000782200000, 0x0000000782200000| Untracked +| 35|0x0000000782300000, 0x0000000782300000, 0x0000000782400000| 0%| F| |TAMS 0x0000000782300000, 0x0000000782300000| Untracked +| 36|0x0000000782400000, 0x0000000782400000, 0x0000000782500000| 0%| F| |TAMS 0x0000000782400000, 0x0000000782400000| Untracked +| 37|0x0000000782500000, 0x0000000782500000, 0x0000000782600000| 0%| F| |TAMS 0x0000000782500000, 0x0000000782500000| Untracked +| 38|0x0000000782600000, 0x0000000782600000, 0x0000000782700000| 0%| F| |TAMS 0x0000000782600000, 0x0000000782600000| Untracked +| 39|0x0000000782700000, 0x0000000782700000, 0x0000000782800000| 0%| F| |TAMS 0x0000000782700000, 0x0000000782700000| Untracked +| 40|0x0000000782800000, 0x0000000782800000, 0x0000000782900000| 0%| F| |TAMS 0x0000000782800000, 0x0000000782800000| Untracked +| 41|0x0000000782900000, 0x0000000782900000, 0x0000000782a00000| 0%| F| |TAMS 0x0000000782900000, 0x0000000782900000| Untracked +| 42|0x0000000782a00000, 0x0000000782a00000, 0x0000000782b00000| 0%| F| |TAMS 0x0000000782a00000, 0x0000000782a00000| Untracked +| 43|0x0000000782b00000, 0x0000000782b00000, 0x0000000782c00000| 0%| F| |TAMS 0x0000000782b00000, 0x0000000782b00000| Untracked +| 44|0x0000000782c00000, 0x0000000782c00000, 0x0000000782d00000| 0%| F| |TAMS 0x0000000782c00000, 0x0000000782c00000| Untracked +| 45|0x0000000782d00000, 0x0000000782d00000, 0x0000000782e00000| 0%| F| |TAMS 0x0000000782d00000, 0x0000000782d00000| Untracked +| 46|0x0000000782e00000, 0x0000000782e00000, 0x0000000782f00000| 0%| F| |TAMS 0x0000000782e00000, 0x0000000782e00000| Untracked +| 47|0x0000000782f00000, 0x0000000782f00000, 0x0000000783000000| 0%| F| |TAMS 0x0000000782f00000, 0x0000000782f00000| Untracked +| 48|0x0000000783000000, 0x0000000783000000, 0x0000000783100000| 0%| F| |TAMS 0x0000000783000000, 0x0000000783000000| Untracked +| 49|0x0000000783100000, 0x0000000783100000, 0x0000000783200000| 0%| F| |TAMS 0x0000000783100000, 0x0000000783100000| Untracked +| 50|0x0000000783200000, 0x0000000783200000, 0x0000000783300000| 0%| F| |TAMS 0x0000000783200000, 0x0000000783200000| Untracked +| 51|0x0000000783300000, 0x0000000783300000, 0x0000000783400000| 0%| F| |TAMS 0x0000000783300000, 0x0000000783300000| Untracked +| 52|0x0000000783400000, 0x0000000783400000, 0x0000000783500000| 0%| F| |TAMS 0x0000000783400000, 0x0000000783400000| Untracked +| 53|0x0000000783500000, 0x0000000783500000, 0x0000000783600000| 0%| F| |TAMS 0x0000000783500000, 0x0000000783500000| Untracked +| 54|0x0000000783600000, 0x0000000783600000, 0x0000000783700000| 0%| F| |TAMS 0x0000000783600000, 0x0000000783600000| Untracked +| 55|0x0000000783700000, 0x0000000783700000, 0x0000000783800000| 0%| F| |TAMS 0x0000000783700000, 0x0000000783700000| Untracked +| 56|0x0000000783800000, 0x0000000783800000, 0x0000000783900000| 0%| F| |TAMS 0x0000000783800000, 0x0000000783800000| Untracked +| 57|0x0000000783900000, 0x0000000783900000, 0x0000000783a00000| 0%| F| |TAMS 0x0000000783900000, 0x0000000783900000| Untracked +| 58|0x0000000783a00000, 0x0000000783a00000, 0x0000000783b00000| 0%| F| |TAMS 0x0000000783a00000, 0x0000000783a00000| Untracked +| 59|0x0000000783b00000, 0x0000000783b00000, 0x0000000783c00000| 0%| F| |TAMS 0x0000000783b00000, 0x0000000783b00000| Untracked +| 60|0x0000000783c00000, 0x0000000783c00000, 0x0000000783d00000| 0%| F| |TAMS 0x0000000783c00000, 0x0000000783c00000| Untracked +| 61|0x0000000783d00000, 0x0000000783d00000, 0x0000000783e00000| 0%| F| |TAMS 0x0000000783d00000, 0x0000000783d00000| Untracked +| 62|0x0000000783e00000, 0x0000000783e00000, 0x0000000783f00000| 0%| F| |TAMS 0x0000000783e00000, 0x0000000783e00000| Untracked +| 63|0x0000000783f00000, 0x0000000783f00000, 0x0000000784000000| 0%| F| |TAMS 0x0000000783f00000, 0x0000000783f00000| Untracked +| 64|0x0000000784000000, 0x0000000784000000, 0x0000000784100000| 0%| F| |TAMS 0x0000000784000000, 0x0000000784000000| Untracked +| 65|0x0000000784100000, 0x0000000784100000, 0x0000000784200000| 0%| F| |TAMS 0x0000000784100000, 0x0000000784100000| Untracked +| 66|0x0000000784200000, 0x0000000784200000, 0x0000000784300000| 0%| F| |TAMS 0x0000000784200000, 0x0000000784200000| Untracked +| 67|0x0000000784300000, 0x0000000784300000, 0x0000000784400000| 0%| F| |TAMS 0x0000000784300000, 0x0000000784300000| Untracked +| 68|0x0000000784400000, 0x0000000784400000, 0x0000000784500000| 0%| F| |TAMS 0x0000000784400000, 0x0000000784400000| Untracked +| 69|0x0000000784500000, 0x0000000784500000, 0x0000000784600000| 0%| F| |TAMS 0x0000000784500000, 0x0000000784500000| Untracked +| 70|0x0000000784600000, 0x0000000784600000, 0x0000000784700000| 0%| F| |TAMS 0x0000000784600000, 0x0000000784600000| Untracked +| 71|0x0000000784700000, 0x0000000784700000, 0x0000000784800000| 0%| F| |TAMS 0x0000000784700000, 0x0000000784700000| Untracked +| 72|0x0000000784800000, 0x0000000784800000, 0x0000000784900000| 0%| F| |TAMS 0x0000000784800000, 0x0000000784800000| Untracked +| 73|0x0000000784900000, 0x0000000784900000, 0x0000000784a00000| 0%| F| |TAMS 0x0000000784900000, 0x0000000784900000| Untracked +| 74|0x0000000784a00000, 0x0000000784a00000, 0x0000000784b00000| 0%| F| |TAMS 0x0000000784a00000, 0x0000000784a00000| Untracked +| 75|0x0000000784b00000, 0x0000000784b00000, 0x0000000784c00000| 0%| F| |TAMS 0x0000000784b00000, 0x0000000784b00000| Untracked +| 76|0x0000000784c00000, 0x0000000784c00000, 0x0000000784d00000| 0%| F| |TAMS 0x0000000784c00000, 0x0000000784c00000| Untracked +| 77|0x0000000784d00000, 0x0000000784d00000, 0x0000000784e00000| 0%| F| |TAMS 0x0000000784d00000, 0x0000000784d00000| Untracked +| 78|0x0000000784e00000, 0x0000000784e00000, 0x0000000784f00000| 0%| F| |TAMS 0x0000000784e00000, 0x0000000784e00000| Untracked +| 79|0x0000000784f00000, 0x0000000784f00000, 0x0000000785000000| 0%| F| |TAMS 0x0000000784f00000, 0x0000000784f00000| Untracked +| 80|0x0000000785000000, 0x0000000785000000, 0x0000000785100000| 0%| F| |TAMS 0x0000000785000000, 0x0000000785000000| Untracked +| 81|0x0000000785100000, 0x0000000785100000, 0x0000000785200000| 0%| F| |TAMS 0x0000000785100000, 0x0000000785100000| Untracked +| 82|0x0000000785200000, 0x0000000785200000, 0x0000000785300000| 0%| F| |TAMS 0x0000000785200000, 0x0000000785200000| Untracked +| 83|0x0000000785300000, 0x0000000785300000, 0x0000000785400000| 0%| F| |TAMS 0x0000000785300000, 0x0000000785300000| Untracked +| 84|0x0000000785400000, 0x0000000785400000, 0x0000000785500000| 0%| F| |TAMS 0x0000000785400000, 0x0000000785400000| Untracked +| 85|0x0000000785500000, 0x0000000785500000, 0x0000000785600000| 0%| F| |TAMS 0x0000000785500000, 0x0000000785500000| Untracked +| 86|0x0000000785600000, 0x0000000785600000, 0x0000000785700000| 0%| F| |TAMS 0x0000000785600000, 0x0000000785600000| Untracked +| 87|0x0000000785700000, 0x0000000785700000, 0x0000000785800000| 0%| F| |TAMS 0x0000000785700000, 0x0000000785700000| Untracked +| 88|0x0000000785800000, 0x0000000785800000, 0x0000000785900000| 0%| F| |TAMS 0x0000000785800000, 0x0000000785800000| Untracked +| 89|0x0000000785900000, 0x0000000785900000, 0x0000000785a00000| 0%| F| |TAMS 0x0000000785900000, 0x0000000785900000| Untracked +| 90|0x0000000785a00000, 0x0000000785a00000, 0x0000000785b00000| 0%| F| |TAMS 0x0000000785a00000, 0x0000000785a00000| Untracked +| 91|0x0000000785b00000, 0x0000000785b00000, 0x0000000785c00000| 0%| F| |TAMS 0x0000000785b00000, 0x0000000785b00000| Untracked +| 92|0x0000000785c00000, 0x0000000785c00000, 0x0000000785d00000| 0%| F| |TAMS 0x0000000785c00000, 0x0000000785c00000| Untracked +| 93|0x0000000785d00000, 0x0000000785d00000, 0x0000000785e00000| 0%| F| |TAMS 0x0000000785d00000, 0x0000000785d00000| Untracked +| 94|0x0000000785e00000, 0x0000000785e00000, 0x0000000785f00000| 0%| F| |TAMS 0x0000000785e00000, 0x0000000785e00000| Untracked +| 95|0x0000000785f00000, 0x0000000785f00000, 0x0000000786000000| 0%| F| |TAMS 0x0000000785f00000, 0x0000000785f00000| Untracked +| 96|0x0000000786000000, 0x0000000786000000, 0x0000000786100000| 0%| F| |TAMS 0x0000000786000000, 0x0000000786000000| Untracked +| 97|0x0000000786100000, 0x0000000786100000, 0x0000000786200000| 0%| F| |TAMS 0x0000000786100000, 0x0000000786100000| Untracked +| 98|0x0000000786200000, 0x0000000786200000, 0x0000000786300000| 0%| F| |TAMS 0x0000000786200000, 0x0000000786200000| Untracked +| 99|0x0000000786300000, 0x0000000786300000, 0x0000000786400000| 0%| F| |TAMS 0x0000000786300000, 0x0000000786300000| Untracked +| 100|0x0000000786400000, 0x0000000786400000, 0x0000000786500000| 0%| F| |TAMS 0x0000000786400000, 0x0000000786400000| Untracked +| 101|0x0000000786500000, 0x0000000786500000, 0x0000000786600000| 0%| F| |TAMS 0x0000000786500000, 0x0000000786500000| Untracked +| 102|0x0000000786600000, 0x0000000786600000, 0x0000000786700000| 0%| F| |TAMS 0x0000000786600000, 0x0000000786600000| Untracked +| 103|0x0000000786700000, 0x0000000786700000, 0x0000000786800000| 0%| F| |TAMS 0x0000000786700000, 0x0000000786700000| Untracked +| 104|0x0000000786800000, 0x0000000786800000, 0x0000000786900000| 0%| F| |TAMS 0x0000000786800000, 0x0000000786800000| Untracked +| 105|0x0000000786900000, 0x0000000786900000, 0x0000000786a00000| 0%| F| |TAMS 0x0000000786900000, 0x0000000786900000| Untracked +| 106|0x0000000786a00000, 0x0000000786a00000, 0x0000000786b00000| 0%| F| |TAMS 0x0000000786a00000, 0x0000000786a00000| Untracked +| 107|0x0000000786b00000, 0x0000000786b00000, 0x0000000786c00000| 0%| F| |TAMS 0x0000000786b00000, 0x0000000786b00000| Untracked +| 108|0x0000000786c00000, 0x0000000786c00000, 0x0000000786d00000| 0%| F| |TAMS 0x0000000786c00000, 0x0000000786c00000| Untracked +| 109|0x0000000786d00000, 0x0000000786d00000, 0x0000000786e00000| 0%| F| |TAMS 0x0000000786d00000, 0x0000000786d00000| Untracked +| 110|0x0000000786e00000, 0x0000000786e00000, 0x0000000786f00000| 0%| F| |TAMS 0x0000000786e00000, 0x0000000786e00000| Untracked +| 111|0x0000000786f00000, 0x0000000786f00000, 0x0000000787000000| 0%| F| |TAMS 0x0000000786f00000, 0x0000000786f00000| Untracked +| 112|0x0000000787000000, 0x0000000787000000, 0x0000000787100000| 0%| F| |TAMS 0x0000000787000000, 0x0000000787000000| Untracked +| 113|0x0000000787100000, 0x0000000787100000, 0x0000000787200000| 0%| F| |TAMS 0x0000000787100000, 0x0000000787100000| Untracked +| 114|0x0000000787200000, 0x0000000787248758, 0x0000000787300000| 28%| E| |TAMS 0x0000000787200000, 0x0000000787200000| Complete +| 115|0x0000000787300000, 0x0000000787400000, 0x0000000787400000|100%| E|CS|TAMS 0x0000000787300000, 0x0000000787300000| Complete +| 116|0x0000000787400000, 0x0000000787500000, 0x0000000787500000|100%| E|CS|TAMS 0x0000000787400000, 0x0000000787400000| Complete +| 117|0x0000000787500000, 0x0000000787600000, 0x0000000787600000|100%| E| |TAMS 0x0000000787500000, 0x0000000787500000| Complete +| 118|0x0000000787600000, 0x0000000787700000, 0x0000000787700000|100%| E|CS|TAMS 0x0000000787600000, 0x0000000787600000| Complete +| 119|0x0000000787700000, 0x0000000787800000, 0x0000000787800000|100%| E|CS|TAMS 0x0000000787700000, 0x0000000787700000| Complete +| 120|0x0000000787800000, 0x0000000787900000, 0x0000000787900000|100%| E|CS|TAMS 0x0000000787800000, 0x0000000787800000| Complete +| 121|0x0000000787900000, 0x0000000787a00000, 0x0000000787a00000|100%| E|CS|TAMS 0x0000000787900000, 0x0000000787900000| Complete +| 122|0x0000000787a00000, 0x0000000787b00000, 0x0000000787b00000|100%| E|CS|TAMS 0x0000000787a00000, 0x0000000787a00000| Complete +| 123|0x0000000787b00000, 0x0000000787c00000, 0x0000000787c00000|100%| E|CS|TAMS 0x0000000787b00000, 0x0000000787b00000| Complete +| 124|0x0000000787c00000, 0x0000000787d00000, 0x0000000787d00000|100%| E|CS|TAMS 0x0000000787c00000, 0x0000000787c00000| Complete +| 125|0x0000000787d00000, 0x0000000787e00000, 0x0000000787e00000|100%| E|CS|TAMS 0x0000000787d00000, 0x0000000787d00000| Complete +| 126|0x0000000787e00000, 0x0000000787f00000, 0x0000000787f00000|100%| E|CS|TAMS 0x0000000787e00000, 0x0000000787e00000| Complete +| 127|0x0000000787f00000, 0x0000000788000000, 0x0000000788000000|100%| E|CS|TAMS 0x0000000787f00000, 0x0000000787f00000| Complete + +Card table byte_map: [0x000000010de36000,0x000000010e236000] _byte_map_base: 0x000000010a236000 + +Marking Bits (Prev, Next): (CMBitMap*) 0x00007f847680c218, (CMBitMap*) 0x00007f847680c250 + Prev Bits: [0x000000011edc2000, 0x0000000120dc2000) + Next Bits: [0x0000000120dc2000, 0x0000000122dc2000) + +Polling page: 0x000000010487c000 + +Metaspace: + +Usage: + Non-class: 13.13 MB capacity, 12.99 MB ( 99%) used, 119.18 KB ( <1%) free+waste, 22.88 KB ( <1%) overhead. + Class: 1.31 MB capacity, 1.22 MB ( 93%) used, 81.59 KB ( 6%) free+waste, 9.31 KB ( <1%) overhead. + Both: 14.44 MB capacity, 14.21 MB ( 98%) used, 200.77 KB ( 1%) free+waste, 32.19 KB ( <1%) overhead. + +Virtual space: + Non-class space: 14.00 MB reserved, 13.50 MB ( 96%) committed + Class space: 1.00 GB reserved, 1.38 MB ( <1%) committed + Both: 1.01 GB reserved, 14.88 MB ( 1%) committed + +Chunk freelists: + Non-Class: 283.00 KB + Class: 2.00 KB + Both: 285.00 KB + +CodeHeap 'non-profiled nmethods': size=120032Kb used=203Kb max_used=203Kb free=119828Kb + bounds [0x000000011788a000, 0x0000000117afa000, 0x000000011edc2000] +CodeHeap 'profiled nmethods': size=120032Kb used=1397Kb max_used=1397Kb free=118634Kb + bounds [0x0000000110352000, 0x00000001105c2000, 0x000000011788a000] +CodeHeap 'non-nmethods': size=5696Kb used=1290Kb max_used=1301Kb free=4405Kb + bounds [0x000000010fdc2000, 0x0000000110032000, 0x0000000110352000] + total_blobs=1614 nmethods=768 adapters=626 + compilation: enabled + stopped_count=0, restarted_count=0 + full_count=0 + +Compilation events (10 events): +Event: 0.895 Thread 0x00007f8477830800 nmethod 763 0x00000001104a9590 code [0x00000001104a97a0, 0x00000001104a9e58] +Event: 0.896 Thread 0x00007f8477830800 765 ! 3 jdk.internal.loader.BuiltinClassLoader::findClassOnClassPathOrNull (64 bytes) +Event: 0.897 Thread 0x00007f8477830800 nmethod 765 0x00000001104aa010 code [0x00000001104aa240, 0x00000001104aa798] +Event: 0.900 Thread 0x00007f847688a800 nmethod 764 0x00000001178bbb10 code [0x00000001178bbcc0, 0x00000001178bc198] +Event: 0.900 Thread 0x00007f847688a800 766 4 java.lang.AbstractStringBuilder:: (39 bytes) +Event: 0.902 Thread 0x00007f847688a800 nmethod 766 0x00000001178bc410 code [0x00000001178bc5a0, 0x00000001178bc798] +Event: 0.902 Thread 0x00007f8477830800 767 3 sun.nio.cs.UTF_8$Encoder::encodeArrayLoop (489 bytes) +Event: 0.905 Thread 0x00007f8477830800 nmethod 767 0x00000001104aaa10 code [0x00000001104ab000, 0x00000001104ae588] +Event: 0.907 Thread 0x00007f847688a800 768 4 java.lang.StringBuilder:: (7 bytes) +Event: 0.909 Thread 0x00007f847688a800 nmethod 768 0x00000001178bc890 code [0x00000001178bca20, 0x00000001178bcbd8] + +GC Heap History (0 events): +No events + +Deoptimization events (1 events): +Event: 0.079 Thread 0x00007f8477813000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000011788e8d0 method=java.lang.String.hashCode()I @ 14 c2 + +Classes redefined (0 events): +No events + +Internal exceptions (10 events): +Event: 0.219 Thread 0x00007f8477813000 Exception (0x0000000787dc0958) +Event: 0.221 Thread 0x00007f8477813000 Exception (0x0000000787dc3ee0) thrown at [../../ +Event: 0.221 Thread 0x00007f8477813000 Exception (0x0000000787dc7fc0) thrown at [../../src +Event: 0.231 Thread 0x00007f8477813000 Exception (0x0000000787c2afb0) thrown at [../../src/hotspot/share/prims/jni.cpp, line 615] +Event: 0.246 Thread 0x00007f8477813000 Exception (0x0000000787c844b0) thrown at [../../src/hotspot/share/interpreter/linkResolver.cpp, line +Event: 0.311 Thread 0x00007f8477813000 Exception (0x0000000787bd2608) thrown at [../../src/hotspot/share/prims/nativeLookup.cpp, line 382] +Event: 0.391 Thread 0x00007f8477813000 Exception (0x0000000787aef370) thrown at [../../src/hotspot/share/classfile/systemDictionary.cpp, line 231] +Event: 0.401 Thread 0x00007f8477813000 Exception +java_class_path (initial): .:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar +Launcher Type: generic + +[Global flags] + intx CICompilerCount = 3 {product} {ergonomic} + uint ConcGCThreads = 1 {product} {ergonomic} + uint G1ConcRefinementThreads = 4 {product} {ergonomic} + size_t G1HeapRegionSize = 1048576 {product} {ergonomic} + uintx GCDrainStackTargetSize = 64 {product} {ergonomic} + size_t InitialHeapSize = 134217728 {product} {ergonomic} + size_t MarkStackSize = 4194304 {product} {ergonomic} + size_t MaxHeapSize = 2147483648 {product} {ergonomic} + size_t MaxNewSize = 1287651328 {product} {ergonomic} + size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic} + uintx NonNMethodCodeHeapSize = 5830092 {pd product} {ergonomic} + uintx NonProfiledCodeHeapSize = 122914074 {pd product} {ergonomic} + uintx ProfiledCodeHeapSize = 122914074 {pd product} {ergonomic} + uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic} + bool SegmentedCodeCache = true {product} {ergonomic} + bool UseCompressedClassPointers = true {lp64_product} {ergonomic} + bool UseCompressedOops = true {lp64_product} {ergonomic} + bool UseG1GC = true {product} {ergonomic} + +Logging: +Log output configuration: + #0: stdout all=warning uptime,level,tags + #1: stderr all=off uptime,level,tags + +Environment Variables: +PATH=/usr/local/apache-ant/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin +SHELL=/bin/bash + +Signal Handlers: +SIGSEGV: [libjvm.dylib+0x770f12], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_ONSTACK|SA_RESTART|SA_SIGINFO +SIGBUS: [libjvm.dylib+0x770f12], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO +SIGFPE: [libjvm.dylib+0x770f12], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO +SIGPIPE: [libjvm.dylib+0x60ddbe], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO +SIGXFSZ: [libjvm.dylib+0x60ddbe], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO +SIGILL: [libjvm.dylib+0x770f12], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO +SIGUSR2: [libjvm.dylib+0x60e3ae], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO +SIGHUP: [libjvm.dylib+0x60ce13], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO +SIGINT: [libjvm.dylib+0x60ce13], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO +SIGTERM: [libjvm.dylib+0x60ce13], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO +SIGQUIT: [libjvm.dylib+0x60ce13], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO + + +--------------- S Y S T E M --------------- + +OS:uname:Darwin 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64 +rlimit: STACK 8192k, CORE 0k, NPROC 1392, NOFILE 10240, AS infinity, DATA infinity, FSIZE infinity +load average:3.21 2.37 2.24 + +CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 69 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, fma + +Memory: 4k page, physical 8388608k(1628468k free) + +vm_info: OpenJDK 64-Bit Server VM (11.0.3+7) for bsd-amd64 JRE (11.0.3+7), built on Apr 18 2019 04:31:22 by "jenkins" with gcc 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81) + +END. diff --git a/src/test-native/bug1398/log/run-bug1398-sdk1011.log b/src/test-native/bug1398/log/run-bug1398-sdk1011.log new file mode 100644 index 000000000..c0d3839ff --- /dev/null +++ b/src/test-native/bug1398/log/run-bug1398-sdk1011.log @@ -0,0 +1,1020 @@ +Starting Bug1398Launcher: ./Bug1398LauncherSDK1011 +Bug1398Launcher.c:270:NSApplicationMain(): argv[2]: jvmlibjli /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib +Bug1398Launcher.c:257:NSApplicationMain(): argv[4]: classpath arg -Djava.class.path=.:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar +Bug1398Launcher.c:265:NSApplicationMain(): argv[6]: libpath arg -Djava.library.path=/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib +Bug1398Launcher.c:279:NSApplicationMain(): main.1 +Bug1398Launcher.c:282:NSApplicationMain(): main.1.1 +2020-02-22 14:51:27.907 Bug1398LauncherSDK1011[2325:148219] init +Bug1398Launcher.c:284:NSApplicationMain(): main.1.2 +Bug1398Launcher.c:286:NSApplicationMain(): main.1.3 +Bug1398Launcher.c:289:NSApplicationMain(): main.1.5 +Bug1398Launcher.c:186:create_jvm_thread(): create_jvm_thread.1.1 +Bug1398Launcher.c:194:create_jvm_thread(): create_jvm_thread.1.2 +Bug1398Launcher.c:198:create_jvm_thread(): create_jvm_thread.1.X +Bug1398Launcher.c:292:NSApplicationMain(): main.1.6 +Bug1398Launcher.c:61:launchJava(): launchJava.1.1 +Bug1398Launcher.c:78:launchJava(): launchJava.1.2 +Bug1398Launcher.c:79:launchJava(): .. using CLASSPATH -Djava.class.path=.:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar +Bug1398Launcher.c:80:launchJava(): .. using LIBPATH -Djava.library.path=/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib +Bug1398Launcher.c:39:create_vm(): Found libjli.dylib /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib +Bug1398Launcher.c:84:launchJava(): CreateVM:10cbee151 env:700004b72da8 vm_args:700004b72d68 +2020-02-22 14:51:27.970 Bug1398LauncherSDK1011[2325:148219] App starting... +Bug1398Launcher.c:90:launchJava(): VM Created +Bug1398Launcher.c:93:launchJava(): launchJava.1.3 +GLProfile.initSingleton() - thread main + [2]: com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:216) + [3]: Bug1398MainClass.(Bug1398MainClass.java:27) +GLProfile.init - thread: main +----------------------------------------------------------------------------------------------------- +Platform: MACOS / Mac OS X 10.15.3 (10.15.3), x86_64 (X86_64, GENERIC_ABI), 4 cores, littleEndian true +MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment: + int8 1 / 1, int16 2 / 2 + int 4 / 4, long 8 / 8 + int32 4 / 4, int64 8 / 8 + float 4 / 4, double 8 / 8, ldouble 16 / 16 + pointer 8 / 8, page 4096 +Platform: Java Version: 11.0.3 (11.0.3u0), VM: OpenJDK 64-Bit Server VM, Runtime: OpenJDK Runtime Environment +Platform: Java Vendor: AdoptOpenJDK, https://adoptopenjdk.net/, JavaSE: true, Java9: true, Java6: true, dynamicLib: true, AWT enabled: true +----------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------- +Package: com.jogamp.common +Extension Name: com.jogamp.common +Specification Title: GlueGen Java Bindings Generator +Specification Vendor: JogAmp Community +Specification Version: 2.4 +Implementation Title: GlueGen Run-Time +Implementation Vendor: JogAmp Community +Implementation Vendor ID: com.jogamp +Implementation URL: http://jogamp.org/ +Implementation Version: 2.4.0-rc-20200219 +Implementation Build: 2.4-bmanual-20200219 +Implementation Branch: master +Implementation Commit: 0b441cfc14947b1c8cabdc87705ae95a0afec4d9 +Implementation SHA Sources: 8d908b6f7f3983b3f1b8fe7dbbf4409635e0eddc4cc83fc0b3109dbd48c12b0a +Implementation SHA Classes: ed9b47cddf3dfd80b0f8f06472d115736bdc538f72e3ba6ac5a9246e72ab54f8 +Implementation SHA Classes-this: 2cf35278c9b3972ccb1ab6f94828bc55e8deea691814b8a6ff13a426f115354c +Implementation SHA Natives: e665dac3f562d9c94fa5e36e5a4e0b529ba2049ac0a4e24adc8b01bfa299ff34 +Implementation SHA Natives-this: 0 +----------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------- +Package: com.jogamp.nativewindow +Extension Name: com.jogamp.opengl +Specification Title: Java Bindings for OpenGL API Specification +Specification Vendor: JogAmp Community +Specification Version: 2.4 +Implementation Title: Java Bindings for OpenGL Runtime Environment +Implementation Vendor: JogAmp Community +Implementation Vendor ID: com.jogamp +Implementation URL: http://jogamp.org/ +Implementation Version: 2.4.0-rc-20200106 +Implementation Build: 2.4-bmanual-20200106 +Implementation Branch: master +Implementation Commit: 0209655c26e9240639c5f0a76ca6ca54ae0584b1 +Implementation SHA Sources: null +Implementation SHA Classes: null +Implementation SHA Classes-this: null +Implementation SHA Natives: null +Implementation SHA Natives-this: null +----------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------- +Package: com.jogamp.opengl +Extension Name: com.jogamp.opengl +Specification Title: Java Bindings for OpenGL API Specification +Specification Vendor: JogAmp Community +Specification Version: 2.4 +Implementation Title: Java Bindings for OpenGL Runtime Environment +Implementation Vendor: JogAmp Community +Implementation Vendor ID: com.jogamp +Implementation URL: http://jogamp.org/ +Implementation Version: 2.4.0-rc-20200106 +Implementation Build: 2.4-bmanual-20200106 +Implementation Branch: master +Implementation Commit: 0209655c26e9240639c5f0a76ca6ca54ae0584b1 +Implementation SHA Sources: null +Implementation SHA Classes: null +Implementation SHA Classes-this: null +Implementation SHA Natives: null +Implementation SHA Natives-this: null +----------------------------------------------------------------------------------------------------- +GLDrawableFactory.static - Native OS Factory for: .macosx: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory +Info: EGLDrawableFactory: EGL ES2 - NOPE +Info: EGLDrawableFactory: EGL ES1 - NOPE (ES1 lib) +Info: EGLDrawableFactory: EGL GLn - NOPE (GLn lib) +Info: GLProfile.init - Mobile GLDrawable factory not available +Info: GLProfile.init - Default device is desktop derived: MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] +Info: GLProfile.initProfilesForDevice: MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] (com.jogamp.nativewindow.macosx.MacOSXGraphicsDevice), isSet false, hasDesktopGLFactory true, hasEGLFactory false +GLProfile.init map .macosx_decon_0, desktopCtxUndef true, esCtxUndef true +GLProfile.init map GLProfile[GL4bc/GL4bc.sw] on device .macosx_decon_0 +GLProfile.init map defaultAny GLProfile[GL4bc/GL4bc.sw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL3bc/GL3bc.sw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2/GL2.sw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL4/GL4.sw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL3/GL3.sw] on device .macosx_decon_0 +GLProfile.init map *** no mapping for GLES3 on device .macosx_decon_0 +GLProfile.init map GLProfile[GL4ES3/GL4bc.sw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2GL3/GL2.sw] on device .macosx_decon_0 +GLProfile.init map *** no mapping for GLES2 on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2ES2/GL2.sw] on device .macosx_decon_0 +GLProfile.init map *** no mapping for GLES1 on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2ES1/GL2.sw] on device .macosx_decon_0 +main: setRealized: drawable MacOSXOnscreenCGLDrawable, surface WrappedSurface, isProxySurface true: false -> true + [2]: jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:176) + [3]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:261) + [4]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:83) + [5]: jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(GLDrawableFactoryImpl.java:188) + [6]: jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(GLDrawableFactoryImpl.java:217) + [7]: com.jogamp.opengl.GLDrawableFactory.createSharedResource(GLDrawableFactory.java:385) + [8]: com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1938) + [9]: com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1895) + [10]: com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1862) + [11]: com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) + [12]: com.jogamp.opengl.GLProfile$1.run(GLProfile.java:239) + [13]: java.base/java.security.AccessController.doPrivileged(Native Method) + [14]: com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:225) + [15]: Bug1398MainClass.(Bug1398MainClass.java:27) +main: GLContext.resetStates(isInit true) +main: MacOSXCGLContext.createImpl: START GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]], share 0x0 +main: Use ARB[avail[disabled false, quirk false] -> true]] +main: createContextARB-MapGLVersions is SET (decon): false +main: createContextARB-MapGLVersions START (GLDesktop true, GLES false, minorVersion true) on MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] +main: createContextARBVersions.1: share 0, direct true, version 3.3 [3.3 .. 3.1] +NS viewHandle.2: drawableHandle 0x7fc4c15ce0d0 -> nsViewHandle 0x7fc4c15ce0d0: isNSView true, isNSWindow false, isFBO false, isPBuffer false, isSurfaceless false, jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable, + MacOSXOnscreenCGLDrawable[Realized true, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + Handle 0x7fc4c15ce0d0, + Surface WrappedSurface[ displayHandle 0x0 +, surfaceHandle 0x7fc4c15ce0d0 +, size 64x64 +, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ] +, MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]]] +, surfaceLock <2f7c2f4f, 6af93788>[count 1, qsz 0, owner
] +, OSXDummyUpstreamSurfaceHook[pixel 64x64] +, upstreamSurface false ]] +NS create OSX>=lion true, OSX>=mavericks true +NS create incompleteView: true +NS create backingLayerHost: null +NS create share: 0 +NS create drawable type: jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable +NS create drawable handle: isPBuffer false, isFBO false, isSurfaceless false +NS create pixelFormat: 0x7fc4c15daea0 +NS create chosenCaps: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]] +NS create fixedCaps: GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]] +NS create drawable native-handle: 0x7fc4c15ce0d0 +NS create drawable NSView-handle: 0x7fc4c15ce0d0 +NS create screen refresh-rate: 60 hz, 16666 micros +main: createContextARBImpl: OK 3.3 (Core profile, arb, compat[], hardware) - @creation, share 0, direct true on OSX 10.15.3 +main: GLContext.setGLFuncAvail: glGetStringi 0x7fff3b6641a3 (opt), glGetString 0x7fff3b65fbc6, glGetIntegerv 0x7fff3b65fa20 +main: GLContext.setGLFuncAvail: Given MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] - requested 3.3 (Core profile, arb, compat[], hardware) - 4.1 INTEL-14.4.23, has Number(Str) 4.1.0 +main: GLContext.setGLFuncAvail: Pre version verification: requested 3.3 (Core profile, arb, compat[], hardware), drawable.glp GLProfile[GL2/GL2.sw], strictMatch true, glVersionsMapping true, hasGLVersionByString 4.1.0 +main: GLContext.setGLFuncAvail: Version verification (Int): String 4.1 INTEL-14.4.23, Number(Int) 4.1.0 - 4.1 (Core profile, arb, compat[], hardware) +main: GLContext.setGLFuncAvail: Post version verification: requested 3.3 (Core profile, arb, compat[], hardware) -> has 4.1 (Core profile, arb, compat[], hardware), strictMatch true, versionValidated true, versionGL3IntOK true +Quirk: NoOffscreenBitmap: cause: OS MACOS +Quirk: NeedSharedObjectSync: cause: OS MACOS +Quirk: GL4NeedsGL3Request: cause: OS MACOS, OS Version 10.15.3, req 3.3 +Quirks local.0: [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +Quirks local.X: [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +Quirks sticky on MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]]: [GL4NeedsGL3Request] +main: GLContext.setGLFuncAvail.0 validated FQN: .macosx_decon_0-0x4010005 - 4.1 (Core profile, arb, compat[], hardware) - 4.1 INTEL-14.4.23 +main: Initializing CGL extension address table: MacOSX-.macosx_decon_0 +main: GLContext CGL ProcAddressTable mapping key(MacOSX-.macosx_decon_0) -> 0x6f96c77 +main: GLContext GL ProcAddressTable mapping key(.macosx_decon_0-0x4010005 - 4.1 (Core profile, arb, compat[], hardware)) -> 0x3d680b5a: jogamp.opengl.gl4.GL4bcProcAddressTable +Info: setGL (OpenGL null): main, -> GL4bcImpl, jogamp.opengl.gl4.GL4bcImpl@635eaaf1 + [2]: jogamp.opengl.GLContextImpl.setGL(GLContextImpl.java:358) + [3]: jogamp.opengl.GLContextImpl.setGLFunctionAvailability(GLContextImpl.java:2125) + [4]: jogamp.opengl.GLContextImpl.createContextARBVersions(GLContextImpl.java:1456) + [5]: jogamp.opengl.GLContextImpl.createContextARBMapVersionsAvailable(GLContextImpl.java:1395) + [6]: jogamp.opengl.GLContextImpl.mapGLVersions(GLContextImpl.java:1234) + [7]: jogamp.opengl.GLContextImpl.createContextARB(GLContextImpl.java:969) + [8]: jogamp.opengl.macosx.cgl.MacOSXCGLContext.createImpl(MacOSXCGLContext.java:314) + [9]: jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:770) + [10]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:653) + [11]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:591) + [12]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:267) + [13]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:83) + [14]: jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(GLDrawableFactoryImpl.java:188) + [15]: jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(GLDrawableFactoryImpl.java:217) + [16]: com.jogamp.opengl.GLDrawableFactory.createSharedResource(GLDrawableFactory.java:385) + [17]: com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1938) + [18]: com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1895) + [19]: com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1862) + [20]: com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) + [21]: com.jogamp.opengl.GLProfile$1.run(GLProfile.java:239) + [22]: java.base/java.security.AccessController.doPrivileged(Native Method) + [23]: com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:225) + [24]: Bug1398MainClass.(Bug1398MainClass.java:27) +main:ExtensionAvailabilityCache: Pre-caching init jogamp.opengl.gl4.GL4bcImpl@635eaaf1, OpenGL 4.1 (Core profile, arb, compat[], hardware) - 4.1 INTEL-14.4.23 +main:ExtensionAvailabilityCache: Pre-caching extension availability OpenGL 4.1 (Core profile, arb, compat[], hardware) - 4.1 INTEL-14.4.23, use glGetStringi +main:ExtensionAvailabilityCache: GL_EXTENSIONS: 45, used glGetStringi +main:ExtensionAvailabilityCache: GLX_EXTENSIONS: 0 +main:ExtensionAvailabilityCache: GL vendor: Intel Inc. +main:ExtensionAvailabilityCache: ALL EXTENSIONS: 45 +main:ExtensionAvailabilityCache: Added GL_VERSION_4_1 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_4_0 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_3_3 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_3_2 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_3_1 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_3_0 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_2_1 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_2_0 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_5 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_4 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_3 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_2 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_1 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_0 to known extensions +main: GLContext GL ExtensionAvailabilityCache mapping key(.macosx_decon_0-0x4010005) -> 0x7a69b07 - entries: 60 +CGL setSwapInterval: 1 +main: GLContext.setGLFuncAvail.X: OK .macosx_decon_0-0x4010005 - 4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) - glErr 0x0 +main: createContextARBVersions.X: ctx 0x7fc4c140f840, share 0, direct true, version 3.3 [3.3 .. 3.1] +main: createContextARB-MapGLVersions MAP MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]]: 3 (Core profile, compat[], hardware) -> 4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) +main: createContextARB-MapGLVersions HAVE MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] 3 (Core profile, compat[], hardware)[3.1 .. 3.3]: [None] -> [4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware)] +main: createContextARB-MapGLVersions MAP MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]]: 4 (Core profile, compat[], hardware) -> 4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) +main: createContextARB-MapGLVersions: Quirk Triggerd: GL4NeedsGL3Request: cause: OS MACOS, OS Version 10.15.3 +main: GLContext.resetStates(isInit false) +main: createContextARBVersions.1: share 0, direct true, version 4.6 [4.6 .. 4.0] +main: createContextARBImpl: Not supported 4.6 (Compat profile, arb, compat[], hardware) - @creation on OSX 10.15.3 +main: createContextARBVersions.2: share 0, direct true, version 4.5 [4.6 .. 4.0] +main: createContextARBImpl: Not supported 4.5 (Compat profile, arb, compat[], hardware) - @creation on OSX 10.15.3 +main: createContextARBVersions.3: share 0, direct true, version 4.4 [4.6 .. 4.0] +main: createContextARBImpl: Not supported 4.4 (Compat profile, arb, compat[], hardware) - @creation on OSX 10.15.3 +main: createContextARBVersions.4: share 0, direct true, version 4.3 [4.6 .. 4.0] +main: createContextARBImpl: Not supported 4.3 (Compat profile, arb, compat[], hardware) - @creation on OSX 10.15.3 +main: createContextARBVersions.5: share 0, direct true, version 4.2 [4.6 .. 4.0] +main: createContextARBImpl: Not supported 4.2 (Compat profile, arb, compat[], hardware) - @creation on OSX 10.15.3 +main: createContextARBVersions.6: share 0, direct true, version 4.1 [4.6 .. 4.0] +main: createContextARBImpl: Not supported 4.1 (Compat profile, arb, compat[], hardware) - @creation on OSX 10.15.3 +main: createContextARBVersions.7: share 0, direct true, version 4.0 [4.6 .. 4.0] +main: createContextARBImpl: Not supported 4.0 (Compat profile, arb, compat[], hardware) - @creation on OSX 10.15.3 +main: createContextARBVersions.X: ctx 0x0, share 0, direct true, version 4.0 [4.6 .. 4.0] +main: createContextARB-MapGLVersions NOPE MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], 4 (Compat profile, compat[], hardware) [4.6 .. 4.0] +main: createContextARBVersions.1: share 0, direct true, version 3.3 [3.3 .. 3.1] +main: createContextARBImpl: Not supported 3.3 (Compat profile, arb, compat[], hardware) - @creation on OSX 10.15.3 +main: createContextARBVersions.2: share 0, direct true, version 3.2 [3.3 .. 3.1] +main: createContextARBImpl: Not supported 3.2 (Compat profile, arb, compat[], hardware) - @creation on OSX 10.15.3 +main: createContextARBVersions.3: share 0, direct true, version 3.1 [3.3 .. 3.1] +main: createContextARBImpl: Not supported 3.1 (Compat profile, arb, compat[], hardware) - @creation on OSX 10.15.3 +main: createContextARBVersions.X: ctx 0x0, share 0, direct true, version 3.1 [3.3 .. 3.1] +main: createContextARB-MapGLVersions NOPE MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], 3 (Compat profile, compat[], hardware) [3.3 .. 3.1] +main: createContextARBVersions.1: share 0, direct true, version 3.0 [3.0 .. 2.0] +main: createContextARBImpl: Not supported 3.0 (Compat profile, arb, compat[], hardware) - @creation on OSX 10.15.3 +main: createContextARBVersions.2: share 0, direct true, version 2.1 [3.0 .. 2.0] +NS viewHandle.2: drawableHandle 0x7fc4c15ce0d0 -> nsViewHandle 0x7fc4c15ce0d0: isNSView true, isNSWindow false, isFBO false, isPBuffer false, isSurfaceless false, jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable, + MacOSXOnscreenCGLDrawable[Realized true, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + Handle 0x7fc4c15ce0d0, + Surface WrappedSurface[ displayHandle 0x0 +, surfaceHandle 0x7fc4c15ce0d0 +, size 64x64 +, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ] +, MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]]] +, surfaceLock <2f7c2f4f, 6af93788>[count 1, qsz 0, owner
] +, OSXDummyUpstreamSurfaceHook[pixel 64x64] +, upstreamSurface false ]] +NS create OSX>=lion true, OSX>=mavericks true +NS create incompleteView: true +NS create backingLayerHost: null +NS create share: 0 +NS create drawable type: jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable +NS create drawable handle: isPBuffer false, isFBO false, isSurfaceless false +NS create pixelFormat: 0x7fc4c14f2e60 +NS create chosenCaps: GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]] +NS create fixedCaps: GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]] +NS create drawable native-handle: 0x7fc4c15ce0d0 +NS create drawable NSView-handle: 0x7fc4c15ce0d0 +NS create screen refresh-rate: 60 hz, 16666 micros +main: createContextARBImpl: OK 2.1 (Compat profile, arb, compat[], hardware) - @creation, share 0, direct true on OSX 10.15.3 +main: GLContext.setGLFuncAvail: glGetStringi 0x7fff3b6641a3 (opt), glGetString 0x7fff3b65fbc6, glGetIntegerv 0x7fff3b65fa20 +main: GLContext.setGLFuncAvail: Given MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] - requested 2.1 (Compat profile, arb, compat[], hardware) - 2.1 INTEL-14.4.23, has Number(Str) 2.1.0 +main: GLContext.setGLFuncAvail: Pre version verification: requested 2.1 (Compat profile, arb, compat[], hardware), drawable.glp GLProfile[GL2/GL2.sw], strictMatch true, glVersionsMapping true, hasGLVersionByString 2.1.0 +main: GLContext.setGLFuncAvail: Version verification (String): String 2.1 INTEL-14.4.23, Number(Str) 2.1.0 +main: GLContext.setGLFuncAvail: Post version verification: requested 2.1 (Compat profile, arb, compat[], hardware) -> has 2.1 (Compat profile, arb, compat[], hardware), strictMatch true, versionValidated true, versionGL3IntOK false +Quirk: NoOffscreenBitmap: cause: OS MACOS +Quirk: NeedSharedObjectSync: cause: OS MACOS +Quirks local.0: [NoOffscreenBitmap, NeedSharedObjectSync] +Quirks local.X: [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +Quirks sticky on MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]]: [GL4NeedsGL3Request] +main: GLContext.setGLFuncAvail.0 validated FQN: .macosx_decon_0-0x2010003 - 2.1 (Compat profile, arb, compat[], hardware) - 2.1 INTEL-14.4.23 +main: Initializing CGL extension address table: MacOSX-.macosx_decon_0 +main: GLContext CGL ProcAddressTable reusing key(MacOSX-.macosx_decon_0) -> 0x6f96c77 +main: GLContext GL ProcAddressTable mapping key(.macosx_decon_0-0x2010003 - 2.1 (Compat profile, arb, compat[], hardware)) -> 0x41e36e46: jogamp.opengl.gl4.GL4bcProcAddressTable +Info: setGL (OpenGL null): main, -> GL4bcImpl, jogamp.opengl.gl4.GL4bcImpl@15c43bd9 + [2]: jogamp.opengl.GLContextImpl.setGL(GLContextImpl.java:358) + [3]: jogamp.opengl.GLContextImpl.setGLFunctionAvailability(GLContextImpl.java:2125) + [4]: jogamp.opengl.GLContextImpl.createContextARBVersions(GLContextImpl.java:1456) + [5]: jogamp.opengl.GLContextImpl.createContextARBMapVersionsAvailable(GLContextImpl.java:1395) + [6]: jogamp.opengl.GLContextImpl.mapGLVersions(GLContextImpl.java:1317) + [7]: jogamp.opengl.GLContextImpl.createContextARB(GLContextImpl.java:969) + [8]: jogamp.opengl.macosx.cgl.MacOSXCGLContext.createImpl(MacOSXCGLContext.java:314) + [9]: jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:770) + [10]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:653) + [11]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:591) + [12]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:267) + [13]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:83) + [14]: jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(GLDrawableFactoryImpl.java:188) + [15]: jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(GLDrawableFactoryImpl.java:217) + [16]: com.jogamp.opengl.GLDrawableFactory.createSharedResource(GLDrawableFactory.java:385) + [17]: com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1938) + [18]: com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1895) + [19]: com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1862) + [20]: com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) + [21]: com.jogamp.opengl.GLProfile$1.run(GLProfile.java:239) + [22]: java.base/java.security.AccessController.doPrivileged(Native Method) + [23]: com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:225) + [24]: Bug1398MainClass.(Bug1398MainClass.java:27) +main:ExtensionAvailabilityCache: Pre-caching init jogamp.opengl.gl4.GL4bcImpl@15c43bd9, OpenGL 2.1 (Compat profile, arb, compat[], hardware) - 2.1 INTEL-14.4.23 +main:ExtensionAvailabilityCache: Pre-caching extension availability OpenGL 2.1 (Compat profile, arb, compat[], hardware) - 2.1 INTEL-14.4.23, use glGetString +main:ExtensionAvailabilityCache: GL_EXTENSIONS: 128, used glGetString +main:ExtensionAvailabilityCache: GLX_EXTENSIONS: 0 +main:ExtensionAvailabilityCache: GL vendor: Intel Inc. +main:ExtensionAvailabilityCache: ALL EXTENSIONS: 128 +main:ExtensionAvailabilityCache: Added GL_VERSION_2_1 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_2_0 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_5 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_4 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_3 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_2 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_1 to known extensions +main:ExtensionAvailabilityCache: Added GL_VERSION_1_0 to known extensions +main: GLContext GL ExtensionAvailabilityCache mapping key(.macosx_decon_0-0x2010003) -> 0x3d74bf60 - entries: 137 +CGL setSwapInterval: 1 +main: GLContext.setGLFuncAvail.X: OK .macosx_decon_0-0x2010003 - 2.1 (Compat profile, arb, compat[], FBO, hardware) - glErr 0x0 +main: createContextARBVersions.X: ctx 0x7fc4c140f840, share 0, direct true, version 2.1 [3.0 .. 2.0] +main: createContextARB-MapGLVersions MAP MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]]: 2 (Compat profile, compat[], hardware) -> 2.1 (Compat profile, arb, compat[], FBO, hardware) +main: createContextARB-MapGLVersions HAVE MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] 2 (Compat profile, compat[], hardware)[2.0 .. 3.0]: [None] -> [2.1 (Compat profile, arb, compat[], FBO, hardware)] +main: GLContext.resetStates(isInit false) +main: createContextARB-MapGLVersions SET .macosx_decon_0 +MapGLVersions .macosx_decon_0-0x2020000: 2.1 (Compat profile, arb, compat[], FBO, hardware) +MapGLVersions .macosx_decon_0-0x4040000: 4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) +MapGLVersions .macosx_decon_0-0x3040000: 4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) +main: createContextARB-MapGLVersions END (success true) on MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], profileAliasing: true, total 734.591508ms +MapGLVersions .macosx_decon_0-0x2020000: 2.1 (Compat profile, arb, compat[], FBO, hardware) +MapGLVersions .macosx_decon_0-0x4040000: 4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) +MapGLVersions .macosx_decon_0-0x3040000: 4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) +main: createContextARB-MapGLVersions requested GLProfile[GL2/GL2.sw] -> 2.0 (Compat profile, compat[], hardware) +main: createContextARB-MapGLVersions Mapped 2.1 (Compat profile, arb, compat[], FBO, hardware) +NS viewHandle.2: drawableHandle 0x7fc4c15ce0d0 -> nsViewHandle 0x7fc4c15ce0d0: isNSView true, isNSWindow false, isFBO false, isPBuffer false, isSurfaceless false, jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable, + MacOSXOnscreenCGLDrawable[Realized true, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + Handle 0x7fc4c15ce0d0, + Surface WrappedSurface[ displayHandle 0x0 +, surfaceHandle 0x7fc4c15ce0d0 +, size 64x64 +, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ] +, MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]]] +, surfaceLock <2f7c2f4f, 6af93788>[count 1, qsz 0, owner
] +, OSXDummyUpstreamSurfaceHook[pixel 64x64] +, upstreamSurface false ]] +NS create OSX>=lion true, OSX>=mavericks true +NS create incompleteView: true +NS create backingLayerHost: null +NS create share: 0 +NS create drawable type: jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable +NS create drawable handle: isPBuffer false, isFBO false, isSurfaceless false +NS create pixelFormat: 0x7fc4c1743320 +NS create chosenCaps: GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]] +NS create fixedCaps: GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]] +NS create drawable native-handle: 0x7fc4c15ce0d0 +NS create drawable NSView-handle: 0x7fc4c15ce0d0 +NS create screen refresh-rate: 60 hz, 16666 micros +main: createContextARBImpl: OK 2.1 (Compat profile, arb, compat[], FBO, hardware) - @creation, share 0, direct true on OSX 10.15.3 +main: GLContext.setGLFuncAvail: glGetStringi 0x7fff3b6641a3 (opt), glGetString 0x7fff3b65fbc6, glGetIntegerv 0x7fff3b65fa20 +main: GLContext.setGLFuncAvail: Given MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] - requested 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.4.23, has Number(Str) 2.1.0 +main: GLContext.setGLFuncAvail: Pre version verification: requested 2.1 (Compat profile, arb, compat[], FBO, hardware), drawable.glp GLProfile[GL2/GL2.sw], strictMatch false, glVersionsMapping false, hasGLVersionByString 2.1.0 +main: GLContext.setGLFuncAvail: Version verification (String): String 2.1 INTEL-14.4.23, Number(Str) 2.1.0 +main: GLContext.setGLFuncAvail: Post version verification: requested 2.1 (Compat profile, arb, compat[], FBO, hardware) -> has 2.1 (Compat profile, arb, compat[], FBO, hardware), strictMatch false, versionValidated true, versionGL3IntOK false +Quirk: NoOffscreenBitmap: cause: OS MACOS +Quirk: NeedSharedObjectSync: cause: OS MACOS +Quirks local.0: [NoOffscreenBitmap, NeedSharedObjectSync] +Quirks local.X: [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +Quirks sticky on MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]]: [GL4NeedsGL3Request] +main: GLContext.setGLFuncAvail.0 validated FQN: .macosx_decon_0-0x2010003 - 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.4.23 +main: Initializing CGL extension address table: MacOSX-.macosx_decon_0 +main: GLContext CGL ProcAddressTable reusing key(MacOSX-.macosx_decon_0) -> 0x6f96c77 +main: GLContext GL ProcAddressTable reusing key(.macosx_decon_0-0x2010003 - 2.1 (Compat profile, arb, compat[], FBO, hardware)) -> 0x41e36e46: jogamp.opengl.gl4.GL4bcProcAddressTable -> jogamp.opengl.gl4.GL4bc +Info: setGL (OpenGL null): main, -> GL4bcImpl, jogamp.opengl.gl4.GL4bcImpl@2145b572 + [2]: jogamp.opengl.GLContextImpl.setGL(GLContextImpl.java:358) + [3]: jogamp.opengl.GLContextImpl.setGLFunctionAvailability(GLContextImpl.java:2125) + [4]: jogamp.opengl.GLContextImpl.createContextARB(GLContextImpl.java:993) + [5]: jogamp.opengl.macosx.cgl.MacOSXCGLContext.createImpl(MacOSXCGLContext.java:314) + [6]: jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:770) + [7]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:653) + [8]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:591) + [9]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:267) + [10]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:83) + [11]: jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(GLDrawableFactoryImpl.java:188) + [12]: jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(GLDrawableFactoryImpl.java:217) + [13]: com.jogamp.opengl.GLDrawableFactory.createSharedResource(GLDrawableFactory.java:385) + [14]: com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1938) + [15]: com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1895) + [16]: com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1862) + [17]: com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) + [18]: com.jogamp.opengl.GLProfile$1.run(GLProfile.java:239) + [19]: java.base/java.security.AccessController.doPrivileged(Native Method) + [20]: com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:225) + [21]: Bug1398MainClass.(Bug1398MainClass.java:27) +main: GLContext GL ExtensionAvailabilityCache reusing key(.macosx_decon_0-0x2010003) -> 0x3d74bf60 - entries: 137 +CGL setSwapInterval: 1 +main: GLContext.setGLFuncAvail.X: OK .macosx_decon_0-0x2010003 - 2.1 (Compat profile, arb, compat[], FBO, hardware) - glErr 0x0 +main: Create GL context OK: For jogamp.opengl.macosx.cgl.MacOSXCGLContext - 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.4.23 - obj 0x4690b489, ctx 0x7fc4c15ddea0, isShared false, surf true 0x7fc4c15ce0d0, <39529185, 72f926e6>[count 1, qsz 0, owner
] +MaxOSXCGLContext.NSOpenGLImpl.associateDrawable: true, ctx 0x7fc4c15ddea0, hasBackingLayerHost false, attachGLLayerCmd null +NS viewHandle.2: drawableHandle 0x7fc4c15ce0d0 -> nsViewHandle 0x7fc4c15ce0d0: isNSView true, isNSWindow false, isFBO false, isPBuffer false, isSurfaceless false, jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable, + MacOSXOnscreenCGLDrawable[Realized true, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + Handle 0x7fc4c15ce0d0, + Surface WrappedSurface[ displayHandle 0x0 +, surfaceHandle 0x7fc4c15ce0d0 +, size 64x64 +, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ] +, MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]]] +, surfaceLock <2f7c2f4f, 6af93788>[count 1, qsz 0, owner
] +, OSXDummyUpstreamSurfaceHook[pixel 64x64] +, upstreamSurface false ]] +main: setRealized: drawable MacOSXOnscreenCGLDrawable, surface WrappedSurface, isProxySurface true: false -> true + [2]: jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:176) + [3]: jogamp.opengl.GLDrawableFactoryImpl.probeSurfacelessCtx(GLDrawableFactoryImpl.java:124) + [4]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:278) + [5]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:83) + [6]: jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(GLDrawableFactoryImpl.java:188) + [7]: jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(GLDrawableFactoryImpl.java:217) + [8]: com.jogamp.opengl.GLDrawableFactory.createSharedResource(GLDrawableFactory.java:385) + [9]: com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1938) + [10]: com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1895) + [11]: com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1862) + [12]: com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) + [13]: com.jogamp.opengl.GLProfile$1.run(GLProfile.java:239) + [14]: java.base/java.security.AccessController.doPrivileged(Native Method) + [15]: com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:225) + [16]: Bug1398MainClass.(Bug1398MainClass.java:27) +MaxOSXCGLContext.NSOpenGLImpl.associateDrawable: false, ctx 0x7fc4c15ddea0, hasBackingLayerHost false, attachGLLayerCmd null +main: GLContext.makeCurrent: Surfaceless evaluate +main: GLContext.makeCurrent: Surfaceless OK - validated +MaxOSXCGLContext.NSOpenGLImpl.associateDrawable: true, ctx 0x7fc4c15ddea0, hasBackingLayerHost false, attachGLLayerCmd null +NS viewHandle.2: drawableHandle 0x0 -> nsViewHandle 0x0: isNSView false, isNSWindow false, isFBO false, isPBuffer false, isSurfaceless true, jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable, + MacOSXOnscreenCGLDrawable[Realized true, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + Handle 0x0, + Surface WrappedSurface[ displayHandle 0x0 +, surfaceHandle 0x0 +, size 64x64 +, UOB[ OWNS_SURFACE | OWNS_DEVICE | WINDOW_INVISIBLE | SURFACELESS ] +, MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]]] +, surfaceLock <27ce24aa, 481a996b>[count 1, qsz 0, owner
] +, GenericUpstreamSurfacelessHook[pixel 64x64] +, upstreamSurface false ]] +SharedDevice: MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] +SharedContext: MacOSXCGLContext [Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.4.23 [GL 2.1.0, vendor 14.4.23 (INTEL-14.4.23)], options 0x4003, this 0x4690b489, handle 0x7fc4c15ddea0, isShared false, jogamp.opengl.gl4.GL4bcImpl@2145b572, + quirks: [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync], + Drawable: MacOSXOnscreenCGLDrawable[Realized true, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + Handle 0x0, + Surface WrappedSurface[ displayHandle 0x0 +, surfaceHandle 0x0 +, size 64x64 +, UOB[ OWNS_SURFACE | OWNS_DEVICE | WINDOW_INVISIBLE | SURFACELESS ] +, MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]]] +, surfaceLock <27ce24aa, 481a996b>[count 1, qsz 0, owner
] +, GenericUpstreamSurfacelessHook[pixel 64x64] +, upstreamSurface false ]], mode NSOPENGL] , madeCurrent true + NPOT true, RECT true, FloatPixels true + allowsSurfacelessCtx true + glRendererQuirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +main: GLContextImpl.destroy.0: obj 0x4690b489, ctx 0x7fc4c15ddea0, isShared false, surf true 0x0, <39529185, 72f926e6>[count 1, qsz 0, owner
] +MaxOSXCGLContext.NSOpenGLImpl.associateDrawable: false, ctx 0x7fc4c15ddea0, hasBackingLayerHost false, attachGLLayerCmd null +main: GLContext.resetStates(isInit false) +main: GLContextImpl.destroy.X: obj 0x4690b489, ctx 0x0, isShared false, surf true 0x0, <39529185, 72f926e6>[count 0, qsz 0, owner ] +main: setRealized: drawable MacOSXOnscreenCGLDrawable, surface WrappedSurface, isProxySurface true: true -> false + [2]: jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:176) + [3]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:321) + [4]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:83) + [5]: jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(GLDrawableFactoryImpl.java:188) + [6]: jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(GLDrawableFactoryImpl.java:217) + [7]: com.jogamp.opengl.GLDrawableFactory.createSharedResource(GLDrawableFactory.java:385) + [8]: com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1938) + [9]: com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1895) + [10]: com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1862) + [11]: com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) + [12]: com.jogamp.opengl.GLProfile$1.run(GLProfile.java:239) + [13]: java.base/java.security.AccessController.doPrivileged(Native Method) + [14]: com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:225) + [15]: Bug1398MainClass.(Bug1398MainClass.java:27) +main: setRealized: drawable MacOSXOnscreenCGLDrawable, surface WrappedSurface, isProxySurface true: true -> false + [2]: jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:176) + [3]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:324) + [4]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:83) + [5]: jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(GLDrawableFactoryImpl.java:188) + [6]: jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(GLDrawableFactoryImpl.java:217) + [7]: com.jogamp.opengl.GLDrawableFactory.createSharedResource(GLDrawableFactory.java:385) + [8]: com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1938) + [9]: com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1895) + [10]: com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1862) + [11]: com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) + [12]: com.jogamp.opengl.GLProfile$1.run(GLProfile.java:239) + [13]: java.base/java.security.AccessController.doPrivileged(Native Method) + [14]: com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:225) + [15]: Bug1398MainClass.(Bug1398MainClass.java:27) +GLProfile.init map .macosx_decon_0, desktopCtxUndef false, esCtxUndef false +GLProfile.init map *** no mapping for GL4bc on device .macosx_decon_0 +GLProfile.init map *** no mapping for GL3bc on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2/GL2.hw] on device .macosx_decon_0 +GLProfile.init map defaultHW GLProfile[GL2/GL2.hw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL4/GL4.hw] on device .macosx_decon_0 +GLProfile.init map defaultAny GLProfile[GL4/GL4.hw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL3/GL4.hw] on device .macosx_decon_0 +GLProfile.init map *** no mapping for GLES3 on device .macosx_decon_0 +GLProfile.init map GLProfile[GL4ES3/GL4.hw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2GL3/GL4.hw] on device .macosx_decon_0 +GLProfile.init map *** no mapping for GLES2 on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2ES2/GL4.hw] on device .macosx_decon_0 +GLProfile.init map *** no mapping for GLES1 on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2ES1/GL2.hw] on device .macosx_decon_0 +GLProfile.initProfilesForDevice: MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]]: desktop Shared Ctx true, profiles: 8 +main: createContextARB-MapGLVersions SET .macosx_decon_0 +MapGLVersions .macosx_decon_0-0x2020000: 2.1 (Compat profile, arb, compat[], FBO, hardware) +MapGLVersions .macosx_decon_0-0x4040000: 4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) +MapGLVersions .macosx_decon_0-0x3040000: 4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) +GLProfile.initProfilesForDevice: .macosx_decon_0: added profile(s): desktop true, mobile false +GLProfile.initProfilesForDevice: .macosx_decon_0: Natives[GL4bc false, GL4 true [4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware)], GLES3 false, GL3bc false, GL3 true [4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware)], GL2 true [2.1 (Compat profile, arb, compat[], FBO, hardware)], GLES2 false, GLES1 false, count 3 / 8], Common[, GL4ES3 true, GL2GL3 true, GL2ES2 true, GL2ES1 true], Mappings[GL2ES1 GLProfile[GL2ES1/GL2.hw], GL4ES3 GLProfile[GL4ES3/GL4.hw], GL2ES2 GLProfile[GL2ES2/GL4.hw], GL2 GLProfile[GL2/GL2.hw], GL4 GLProfile[GL4/GL4.hw], GL3 GLProfile[GL3/GL4.hw], GL2GL3 GLProfile[GL2GL3/GL4.hw], , default GLProfile[GL2/GL2.hw], count 7 / 12] +GLProfile.dumpGLInfo: shared context n/a +MacOSXGraphicsDevice[type .macosx, connection decon]: + Natives + GL4bc false + GL4 true [4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware)] + GLES3 false + GL3bc false + GL3 true [4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware)] + GL2 true [2.1 (Compat profile, arb, compat[], FBO, hardware)] + GLES2 false + GLES1 false + Count 3 / 8 + Common + GL4ES3 true + GL2GL3 true + GL2ES2 true + GL2ES1 true + Mappings + GL2ES1 GLProfile[GL2ES1/GL2.hw] + GL4ES3 GLProfile[GL4ES3/GL4.hw] + GL2ES2 GLProfile[GL2ES2/GL4.hw] + GL2 GLProfile[GL2/GL2.hw] + GL4 GLProfile[GL4/GL4.hw] + GL3 GLProfile[GL3/GL4.hw] + GL2GL3 GLProfile[GL2GL3/GL4.hw] + default GLProfile[GL2/GL2.hw] + Count 7 / 12 + +GLProfile.init addedAnyProfile true (desktop: true, mobile false) +GLProfile.init isAWTAvailable true +GLProfile.init hasDesktopGLFactory true +GLProfile.init hasGL234Impl true +GLProfile.init hasMobileFactory false +GLProfile.init hasGLES1Impl false +GLProfile.init hasGLES3Impl false +GLProfile.init hasGL234OnEGLImpl false +GLProfile.init defaultDevice MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] +GLProfile.init defaultDevice Desktop MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] +GLProfile.init defaultDevice Mobile null +GLProfile.init profile order [GL4bc, GL3bc, GL2, GL4, GL3, GLES3, GL4ES3, GL2GL3, GLES2, GL2ES2, GLES1, GL2ES1] +GLProfiles on device MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] + Natives + GL4bc false + GL4 true [4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware)] + GLES3 false + GL3bc false + GL3 true [4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware)] + GL2 true [2.1 (Compat profile, arb, compat[], FBO, hardware)] + GLES2 false + GLES1 false + Count 3 / 8 + Common + GL4ES3 true + GL2GL3 true + GL2ES2 true + GL2ES1 true + Mappings + GL2ES1 GLProfile[GL2ES1/GL2.hw] + GL4ES3 GLProfile[GL4ES3/GL4.hw] + GL2ES2 GLProfile[GL2ES2/GL4.hw] + GL2 GLProfile[GL2/GL2.hw] + GL4 GLProfile[GL4/GL4.hw] + GL3 GLProfile[GL3/GL4.hw] + GL2GL3 GLProfile[GL2GL3/GL4.hw] + default GLProfile[GL2/GL2.hw] + Count 7 / 12 + + +Capabilities for MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] + none + + +Bug1398Launcher.c:100:launchJava(): launchJava.1.4 +Bug1398Launcher.c:105:launchJava(): launchJava.1.5 +Java version: null (null) +classloader:jdk.internal.loader.ClassLoaders$AppClassLoader@799f7e29 +OS: Mac OS X 10.15.3 x86_64 +w:1920 h:1080 rr:60 bits:32 dim.w:800 dim.h:600 +GLDrawableFactoryImpl.createGLDrawable -> OnscreenDrawable -> Offscreen-Layer +requestedCaps: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]] +chosenCaps: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[auto-cfg]] +chosenCapsMod: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] +OffscreenLayerSurface: **** JAWTWindow[0x68c72235][JVM version: 11.0.3 (11.0.3 update 0) +JAWT version: 0x80010004, CA_LAYER: true, isLayeredSurface true, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pixelScale 1.0x1.0, shallUseOffscreenLayer false, isOffscreenLayerSurface true, attachedSurfaceLayer 0x0, windowHandle 0x7fc4c3b4e690, surfaceHandle 0x7fc4c3b561c0, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], window [0/0 800x600], pixels[scale 1.0, 1.0 -> 800x600], visible true, lockedExt false, + config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]], + awtComponent AWT-GLCanvas[Realized false, + null-drawable, + Factory null, + handle 0x0, + Drawable size -1x-1 surface[800x600], + AWT[pos 0/0, size 800x600, + visible true, displayable true, showing false, + AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]]]], + surfaceLock <1eb5174b, 67080771>[count 1, qsz 0, owner
]] +forceOnscreenFBOLayer: **** false, fboTextureUnit 0 +Target: **** JAWTWindow[0x68c72235][JVM version: 11.0.3 (11.0.3 update 0) +JAWT version: 0x80010004, CA_LAYER: true, isLayeredSurface true, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pixelScale 1.0x1.0, shallUseOffscreenLayer false, isOffscreenLayerSurface true, attachedSurfaceLayer 0x0, windowHandle 0x7fc4c3b4e690, surfaceHandle 0x7fc4c3b561c0, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], window [0/0 800x600], pixels[scale 1.0, 1.0 -> 800x600], visible true, lockedExt false, + config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]], + awtComponent AWT-GLCanvas[Realized false, + null-drawable, + Factory null, + handle 0x0, + Drawable size -1x-1 surface[800x600], + AWT[pos 0/0, size 800x600, + visible true, displayable true, showing false, + AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]]]], + surfaceLock <1eb5174b, 67080771>[count 1, qsz 0, owner
]] + [2]: jogamp.opengl.GLDrawableFactoryImpl.createGLDrawable(GLDrawableFactoryImpl.java:351) + [3]: com.jogamp.opengl.awt.GLCanvas.createJAWTDrawableAndContext(GLCanvas.java:715) + [4]: com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:621) + [5]: java.desktop/java.awt.Container.addNotify(Container.java:2800) + [6]: java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4783) + [7]: java.desktop/java.awt.Container.addNotify(Container.java:2800) + [8]: java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4783) + [9]: java.desktop/java.awt.Container.addNotify(Container.java:2800) + [10]: java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4783) + [11]: java.desktop/java.awt.Container.addNotify(Container.java:2800) + [12]: java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4783) + [13]: java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:733) + [14]: java.desktop/java.awt.Container.addNotify(Container.java:2800) + [15]: java.desktop/java.awt.Window.addNotify(Window.java:786) + [16]: java.desktop/java.awt.Frame.addNotify(Frame.java:490) + [17]: java.desktop/java.awt.Window.pack(Window.java:824) + [18]: Bug1398MainClass.(Bug1398MainClass.java:59) +GLDrawableFactoryImpl.createGLDrawable: GLFBODrawableImpl[Initialized false, realized false, texUnit 0, samples 0, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + Handle 0x7fc4c3b561c0, + Caps GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + fboI back 0, front 0, num 0, + FBO front read 0, null, + FBO back write 0, null, + Surface JAWTWindow[0x68c72235][JVM version: 11.0.3 (11.0.3 update 0) +JAWT version: 0x80010004, CA_LAYER: true, isLayeredSurface true, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pixelScale 1.0x1.0, shallUseOffscreenLayer false, isOffscreenLayerSurface true, attachedSurfaceLayer 0x0, windowHandle 0x7fc4c3b4e690, surfaceHandle 0x7fc4c3b561c0, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], window [0/0 800x600], pixels[scale 1.0, 1.0 -> 800x600], visible true, lockedExt false, + config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]], + awtComponent AWT-GLCanvas[Realized false, + null-drawable, + Factory null, + handle 0x0, + Drawable size -1x-1 surface[800x600], + AWT[pos 0/0, size 800x600, + visible true, displayable true, showing false, + AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]]]], + surfaceLock <1eb5174b, 67080771>[count 1, qsz 0, owner
]]] +main: GLContext.resetStates(isInit true) +gc.bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080] +dim: java.awt.Dimension[width=1920,height=1080] +GLDrawableHelper.setExclusiveContextThread(): START switch nop, thread null -> null -- currentThread Thread[main-FPSAWTAnimator#00-Timer0,5,main] +GLDrawableHelper.setExclusiveContextThread(): END switch nop, thread null -- currentThread Thread[main-FPSAWTAnimator#00-Timer0,5,main] +AWT-EventQueue-0: setRealized: drawable GLFBODrawableImpl, surface MacOSXJAWTWindow, isProxySurface false: false -> true + [2]: jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:176) + [3]: com.jogamp.opengl.awt.GLCanvas.setRealizedImpl(GLCanvas.java:455) + [4]: com.jogamp.opengl.awt.GLCanvas.access$100(GLCanvas.java:167) + [5]: com.jogamp.opengl.awt.GLCanvas$3.run(GLCanvas.java:465) + [6]: java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303) + [7]: java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) + [8]: java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) + [9]: java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) + [10]: java.base/java.security.AccessController.doPrivileged(Native Method) + [11]: java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) + [12]: java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) + [13]: java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) + [14]: java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) + [15]: java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) + [16]: java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) + [17]: java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) + [18]: java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) +AWT-EventQueue-0: setRealized: drawable MacOSXOnscreenCGLDrawable, surface MacOSXJAWTWindow, isProxySurface false: false -> true + [2]: jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:176) + [3]: jogamp.opengl.GLFBODrawableImpl.setRealizedImpl(GLFBODrawableImpl.java:422) + [4]: jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:193) + [5]: com.jogamp.opengl.awt.GLCanvas.setRealizedImpl(GLCanvas.java:455) + [6]: com.jogamp.opengl.awt.GLCanvas.access$100(GLCanvas.java:167) + [7]: com.jogamp.opengl.awt.GLCanvas$3.run(GLCanvas.java:465) + [8]: java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303) + [9]: java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) + [10]: java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) + [11]: java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) + [12]: java.base/java.security.AccessController.doPrivileged(Native Method) + [13]: java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) + [14]: java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) + [15]: java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) + [16]: java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) + [17]: java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) + [18]: java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) + [19]: java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) + [20]: java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) +AWT-EventQueue-0: MacOSXCGLContext.createImpl: START GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], share 0x0 +AWT-EventQueue-0: Use ARB[avail[disabled false, quirk false] -> true]] +AWT-EventQueue-0: createContextARB-MapGLVersions is SET (decon): true +AWT-EventQueue-0: createContextARB-MapGLVersions requested GLProfile[GL2/GL2.hw] -> 2.0 (Compat profile, compat[], hardware) +AWT-EventQueue-0: createContextARB-MapGLVersions Mapped 2.1 (Compat profile, arb, compat[], FBO, hardware) +NS viewHandle.1: GLFBODrawableImpl drawable: isFBO true, isPBuffer false, isSurfaceless false, jogamp.opengl.GLFBODrawableImpl, + GLFBODrawableImpl[Initialized false, realized true, texUnit 0, samples 0, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + Handle 0x7fc4c3b561c0, + Caps GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + fboI back 0, front 0, num 0, + FBO front read 0, null, + FBO back write 0, null, + Surface JAWTWindow[0x68c72235][JVM version: 11.0.3 (11.0.3 update 0) +JAWT version: 0x80010004, CA_LAYER: true, isLayeredSurface true, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pixelScale 1.0x1.0, shallUseOffscreenLayer false, isOffscreenLayerSurface true, attachedSurfaceLayer 0x0, windowHandle 0x7fc4c3b4e690, surfaceHandle 0x7fc4c3b561c0, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], window [0/0 800x600], pixels[scale 1.0, 1.0 -> 800x600], visible true, lockedExt false, + config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]], + awtComponent AWT-GLCanvas[Realized true, + jogamp.opengl.GLFBODrawableImpl, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + handle 0x7fc4c3b561c0, + Drawable size 800x600 surface[800x600], + AWT[pos 0/0, size 800x600, + visible true, displayable true, showing true, + AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]]]], + surfaceLock <1eb5174b, 67080771>[count 1, qsz 0, owner ]]] +NS create OSX>=lion true, OSX>=mavericks true +NS create incompleteView: true +NS create backingLayerHost: JAWTWindow[0x68c72235][JVM version: 11.0.3 (11.0.3 update 0) +JAWT version: 0x80010004, CA_LAYER: true, isLayeredSurface true, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pixelScale 1.0x1.0, shallUseOffscreenLayer false, isOffscreenLayerSurface true, attachedSurfaceLayer 0x0, windowHandle 0x7fc4c3b4e690, surfaceHandle 0x7fc4c3b561c0, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], window [0/0 800x600], pixels[scale 1.0, 1.0 -> 800x600], visible true, lockedExt false, + config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]], + awtComponent AWT-GLCanvas[Realized true, + jogamp.opengl.GLFBODrawableImpl, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + handle 0x7fc4c3b561c0, + Drawable size 800x600 surface[800x600], + AWT[pos 0/0, size 800x600, + visible true, displayable true, showing true, + AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]]]], + surfaceLock <1eb5174b, 67080771>[count 1, qsz 0, owner ]] +NS create share: 0 +NS create drawable type: jogamp.opengl.GLFBODrawableImpl +NS create drawable handle: isPBuffer false, isFBO true, isSurfaceless false +NS create pixelFormat: 0x7fc4c3c33e00 +NS create chosenCaps: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] +NS create fixedCaps: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] +NS create drawable native-handle: 0x7fc4c3b561c0 +NS create drawable NSView-handle: 0x0 +NS create screen refresh-rate: 60 hz, 16666 micros +AWT-EventQueue-0: createContextARBImpl: OK 2.1 (Compat profile, arb, compat[], FBO, hardware) - @creation, share 0, direct true on OSX 10.15.3 +AWT-EventQueue-0: GLContext.setGLFuncAvail: glGetStringi 0x7fff3b6641a3 (opt), glGetString 0x7fff3b65fbc6, glGetIntegerv 0x7fff3b65fa20 +AWT-EventQueue-0: GLContext.setGLFuncAvail: Given MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] - requested 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.4.23, has Number(Str) 2.1.0 +AWT-EventQueue-0: GLContext.setGLFuncAvail: Pre version verification: requested 2.1 (Compat profile, arb, compat[], FBO, hardware), drawable.glp GLProfile[GL2/GL2.hw], strictMatch false, glVersionsMapping false, hasGLVersionByString 2.1.0 +AWT-EventQueue-0: GLContext.setGLFuncAvail: Version verification (String): String 2.1 INTEL-14.4.23, Number(Str) 2.1.0 +AWT-EventQueue-0: GLContext.setGLFuncAvail: Post version verification: requested 2.1 (Compat profile, arb, compat[], FBO, hardware) -> has 2.1 (Compat profile, arb, compat[], FBO, hardware), strictMatch false, versionValidated true, versionGL3IntOK false +Quirk: NoOffscreenBitmap: cause: OS MACOS +Quirk: NeedSharedObjectSync: cause: OS MACOS +Quirks local.0: [NoOffscreenBitmap, NeedSharedObjectSync] +Quirks local.X: [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +Quirks sticky on MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]]: [GL4NeedsGL3Request] +AWT-EventQueue-0: GLContext.setGLFuncAvail.0 validated FQN: .macosx_decon_0-0x2010003 - 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.4.23 +AWT-EventQueue-0: Initializing CGL extension address table: MacOSX-.macosx_decon_0 +AWT-EventQueue-0: GLContext CGL ProcAddressTable reusing key(MacOSX-.macosx_decon_0) -> 0x6f96c77 +AWT-EventQueue-0: GLContext GL ProcAddressTable reusing key(.macosx_decon_0-0x2010003 - 2.1 (Compat profile, arb, compat[], FBO, hardware)) -> 0x41e36e46: jogamp.opengl.gl4.GL4bcProcAddressTable -> jogamp.opengl.gl4.GL4bc +Info: setGL (OpenGL null): AWT-EventQueue-0, -> GL4bcImpl, jogamp.opengl.gl4.GL4bcImpl@7e96fe83 + [2]: jogamp.opengl.GLContextImpl.setGL(GLContextImpl.java:358) + [3]: jogamp.opengl.GLContextImpl.setGLFunctionAvailability(GLContextImpl.java:2125) + [4]: jogamp.opengl.GLContextImpl.createContextARB(GLContextImpl.java:993) + [5]: jogamp.opengl.macosx.cgl.MacOSXCGLContext.createImpl(MacOSXCGLContext.java:314) + [6]: jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:770) + [7]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:653) + [8]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:591) + [9]: jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1279) + [10]: jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147) + [11]: com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1436) + [12]: java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303) + [13]: java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) + [14]: java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) + [15]: java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) + [16]: java.base/java.security.AccessController.doPrivileged(Native Method) + [17]: java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) + [18]: java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) + [19]: java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) + [20]: java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) + [21]: java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) + [22]: java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) + [23]: java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) + [24]: java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) +AWT-EventQueue-0: GLContext GL ExtensionAvailabilityCache reusing key(.macosx_decon_0-0x2010003) -> 0x3d74bf60 - entries: 137 +AWT-EventQueue-0: GLContext.setGLFuncAvail.X: OK .macosx_decon_0-0x2010003 - 2.1 (Compat profile, arb, compat[], FBO, hardware) - glErr 0x0 +AWT-EventQueue-0: Create GL context OK: For jogamp.opengl.macosx.cgl.MacOSXCGLContext - 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.4.23 - obj 0x2a19d0ed, ctx 0x7fc4c151f940, isShared false, surf true 0x7fc4c3b561c0, <51920ca4, 6e080ee6>[count 1, qsz 0, owner ] +GLFBODrawableImpl.initialize(): samples 0 -> 0/8 +GLFBODrawableImpl.initialize(true): GLFBODrawableImpl[Initialized true, realized true, texUnit 0, samples 0, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + Handle 0x7fc4c3b561c0, + Caps GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + fboI back 0, front 1, num 2, + FBO front read 2, FBO[name r/w 2/2, init true, bound false, size 800x600, samples 0/8, modified true/true, depth RenderAttachment[type DEPTH, format 0x81a5, samples 0, 800x600, name 0x2, obj 0x50aeb3da], stencil null, colorbuffer attachments: 1/8, with 1 textures: [TextureAttachment[type COLOR_TEXTURE, target GL_TEXTURE_2D, level 0, format 0x8051, 800x600, border 0, dataFormat 0x1907, dataType 0x1401; min/mag 0x2600/0x2600, wrap S/T 0x812f/0x812f; name 0x2, obj 0x26ab1c69], null, null, null, null, null, null, null], msaa[null, hasSink false, dirty true], state OK, obj 0x2e18a5f2], + FBO back write 1, FBO[name r/w 1/1, init true, bound false, size 800x600, samples 0/8, modified true/true, depth RenderAttachment[type DEPTH, format 0x81a5, samples 0, 800x600, name 0x1, obj 0x5f3270b3], stencil null, colorbuffer attachments: 1/8, with 1 textures: [TextureAttachment[type COLOR_TEXTURE, target GL_TEXTURE_2D, level 0, format 0x8051, 800x600, border 0, dataFormat 0x1907, dataType 0x1401; min/mag 0x2600/0x2600, wrap S/T 0x812f/0x812f; name 0x1, obj 0x6e97e18a], null, null, null, null, null, null, null], msaa[null, hasSink false, dirty true], state OK, obj 0x7a2738ec], + Surface JAWTWindow[0x68c72235][JVM version: 11.0.3 (11.0.3 update 0) +JAWT version: 0x80010004, CA_LAYER: true, isLayeredSurface true, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pixelScale 1.0x1.0, shallUseOffscreenLayer false, isOffscreenLayerSurface true, attachedSurfaceLayer 0x0, windowHandle 0x7fc4c3b4e690, surfaceHandle 0x7fc4c3b561c0, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], window [0/0 800x600], pixels[scale 1.0, 1.0 -> 800x600], visible true, lockedExt false, + config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]], + awtComponent AWT-GLCanvas[Realized true, + jogamp.opengl.GLFBODrawableImpl, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + handle 0x7fc4c3b561c0, + Drawable size 800x600 surface[800x600], + AWT[pos 0/0, size 800x600, + visible true, displayable true, showing true, + AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 861422593, unitID 0, awtDevice sun.awt.CGraphicsDevice@10959ece, handle 0x0], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]], + CGLGraphicsConfig[dev=861422593,pixfmt=0], + encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]]]], + surfaceLock <1eb5174b, 67080771>[count 1, qsz 0, owner ]]] + [2]: jogamp.opengl.GLFBODrawableImpl.initialize(GLFBODrawableImpl.java:264) + [3]: jogamp.opengl.GLFBODrawableImpl.associateContext(GLFBODrawableImpl.java:435) + [4]: jogamp.opengl.GLContextImpl.associateDrawable(GLContextImpl.java:854) + [5]: jogamp.opengl.macosx.cgl.MacOSXCGLContext.associateDrawable(MacOSXCGLContext.java:418) + [6]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:717) + [7]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:591) + [8]: jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1279) + [9]: jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147) + [10]: com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1436) + [11]: java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303) + [12]: java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) + [13]: java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) + [14]: java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) + [15]: java.base/java.security.AccessController.doPrivileged(Native Method) + [16]: java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) + [17]: java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) + [18]: java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) + [19]: java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) + [20]: java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) + [21]: java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) + [22]: java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) + [23]: java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) +MaxOSXCGLContext.NSOpenGLImpl.associateDrawable: true, ctx 0x7fc4c151f940, hasBackingLayerHost true, attachGLLayerCmd null +MaxOSXCGLContext.NSOpenGLImpl.associateDrawable(true): AttachGLLayerCmd[valid false, size tex[800x600], win[800x600], ctx 0x7fc4c151f940, opaque true, texID 2, pbuffer 0x0, nsOpenGLLayer 0x0] +GLDrawableHelper GLAnimatorControl: com.jogamp.opengl.util.FPSAnimator[started true, animating true, paused false, drawable 1, totals[dt 0, frames 0, fps 0.0], modeBits 1, init'ed true, animThread Thread[main-FPSAWTAnimator#00-Timer0,5,main], exclCtxThread false(null)], GLEventListeners num 1 [RedSquareES2@6ff29830[init false], ].invokeGL(): Running initAction +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init: tileRendererInUse null on Thread[AWT-EventQueue-0,6,main] +----------------------------------------------------------------------------------------------------- +Platform: MACOS / Mac OS X 10.15.3 (10.15.3), x86_64 (X86_64, GENERIC_ABI), 4 cores, littleEndian true +MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment: + int8 1 / 1, int16 2 / 2 + int 4 / 4, long 8 / 8 + int32 4 / 4, int64 8 / 8 + float 4 / 4, double 8 / 8, ldouble 16 / 16 + pointer 8 / 8, page 4096 +Platform: Java Version: 11.0.3 (11.0.3u0), VM: OpenJDK 64-Bit Server VM, Runtime: OpenJDK Runtime Environment +Platform: Java Vendor: AdoptOpenJDK, https://adoptopenjdk.net/, JavaSE: true, Java9: true, Java6: true, dynamicLib: true, AWT enabled: true +----------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------- +Package: com.jogamp.opengl +Extension Name: com.jogamp.opengl +Specification Title: Java Bindings for OpenGL API Specification +Specification Vendor: JogAmp Community +Specification Version: 2.4 +Implementation Title: Java Bindings for OpenGL Runtime Environment +Implementation Vendor: JogAmp Community +Implementation Vendor ID: com.jogamp +Implementation URL: http://jogamp.org/ +Implementation Version: 2.4.0-rc-20200106 +Implementation Build: 2.4-bmanual-20200106 +Implementation Branch: master +Implementation Commit: 0209655c26e9240639c5f0a76ca6ca54ae0584b1 +Implementation SHA Sources: null +Implementation SHA Classes: null +Implementation SHA Classes-this: null +Implementation SHA Natives: null +Implementation SHA Natives-this: null +----------------------------------------------------------------------------------------------------- +Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] +INIT GL IS: jogamp.opengl.gl4.GL4bcImpl +Swap Interval 0 +GL Profile GLProfile[GL2/GL2.hw] +GL Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.4.23 [GL 2.1.0, vendor 14.4.23 (INTEL-14.4.23)] +Quirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] +Impl. class jogamp.opengl.gl4.GL4bcImpl +GL_VENDOR Intel Inc. +GL_RENDERER Intel Iris OpenGL Engine +GL_VERSION 2.1 INTEL-14.4.23 +GLSL true, has-compiler-func: true, version: 1.20 / 1.20.0 +GL FBO: basic true, full true +GL_EXTENSIONS 128 +GLX_EXTENSIONS 0 +----------------------------------------------------------------------------------------------------- +NSOpenGLLayer.Attach: Re-Queue, drawableHandle 0x7fc4c3b561c0 - AppKit Thread +NSOpenGLLayer.Attach: Re-Queue, drawableHandle 0x7fc4c3b561c0 - AppKit Thread +NSOpenGLLayer.Attach: Re-Queue, drawableHandle 0x7fc4c3b561c0 - AppKit Thread +ShaderState: attachShaderProgram: -1 -> 1 (enable: true) + null + ShaderProgram[id=1, linked=false, inUse=false, program: 1, + ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader: 2, source] + ShaderCode[id=2, type=FRAGMENT_SHADER, valid=true, shader: 3, source]] +NSOpenGLLayer.Attach: Re-Queue, drawableHandle 0x7fc4c3b561c0 - AppKit Thread +NSOpenGLLayer.Attach: Re-Queue, drawableHandle 0x7fc4c3b561c0 - AppKit Thread +NSOpenGLLayer.Attach: Re-Queue, drawableHandle 0x7fc4c3b561c0 - AppKit Thread +Thread[AWT-EventQueue-0,6,main] RedSquareES2.init FIN +NSOpenGLLayer.Attach: Re-Queue, drawableHandle 0x7fc4c3b561c0 - AppKit Thread +NSOpenGLLayer.Attach: Re-Queue, drawableHandle 0x7fc4c3b561c0 - AppKit Thread +CGL setSwapInterval: 1 +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape 0/0 800x600 of 800x600, swapInterval 1, drawable 0x7fc4c3b561c0, tileRendererInUse null +Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape FIN +NSOpenGLLayer.Attach: Re-Queue, drawableHandle 0x7fc4c3b561c0 - AppKit Thread +NSOpenGLLayer.Attach: Re-Queue, drawableHandle 0x7fc4c3b561c0 - AppKit Thread +NS setSwapInterval: 1 -> 17666 micros +CGL setSwapInterval: 1 +NSOpenGLLayer.Attach: OK, layer 0x7fc4c3b6c610 w/ pbuffer 0x0, texID 2, texSize 800x600, drawableHandle 0x7fc4c3b561c0 - AppKit Thread +2020-02-22 14:51:30.975 Bug1398LauncherSDK1011[2325:148219] startUpCompletionOperation main thread? ANS - YES +GLDrawableFactory.shutdownAll 2 instances, on thread NativeWindowFactory_ShutdownHook +GLDrawableFactory.shutdownAll[1/2]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory +DisplayGamma: Reset +MacOSXCGLDrawableFactory.shutdown +GLDrawableFactory.shutdownAll[2/2]: jogamp.opengl.egl.EGLDrawableFactory +DisplayGamma: Reset +EGLDrawableFactory.shutdown +EGLDisplayUtil.EGLDisplays: Shutdown (open: 0) +GLDrawableFactory.shutdownAll.X on thread NativeWindowFactory_ShutdownHook diff --git a/src/test-native/bug1398/log/run-bug1398-sdk1015.log b/src/test-native/bug1398/log/run-bug1398-sdk1015.log new file mode 100644 index 000000000..bd6bb506d --- /dev/null +++ b/src/test-native/bug1398/log/run-bug1398-sdk1015.log @@ -0,0 +1,187 @@ +Starting Bug1398Launcher: ./Bug1398LauncherSDK1015 +Bug1398Launcher.c:270:NSApplicationMain(): argv[2]: jvmlibjli /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib +Bug1398Launcher.c:257:NSApplicationMain(): argv[4]: classpath arg -Djava.class.path=.:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar +Bug1398Launcher.c:265:NSApplicationMain(): argv[6]: libpath arg -Djava.library.path=/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib +Bug1398Launcher.c:279:NSApplicationMain(): main.1 +Bug1398Launcher.c:282:NSApplicationMain(): main.1.1 +2020-02-22 14:51:32.100 Bug1398LauncherSDK1015[2328:148330] init +Bug1398Launcher.c:284:NSApplicationMain(): main.1.2 +Bug1398Launcher.c:286:NSApplicationMain(): main.1.3 +Bug1398Launcher.c:289:NSApplicationMain(): main.1.5 +Bug1398Launcher.c:186:create_jvm_thread(): create_jvm_thread.1.1 +Bug1398Launcher.c:194:create_jvm_thread(): create_jvm_thread.1.2 +Bug1398Launcher.c:198:create_jvm_thread(): create_jvm_thread.1.X +Bug1398Launcher.c:292:NSApplicationMain(): main.1.6 +Bug1398Launcher.c:61:launchJava(): launchJava.1.1 +Bug1398Launcher.c:78:launchJava(): launchJava.1.2 +Bug1398Launcher.c:79:launchJava(): .. using CLASSPATH -Djava.class.path=.:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar +Bug1398Launcher.c:80:launchJava(): .. using LIBPATH -Djava.library.path=/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib +Bug1398Launcher.c:39:create_vm(): Found libjli.dylib /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib +Bug1398Launcher.c:84:launchJava(): CreateVM:1038f1151 env:70000c891da8 vm_args:70000c891d68 +2020-02-22 14:51:32.165 Bug1398LauncherSDK1015[2328:148330] App starting... +Bug1398Launcher.c:90:launchJava(): VM Created +Bug1398Launcher.c:93:launchJava(): launchJava.1.3 +GLProfile.initSingleton() - thread main + [2]: com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:216) + [3]: Bug1398MainClass.(Bug1398MainClass.java:27) +GLProfile.init - thread: main +----------------------------------------------------------------------------------------------------- +Platform: MACOS / Mac OS X 10.15.3 (10.15.3), x86_64 (X86_64, GENERIC_ABI), 4 cores, littleEndian true +MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment: + int8 1 / 1, int16 2 / 2 + int 4 / 4, long 8 / 8 + int32 4 / 4, int64 8 / 8 + float 4 / 4, double 8 / 8, ldouble 16 / 16 + pointer 8 / 8, page 4096 +Platform: Java Version: 11.0.3 (11.0.3u0), VM: OpenJDK 64-Bit Server VM, Runtime: OpenJDK Runtime Environment +Platform: Java Vendor: AdoptOpenJDK, https://adoptopenjdk.net/, JavaSE: true, Java9: true, Java6: true, dynamicLib: true, AWT enabled: true +----------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------- +Package: com.jogamp.common +Extension Name: com.jogamp.common +Specification Title: GlueGen Java Bindings Generator +Specification Vendor: JogAmp Community +Specification Version: 2.4 +Implementation Title: GlueGen Run-Time +Implementation Vendor: JogAmp Community +Implementation Vendor ID: com.jogamp +Implementation URL: http://jogamp.org/ +Implementation Version: 2.4.0-rc-20200219 +Implementation Build: 2.4-bmanual-20200219 +Implementation Branch: master +Implementation Commit: 0b441cfc14947b1c8cabdc87705ae95a0afec4d9 +Implementation SHA Sources: 8d908b6f7f3983b3f1b8fe7dbbf4409635e0eddc4cc83fc0b3109dbd48c12b0a +Implementation SHA Classes: ed9b47cddf3dfd80b0f8f06472d115736bdc538f72e3ba6ac5a9246e72ab54f8 +Implementation SHA Classes-this: 2cf35278c9b3972ccb1ab6f94828bc55e8deea691814b8a6ff13a426f115354c +Implementation SHA Natives: e665dac3f562d9c94fa5e36e5a4e0b529ba2049ac0a4e24adc8b01bfa299ff34 +Implementation SHA Natives-this: 0 +----------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------- +Package: com.jogamp.nativewindow +Extension Name: com.jogamp.opengl +Specification Title: Java Bindings for OpenGL API Specification +Specification Vendor: JogAmp Community +Specification Version: 2.4 +Implementation Title: Java Bindings for OpenGL Runtime Environment +Implementation Vendor: JogAmp Community +Implementation Vendor ID: com.jogamp +Implementation URL: http://jogamp.org/ +Implementation Version: 2.4.0-rc-20200106 +Implementation Build: 2.4-bmanual-20200106 +Implementation Branch: master +Implementation Commit: 0209655c26e9240639c5f0a76ca6ca54ae0584b1 +Implementation SHA Sources: null +Implementation SHA Classes: null +Implementation SHA Classes-this: null +Implementation SHA Natives: null +Implementation SHA Natives-this: null +----------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------- +Package: com.jogamp.opengl +Extension Name: com.jogamp.opengl +Specification Title: Java Bindings for OpenGL API Specification +Specification Vendor: JogAmp Community +Specification Version: 2.4 +Implementation Title: Java Bindings for OpenGL Runtime Environment +Implementation Vendor: JogAmp Community +Implementation Vendor ID: com.jogamp +Implementation URL: http://jogamp.org/ +Implementation Version: 2.4.0-rc-20200106 +Implementation Build: 2.4-bmanual-20200106 +Implementation Branch: master +Implementation Commit: 0209655c26e9240639c5f0a76ca6ca54ae0584b1 +Implementation SHA Sources: null +Implementation SHA Classes: null +Implementation SHA Classes-this: null +Implementation SHA Natives: null +Implementation SHA Natives-this: null +----------------------------------------------------------------------------------------------------- +GLDrawableFactory.static - Native OS Factory for: .macosx: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory +Info: EGLDrawableFactory: EGL ES2 - NOPE +Info: EGLDrawableFactory: EGL ES1 - NOPE (ES1 lib) +Info: EGLDrawableFactory: EGL GLn - NOPE (GLn lib) +Info: GLProfile.init - Mobile GLDrawable factory not available +Info: GLProfile.init - Default device is desktop derived: MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] +Info: GLProfile.initProfilesForDevice: MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] (com.jogamp.nativewindow.macosx.MacOSXGraphicsDevice), isSet false, hasDesktopGLFactory true, hasEGLFactory false +GLProfile.init map .macosx_decon_0, desktopCtxUndef true, esCtxUndef true +GLProfile.init map GLProfile[GL4bc/GL4bc.sw] on device .macosx_decon_0 +GLProfile.init map defaultAny GLProfile[GL4bc/GL4bc.sw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL3bc/GL3bc.sw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2/GL2.sw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL4/GL4.sw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL3/GL3.sw] on device .macosx_decon_0 +GLProfile.init map *** no mapping for GLES3 on device .macosx_decon_0 +GLProfile.init map GLProfile[GL4ES3/GL4bc.sw] on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2GL3/GL2.sw] on device .macosx_decon_0 +GLProfile.init map *** no mapping for GLES2 on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2ES2/GL2.sw] on device .macosx_decon_0 +GLProfile.init map *** no mapping for GLES1 on device .macosx_decon_0 +GLProfile.init map GLProfile[GL2ES1/GL2.sw] on device .macosx_decon_0 +main: setRealized: drawable MacOSXOnscreenCGLDrawable, surface WrappedSurface, isProxySurface true: false -> true + [2]: jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:176) + [3]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:261) + [4]: jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(MacOSXCGLDrawableFactory.java:83) + [5]: jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(GLDrawableFactoryImpl.java:188) + [6]: jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(GLDrawableFactoryImpl.java:217) + [7]: com.jogamp.opengl.GLDrawableFactory.createSharedResource(GLDrawableFactory.java:385) + [8]: com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1938) + [9]: com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1895) + [10]: com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1862) + [11]: com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) + [12]: com.jogamp.opengl.GLProfile$1.run(GLProfile.java:239) + [13]: java.base/java.security.AccessController.doPrivileged(Native Method) + [14]: com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:225) + [15]: Bug1398MainClass.(Bug1398MainClass.java:27) +main: GLContext.resetStates(isInit true) +main: MacOSXCGLContext.createImpl: START GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]], share 0x0 +main: Use ARB[avail[disabled false, quirk false] -> true]] +main: createContextARB-MapGLVersions is SET (decon): false +main: createContextARB-MapGLVersions START (GLDesktop true, GLES false, minorVersion true) on MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]] +main: createContextARBVersions.1: share 0, direct true, version 3.3 [3.3 .. 3.1] +NS viewHandle.2: drawableHandle 0x7f8476595b50 -> nsViewHandle 0x7f8476595b50: isNSView true, isNSWindow false, isFBO false, isPBuffer false, isSurfaceless false, jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable, + MacOSXOnscreenCGLDrawable[Realized true, + Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1b1473ab, + Handle 0x7f8476595b50, + Surface WrappedSurface[ displayHandle 0x0 +, surfaceHandle 0x7f8476595b50 +, size 64x64 +, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ] +, MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7995092a]], idx 0], + chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]], + requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]]] +, surfaceLock <2f7c2f4f, 6af93788>[count 1, qsz 0, owner
] +, OSXDummyUpstreamSurfaceHook[pixel 64x64] +, upstreamSurface false ]] +NS create OSX>=lion true, OSX>=mavericks true +NS create incompleteView: true +NS create backingLayerHost: null +NS create share: 0 +NS create drawable type: jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable +NS create drawable handle: isPBuffer false, isFBO false, isSurfaceless false +NS create pixelFormat: 0x7f84764ccb20 +NS create chosenCaps: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]] +NS create fixedCaps: GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]] +NS create drawable native-handle: 0x7f8476595b50 +NS create drawable NSView-handle: 0x7f8476595b50 +NS create screen refresh-rate: 60 hz, 16666 micros +# +# A fatal error has been detected by the Java Runtime Environment: +# +# SIGILL (0x4) at pc=0x00007fff2efccacc, pid=2328, tid=15879 +# +# JRE version: OpenJDK Runtime Environment (11.0.3+7) (build 11.0.3+7) +# Java VM: OpenJDK 64-Bit Server VM (11.0.3+7, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64) +# Problematic frame: +# C [AppKit+0x3e4acc] -[NSOpenGLContext setView:]+0xe5 +# +# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again +# +# An error report file with more information is saved as: +# /usr/local/projects/JogAmp/jogl/src/test-native/bug1398/hs_err_pid2328.log +# +# If you would like to submit a bug report, please visit: +# https://github.com/AdoptOpenJDK/openjdk-build/issues +# The crash happened outside the Java Virtual Machine in native code. +# See problematic frame for where to report the bug. +# +run-bug1398.sh: line 26: 2328 Abort trap: 6 ./Bug1398LauncherSDK1015 -jvmlibjli $JVM_JLI_LIB -classpath ".:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar" -libpath "/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib" diff --git a/src/test-native/bug1398/make-bug1398.sh b/src/test-native/bug1398/make-bug1398.sh index 7ec9935d9..bf2367313 100755 --- a/src/test-native/bug1398/make-bug1398.sh +++ b/src/test-native/bug1398/make-bug1398.sh @@ -5,15 +5,25 @@ set -x JOGAMP_VERSION=v2.3.2 #JOGAMP_VERSION=v2.2.4 +unset SDKROOT + CLASSPATH=".:/Users/jogamp/projects/JogAmp/builds/$JOGAMP_VERSION/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/$JOGAMP_VERSION/jogamp-all-platforms/jar/jogl-all.jar" +#CLASSPATH=".:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar" + ok=0 -xcrun clang -x objective-c -framework Cocoa \ - -o Bug1398macOSContextOpsOnMainThread Bug1398macOSContextOpsOnMainThread.c \ +# Default macosx10.15 SDK on XCode 11 +xcrun --sdk macosx10.15 clang -x objective-c -framework Cocoa \ + -o Bug1398LauncherSDK1015 Bug1398Launcher.c \ + && ok=1 + +# Non-Default macosx10.11 SDK (JogAmp builds) +xcrun --sdk macosx10.11 clang -x objective-c -framework Cocoa \ + -o Bug1398LauncherSDK1011 Bug1398Launcher.c \ && ok=1 if [ $ok -eq 1 ] ; then - javac -source 1.8 -target 1.8 -classpath $CLASSPATH RedSquareES2.java Bug1398macOSContextOpsOnMainThread.java + javac -source 1.8 -target 1.8 -classpath $CLASSPATH RedSquareES2.java Bug1398MainClass.java fi diff --git a/src/test-native/bug1398/run-bug1398.sh b/src/test-native/bug1398/run-bug1398.sh index a014d13d2..8ee578a0e 100644 --- a/src/test-native/bug1398/run-bug1398.sh +++ b/src/test-native/bug1398/run-bug1398.sh @@ -1,20 +1,43 @@ #! /bin/bash -JVM_JLI_LIB=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib -# JVM_JLI_LIB=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib +# JVM_JLI_LIB=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib +# JVM_JLI_LIB=/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/MacOS/libjli.dylib +JVM_JLI_LIB=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib -JOGAMP_VERSION=v2.3.2 +#JOGAMP_VERSION=v2.3.2 #JOGAMP_VERSION=v2.2.4 +# This one is expected to work .. +function run_test_sdk1011() +{ if [ -z "$JOGAMP_VERSION" ] ; then - ./Bug1398macOSContextOpsOnMainThread -jvmlibjli $JVM_JLI_LIB \ + ./Bug1398LauncherSDK1011 -jvmlibjli $JVM_JLI_LIB \ + -classpath ".:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar" \ + -libpath "/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib" +else + ./Bug1398LauncherSDK1011 -jvmlibjli $JVM_JLI_LIB \ + -classpath ".:/Users/jogamp/projects/JogAmp/builds/$JOGAMP_VERSION/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar" \ + -libpath "/Users/jogamp/projects/JogAmp/builds/$JOGAMP_VERSION/jogamp-all-platforms/lib/macosx-universal" +fi +} + +# This one is expected to crash @ -[NSOpenGLContext setView:] +function run_test_sdk1015() +{ +if [ -z "$JOGAMP_VERSION" ] ; then + ./Bug1398LauncherSDK1015 -jvmlibjli $JVM_JLI_LIB \ -classpath ".:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar" \ -libpath "/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib" else - ./Bug1398macOSContextOpsOnMainThread -jvmlibjli $JVM_JLI_LIB \ + ./Bug1398LauncherSDK1015 -jvmlibjli $JVM_JLI_LIB \ -classpath ".:/Users/jogamp/projects/JogAmp/builds/$JOGAMP_VERSION/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar" \ -libpath "/Users/jogamp/projects/JogAmp/builds/$JOGAMP_VERSION/jogamp-all-platforms/lib/macosx-universal" fi +} + +run_test_sdk1011 2>&1 | tee run-bug1398-sdk1011.log + +run_test_sdk1015 2>&1 | tee run-bug1398-sdk1015.log diff --git a/src/test-native/bug1398/test1398-jogamp232_java08-01.log b/src/test-native/bug1398/test1398-jogamp232_java08-01.log deleted file mode 100644 index 2c1e108a2..000000000 --- a/src/test-native/bug1398/test1398-jogamp232_java08-01.log +++ /dev/null @@ -1,88 +0,0 @@ -Bug1398macOSContextOpsOnMainThread.c:266:NSApplicationMain(): argv[2]: jvmlibjli /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:253:NSApplicationMain(): argv[4]: classpath arg -Djava.class.path=.:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar -Bug1398macOSContextOpsOnMainThread.c:261:NSApplicationMain(): argv[6]: libpath arg -Djava.library.path=/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal -Bug1398macOSContextOpsOnMainThread.c:275:NSApplicationMain(): main.1 -Bug1398macOSContextOpsOnMainThread.c:278:NSApplicationMain(): main.1.1 -2020-02-21 19:13:41.768 Bug1398macOSContextOpsOnMainThread[1045:20769] init -Bug1398macOSContextOpsOnMainThread.c:280:NSApplicationMain(): main.1.2 -Bug1398macOSContextOpsOnMainThread.c:282:NSApplicationMain(): main.1.3 -Bug1398macOSContextOpsOnMainThread.c:285:NSApplicationMain(): main.1.5 -Bug1398macOSContextOpsOnMainThread.c:184:create_jvm_thread(): create_jvm_thread.1.1 -Bug1398macOSContextOpsOnMainThread.c:192:create_jvm_thread(): create_jvm_thread.1.2 -Bug1398macOSContextOpsOnMainThread.c:196:create_jvm_thread(): create_jvm_thread.1.X -Bug1398macOSContextOpsOnMainThread.c:288:NSApplicationMain(): main.1.6 -Bug1398macOSContextOpsOnMainThread.c:61:launchJava(): launchJava.1.1 -Bug1398macOSContextOpsOnMainThread.c:76:launchJava(): launchJava.1.2 -Bug1398macOSContextOpsOnMainThread.c:77:launchJava(): .. using CLASSPATH -Djava.class.path=.:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar -Bug1398macOSContextOpsOnMainThread.c:78:launchJava(): .. using LIBPATH -Djava.library.path=/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal -Bug1398macOSContextOpsOnMainThread.c:39:create_vm(): Found libjli.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:82:launchJava(): CreateVM:10884fb80 env:700006d99da8 vm_args:700006d99d68 -2020-02-21 19:13:41.829 Bug1398macOSContextOpsOnMainThread[1045:20769] App starting... -Bug1398macOSContextOpsOnMainThread.c:88:launchJava(): VM Created -Bug1398macOSContextOpsOnMainThread.c:91:launchJava(): launchJava.1.3 -2020-02-21 19:13:42.870 Bug1398macOSContextOpsOnMainThread[1045:20790] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from ( - 0 AppKit 0x00007fff2a3e0575 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 371 - 1 AppKit 0x00007fff2a3c7ed5 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416 - 2 AppKit 0x00007fff2a3c7947 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42 - 3 libnativewindow_macosx.jnilib 0x00000001229f53fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398 - 4 ??? 0x000000010ca4e667 0x0 + 4507100775 -) -Bug1398macOSContextOpsOnMainThread.c:98:launchJava(): launchJava.1.4 -Bug1398macOSContextOpsOnMainThread.c:103:launchJava(): launchJava.1.5 -Java version: 1.8 (1.8.0_192) -classloader:sun.misc.Launcher$AppClassLoader@764c12b6 -OS: Mac OS X 10.15.2 x86_64 -w:1920 h:1080 rr:60 bits:32 dim.w:800 dim.h:600 -gc.bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080] -dim: java.awt.Dimension[width=1920,height=1080] -Thread[AWT-EventQueue-0,6,main] RedSquareES2.init: tileRendererInUse null on Thread[AWT-EventQueue-0,6,main] ------------------------------------------------------------------------------------------------------ -Platform: MACOS / Mac OS X 10.15.2 (10.15.2), x86_64 (X86_64, GENERIC_ABI), 4 cores, littleEndian true -MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment: - int8 1 / 1, int16 2 / 2 - int 4 / 4, long 8 / 8 - int32 4 / 4, int64 8 / 8 - float 4 / 4, double 8 / 8, ldouble 16 / 16 - pointer 8 / 8, page 4096 -Platform: Java Version: 1.8.0_192 (1.8.0u192), VM: Java HotSpot(TM) 64-Bit Server VM, Runtime: Java(TM) SE Runtime Environment -Platform: Java Vendor: Oracle Corporation, http://java.oracle.com/, JavaSE: true, Java6: true, AWT enabled: true ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ -Package: com.jogamp.opengl -Extension Name: com.jogamp.opengl -Specification Title: Java Bindings for OpenGL API Specification -Specification Vendor: JogAmp Community -Specification Version: 2.3 -Implementation Title: Java Bindings for OpenGL Runtime Environment -Implementation Vendor: JogAmp Community -Implementation Vendor ID: com.jogamp -Implementation URL: http://jogamp.org/ -Implementation Version: 2.3.2 -Implementation Build: 2.3-b1469-20151010 -Implementation Branch: origin/master -Implementation Commit: e794fc40ba723f2fca4ac892e873975fb393e007 ------------------------------------------------------------------------------------------------------ -Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] -INIT GL IS: jogamp.opengl.gl4.GL4bcImpl -Swap Interval 0 -GL Profile GLProfile[GL2/GL2.hw] -GL Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.3.9 [GL 2.1.0, vendor 14.3.9 (INTEL-14.3.9)] -Quirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] -Impl. class jogamp.opengl.gl4.GL4bcImpl -GL_VENDOR Intel Inc. -GL_RENDERER Intel Iris OpenGL Engine -GL_VERSION 2.1 INTEL-14.3.9 -GLSL true, has-compiler-func: true, version: 1.20 / 1.20.0 -GL FBO: basic true, full true -GL_EXTENSIONS 128 -GLX_EXTENSIONS 0 ------------------------------------------------------------------------------------------------------ -ShaderState: attachShaderProgram: -1 -> 1 (enable: true) - null - ShaderProgram[id=1, linked=false, inUse=false, program: 1, - ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader: 2, source] - ShaderCode[id=2, type=FRAGMENT_SHADER, valid=true, shader: 3, source]] -Thread[AWT-EventQueue-0,6,main] RedSquareES2.init FIN -Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape 0/0 800x600 of 800x600, swapInterval 1, drawable 0x7fe933379570, tileRendererInUse null -Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape FIN -2020-02-21 19:13:44.831 Bug1398macOSContextOpsOnMainThread[1045:20769] startUpCompletionOperation main thread? ANS - YES diff --git a/src/test-native/bug1398/test1398-jogamp232_java11-01.log b/src/test-native/bug1398/test1398-jogamp232_java11-01.log deleted file mode 100644 index fd7144364..000000000 --- a/src/test-native/bug1398/test1398-jogamp232_java11-01.log +++ /dev/null @@ -1,93 +0,0 @@ -Bug1398macOSContextOpsOnMainThread.c:266:NSApplicationMain(): argv[2]: jvmlibjli /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:253:NSApplicationMain(): argv[4]: classpath arg -Djava.class.path=.:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar -Bug1398macOSContextOpsOnMainThread.c:261:NSApplicationMain(): argv[6]: libpath arg -Djava.library.path=/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal -Bug1398macOSContextOpsOnMainThread.c:275:NSApplicationMain(): main.1 -Bug1398macOSContextOpsOnMainThread.c:278:NSApplicationMain(): main.1.1 -2020-02-21 19:11:55.398 Bug1398macOSContextOpsOnMainThread[1030:20387] init -Bug1398macOSContextOpsOnMainThread.c:280:NSApplicationMain(): main.1.2 -Bug1398macOSContextOpsOnMainThread.c:282:NSApplicationMain(): main.1.3 -Bug1398macOSContextOpsOnMainThread.c:285:NSApplicationMain(): main.1.5 -Bug1398macOSContextOpsOnMainThread.c:184:create_jvm_thread(): create_jvm_thread.1.1 -Bug1398macOSContextOpsOnMainThread.c:192:create_jvm_thread(): create_jvm_thread.1.2 -Bug1398macOSContextOpsOnMainThread.c:196:create_jvm_thread(): create_jvm_thread.1.X -Bug1398macOSContextOpsOnMainThread.c:288:NSApplicationMain(): main.1.6 -Bug1398macOSContextOpsOnMainThread.c:61:launchJava(): launchJava.1.1 -Bug1398macOSContextOpsOnMainThread.c:76:launchJava(): launchJava.1.2 -Bug1398macOSContextOpsOnMainThread.c:77:launchJava(): .. using CLASSPATH -Djava.class.path=.:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/jogl-all.jar -Bug1398macOSContextOpsOnMainThread.c:78:launchJava(): .. using LIBPATH -Djava.library.path=/Users/jogamp/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/lib/macosx-universal -Bug1398macOSContextOpsOnMainThread.c:39:create_vm(): Found libjli.dylib /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:82:launchJava(): CreateVM:108243151 env:70000f0dcda8 vm_args:70000f0dcd68 -2020-02-21 19:11:55.459 Bug1398macOSContextOpsOnMainThread[1030:20387] App starting... -Bug1398macOSContextOpsOnMainThread.c:88:launchJava(): VM Created -Bug1398macOSContextOpsOnMainThread.c:91:launchJava(): launchJava.1.3 -WARNING: An illegal reflective access operation has occurred -WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/usr/local/projects/JogAmp/builds/v2.3.2/jogamp-all-platforms/jar/gluegen-rt.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String) -WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3 -WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations -WARNING: All illegal access operations will be denied in a future release -2020-02-21 19:11:56.559 Bug1398macOSContextOpsOnMainThread[1030:20412] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from ( - 0 AppKit 0x00007fff2a3e0575 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 371 - 1 AppKit 0x00007fff2a3c7ed5 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416 - 2 AppKit 0x00007fff2a3c7947 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42 - 3 libnativewindow_macosx.jnilib 0x000000010d2fa3fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398 - 4 ??? 0x0000000115b23950 0x0 + 4658968912 -) -Bug1398macOSContextOpsOnMainThread.c:98:launchJava(): launchJava.1.4 -Bug1398macOSContextOpsOnMainThread.c:103:launchJava(): launchJava.1.5 -Java version: null (null) -classloader:jdk.internal.loader.ClassLoaders$AppClassLoader@799f7e29 -OS: Mac OS X 10.15.2 x86_64 -w:1920 h:1080 rr:60 bits:32 dim.w:800 dim.h:600 -gc.bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080] -dim: java.awt.Dimension[width=1920,height=1080] -Thread[AWT-EventQueue-0,6,main] RedSquareES2.init: tileRendererInUse null on Thread[AWT-EventQueue-0,6,main] ------------------------------------------------------------------------------------------------------ -Platform: MACOS / Mac OS X 10.15.2 (10.15.2), x86_64 (X86_64, GENERIC_ABI), 4 cores, littleEndian true -MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment: - int8 1 / 1, int16 2 / 2 - int 4 / 4, long 8 / 8 - int32 4 / 4, int64 8 / 8 - float 4 / 4, double 8 / 8, ldouble 16 / 16 - pointer 8 / 8, page 4096 -Platform: Java Version: 11.0.3 (11.0.3u0), VM: OpenJDK 64-Bit Server VM, Runtime: OpenJDK Runtime Environment -Platform: Java Vendor: AdoptOpenJDK, https://adoptopenjdk.net/, JavaSE: true, Java6: true, AWT enabled: true ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ -Package: com.jogamp.opengl -Extension Name: com.jogamp.opengl -Specification Title: Java Bindings for OpenGL API Specification -Specification Vendor: JogAmp Community -Specification Version: 2.3 -Implementation Title: Java Bindings for OpenGL Runtime Environment -Implementation Vendor: JogAmp Community -Implementation Vendor ID: com.jogamp -Implementation URL: http://jogamp.org/ -Implementation Version: 2.3.2 -Implementation Build: 2.3-b1469-20151010 -Implementation Branch: origin/master -Implementation Commit: e794fc40ba723f2fca4ac892e873975fb393e007 ------------------------------------------------------------------------------------------------------ -Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] -INIT GL IS: jogamp.opengl.gl4.GL4bcImpl -Swap Interval 0 -GL Profile GLProfile[GL2/GL2.hw] -GL Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.3.9 [GL 2.1.0, vendor 14.3.9 (INTEL-14.3.9)] -Quirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] -Impl. class jogamp.opengl.gl4.GL4bcImpl -GL_VENDOR Intel Inc. -GL_RENDERER Intel Iris OpenGL Engine -GL_VERSION 2.1 INTEL-14.3.9 -GLSL true, has-compiler-func: true, version: 1.20 / 1.20.0 -GL FBO: basic true, full true -GL_EXTENSIONS 128 -GLX_EXTENSIONS 0 ------------------------------------------------------------------------------------------------------ -ShaderState: attachShaderProgram: -1 -> 1 (enable: true) - null - ShaderProgram[id=1, linked=false, inUse=false, program: 1, - ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader: 2, source] - ShaderCode[id=2, type=FRAGMENT_SHADER, valid=true, shader: 3, source]] -Thread[AWT-EventQueue-0,6,main] RedSquareES2.init FIN -Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape 0/0 800x600 of 800x600, swapInterval 1, drawable 0x7f8deb4bf3d0, tileRendererInUse null -Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape FIN -2020-02-21 19:11:58.466 Bug1398macOSContextOpsOnMainThread[1030:20387] startUpCompletionOperation main thread? ANS - YES diff --git a/src/test-native/bug1398/test1398-jogamp240rc_java08-01.log b/src/test-native/bug1398/test1398-jogamp240rc_java08-01.log deleted file mode 100644 index cf7b37789..000000000 --- a/src/test-native/bug1398/test1398-jogamp240rc_java08-01.log +++ /dev/null @@ -1,86 +0,0 @@ -Bug1398macOSContextOpsOnMainThread.c:266:NSApplicationMain(): argv[2]: jvmlibjli /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:253:NSApplicationMain(): argv[4]: classpath arg -Djava.class.path=.:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar -Bug1398macOSContextOpsOnMainThread.c:261:NSApplicationMain(): argv[6]: libpath arg -Djava.library.path=/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib -Bug1398macOSContextOpsOnMainThread.c:275:NSApplicationMain(): main.1 -Bug1398macOSContextOpsOnMainThread.c:278:NSApplicationMain(): main.1.1 -2020-02-21 19:14:37.376 Bug1398macOSContextOpsOnMainThread[1057:21063] init -Bug1398macOSContextOpsOnMainThread.c:280:NSApplicationMain(): main.1.2 -Bug1398macOSContextOpsOnMainThread.c:282:NSApplicationMain(): main.1.3 -Bug1398macOSContextOpsOnMainThread.c:285:NSApplicationMain(): main.1.5 -Bug1398macOSContextOpsOnMainThread.c:184:create_jvm_thread(): create_jvm_thread.1.1 -Bug1398macOSContextOpsOnMainThread.c:192:create_jvm_thread(): create_jvm_thread.1.2 -Bug1398macOSContextOpsOnMainThread.c:61:launchJava(): launchJava.1.1 -Bug1398macOSContextOpsOnMainThread.c:76:launchJava(): launchJava.1.2 -Bug1398macOSContextOpsOnMainThread.c:77:launchJava(): .. using CLASSPATH -Djava.class.path=.:/Users/jogamp/projects/JogAmp/gluegen/build/gluegen-rt.jar:/Users/jogamp/projects/JogAmp/jogl/build/jar/jogl-all.jar -Bug1398macOSContextOpsOnMainThread.c:78:launchJava(): .. using LIBPATH -Djava.library.path=/Users/jogamp/projects/JogAmp/gluegen/build/obj:/Users/jogamp/projects/JogAmp/jogl/build/lib -Bug1398macOSContextOpsOnMainThread.c:196:create_jvm_thread(): create_jvm_thread.1.X -Bug1398macOSContextOpsOnMainThread.c:288:NSApplicationMain(): main.1.6 -Bug1398macOSContextOpsOnMainThread.c:39:create_vm(): Found libjli.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/MacOS/libjli.dylib -Bug1398macOSContextOpsOnMainThread.c:82:launchJava(): CreateVM:110285b80 env:700003d1ada8 vm_args:700003d1ad68 -2020-02-21 19:14:37.439 Bug1398macOSContextOpsOnMainThread[1057:21063] App starting... -Bug1398macOSContextOpsOnMainThread.c:88:launchJava(): VM Created -Bug1398macOSContextOpsOnMainThread.c:91:launchJava(): launchJava.1.3 -Bug1398macOSContextOpsOnMainThread.c:98:launchJava(): launchJava.1.4 -Bug1398macOSContextOpsOnMainThread.c:103:launchJava(): launchJava.1.5 -Java version: 1.8 (1.8.0_192) -classloader:sun.misc.Launcher$AppClassLoader@764c12b6 -OS: Mac OS X 10.15.2 x86_64 -w:1920 h:1080 rr:60 bits:32 dim.w:800 dim.h:600 -gc.bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080] -dim: java.awt.Dimension[width=1920,height=1080] -Thread[AWT-EventQueue-0,6,main] RedSquareES2.init: tileRendererInUse null on Thread[AWT-EventQueue-0,6,main] ------------------------------------------------------------------------------------------------------ -Platform: MACOS / Mac OS X 10.15.2 (10.15.2), x86_64 (X86_64, GENERIC_ABI), 4 cores, littleEndian true -MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment: - int8 1 / 1, int16 2 / 2 - int 4 / 4, long 8 / 8 - int32 4 / 4, int64 8 / 8 - float 4 / 4, double 8 / 8, ldouble 16 / 16 - pointer 8 / 8, page 4096 -Platform: Java Version: 1.8.0_192 (1.8.0u192), VM: Java HotSpot(TM) 64-Bit Server VM, Runtime: Java(TM) SE Runtime Environment -Platform: Java Vendor: Oracle Corporation, http://java.oracle.com/, JavaSE: true, Java9: false, Java6: true, dynamicLib: true, AWT enabled: true ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ -Package: com.jogamp.opengl -Extension Name: com.jogamp.opengl -Specification Title: Java Bindings for OpenGL API Specification -Specification Vendor: JogAmp Community -Specification Version: 2.4 -Implementation Title: Java Bindings for OpenGL Runtime Environment -Implementation Vendor: JogAmp Community -Implementation Vendor ID: com.jogamp -Implementation URL: http://jogamp.org/ -Implementation Version: 2.4.0-rc-20200106 -Implementation Build: 2.4-bmanual-20200106 -Implementation Branch: master -Implementation Commit: 0209655c26e9240639c5f0a76ca6ca54ae0584b1 -Implementation SHA Sources: null -Implementation SHA Classes: null -Implementation SHA Classes-this: null -Implementation SHA Natives: null -Implementation SHA Natives-this: null ------------------------------------------------------------------------------------------------------ -Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]] -INIT GL IS: jogamp.opengl.gl4.GL4bcImpl -Swap Interval 0 -GL Profile GLProfile[GL2/GL2.hw] -GL Version 2.1 (Compat profile, arb, compat[], FBO, hardware) - 2.1 INTEL-14.3.9 [GL 2.1.0, vendor 14.3.9 (INTEL-14.3.9)] -Quirks [NoOffscreenBitmap, GL4NeedsGL3Request, NeedSharedObjectSync] -Impl. class jogamp.opengl.gl4.GL4bcImpl -GL_VENDOR Intel Inc. -GL_RENDERER Intel Iris OpenGL Engine -GL_VERSION 2.1 INTEL-14.3.9 -GLSL true, has-compiler-func: true, version: 1.20 / 1.20.0 -GL FBO: basic true, full true -GL_EXTENSIONS 128 -GLX_EXTENSIONS 0 ------------------------------------------------------------------------------------------------------ -ShaderState: attachShaderProgram: -1 -> 1 (enable: true) - null - ShaderProgram[id=1, linked=false, inUse=false, program: 1, - ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader: 2, source] - ShaderCode[id=2, type=FRAGMENT_SHADER, valid=true, shader: 3, source]] -Thread[AWT-EventQueue-0,6,main] RedSquareES2.init FIN -Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape 0/0 800x600 of 800x600, swapInterval 1, drawable 0x7ff875d200c0, tileRendererInUse null -Thread[AWT-EventQueue-0,6,main] RedSquareES2.reshape FIN -2020-02-21 19:14:40.445 Bug1398macOSContextOpsOnMainThread[1057:21063] startUpCompletionOperation main thread? ANS - YES -- cgit v1.2.3 From d1a4d790c89934616fa1883312b4064bda9fa420 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 24 Feb 2020 05:07:15 +0100 Subject: Bug 1398: MacOS: Perform [NSOpenGLContext setView:] on main-thread async w/o blocking Set NSOpenGLContext's NSView via [NSOpenGLContext setView:] on the main-thread as enforced since XCode 11 using SDL macosx10.15, using Runnable SetNSViewCmd. This operation must be performed async w/o blocking to allow other tasks locking the NativeSurface on main-thread to complete. Further, since [NSOpenGLContext setView:] acquired the CGLContext lock, it can't be locked until this task has been completed. Worst case scenario for a late [NSOpenGLContext setView:] issuance might be corrupt initial frame(s) displayed. Since all concurrent locking is performed within JOGL, the unlocked CGLContext window risk is only academic. However, if native 3rd party toolkits take share control, we might have a situation. +++ SetNSViewCmd is issued @ makeCurrent() now as opposed to createContext(..) and associateDrawable(true). The latter was actually late as well, as it also happened after makeCurrent when updating the drawable association. It also missed setting a null NSView when detached! release() will also set a null NSView if called after associateDrawable(false). SetNSViewCmd will only be issued if the NSView has been changed, i.e. first makeCurrent() or changing the drawable. If issued, makeCurrent() will not lock the underlying CGLContext and hence allow SetNSViewCmd to perform - see above. +++ NSViewDescriptor class structure replaces the less convenient method 'getNSViewHandle(..)', exposing all collected drawable characteristics as fields. NSViewDescriptor also respects a ProxySurface's OPT_UPSTREAM_SURFACELESS mode, which results in not using any underlying NSView - similar to OPT_UPSTREAM_WINDOW_INVISIBLE. This change ensures that all surfaceless GL operations will not use any NSView. --- make/config/jogl/cgl-macosx-CustomJavaCode.java | 20 ++ make/config/jogl/cgl-macosx.cfg | 1 + make/scripts/tests.sh | 10 +- make/stub_includes/opengl/macosx-window-system.h | 9 +- .../jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 311 ++++++++++++++------- .../native/macosx/MacOSXWindowSystemInterface.m | 53 ++-- src/test-native/bug1398/Bug1398Launcher.c | 7 +- 7 files changed, 270 insertions(+), 141 deletions(-) (limited to 'src/test-native/bug1398') diff --git a/make/config/jogl/cgl-macosx-CustomJavaCode.java b/make/config/jogl/cgl-macosx-CustomJavaCode.java index fc3ce1c57..2d9b1bd71 100644 --- a/make/config/jogl/cgl-macosx-CustomJavaCode.java +++ b/make/config/jogl/cgl-macosx-CustomJavaCode.java @@ -1,4 +1,24 @@ +/** + * Interface to C language function:
void setContextView(NSOpenGLContext * ctx, NSView * view) + *

+ * A GLException is thrown if this method has not been called from the NSApplication Main-Thread.
+ * Bug 1398: Such pre-emptive exception aligns behavior across all OSX variations, + * by complying to the newly enforced [NSOpenGLContext setView:] implementation + * which crashes with a SIGILL signal. + *

+ */ +public static void setContextView(long ctx, long nsView) { + if( 0 == ctx ) { + throw new IllegalArgumentException("given ctx is null"); + } + if( !OSXUtil.IsMainThread() ) { + throw new GLException("Not called from the NSApplication Main-Thread. Current Thread: "+Thread.currentThread()); + } + setContextViewImpl(ctx, nsView); +} + + /** * Creates the NSOpenGLLayer for FBO/PBuffer w/ optional GL3 shader program *

diff --git a/make/config/jogl/cgl-macosx.cfg b/make/config/jogl/cgl-macosx.cfg index df39bdaab..e97838aff 100644 --- a/make/config/jogl/cgl-macosx.cfg +++ b/make/config/jogl/cgl-macosx.cfg @@ -37,6 +37,7 @@ Opaque long NSOpenGLLayer * CustomCCode #include CustomCCode #include "macosx-window-system.h" +DelegateImplementation setContextView setContextViewImpl DelegateImplementation createNSOpenGLLayer createNSOpenGLLayerImpl DelegateImplementation setNSOpenGLLayerEnabled setNSOpenGLLayerEnabledImpl DelegateImplementation releaseNSOpenGLLayer releaseNSOpenGLLayerImpl diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 220662262..83553b564 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -111,6 +111,7 @@ function jrun() { #X_ARGS="--illegal-access=warn" #D_ARGS="-Djogl.debug.GLProfile -Djogl.debug.GLContext" + D_ARGS="-Djogl.debug.GLContext -Dnativewindow.debug.OSXUtil.MainThreadChecker" #D_ARGS="-Djogl.debug.GLProfile" #D_ARGS="-Djogl.debug.DebugGL" #D_ARGS="-Djogl.debug.TraceGL" @@ -156,7 +157,7 @@ function jrun() { #D_ARGS="-Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all" #D_ARGS="-Dnativewindow.debug.SWT" - D_ARGS="-Dnativewindow.debug.SWT -Dnewt.debug.Window -Djogl.debug.GLCanvas" + #D_ARGS="-Dnativewindow.debug.SWT -Dnewt.debug.Window -Djogl.debug.GLCanvas" #D_ARGS="-Dnativewindow.debug.SWT -Dnewt.debug.Window -Djogl.debug.GLCanvas -Dswt.autoScale=200" #export GDK_DPI_SCALE=2 #D_ARGS="-Dnativewindow.debug.SWT -Dnativewindow.debug.X11Util -Dnewt.debug.Window" @@ -488,7 +489,7 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2SimpleNEWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT $* -testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT $* +#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT $* #testswt com.jogamp.opengl.test.junit.jogl.swt.TestGLCanvasSWTNewtCanvasSWTPosInTabs $* #testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestRulerNEWT01 $* @@ -964,6 +965,11 @@ testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasA #testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug572AWT $* #testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $* #testawt com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersAWTCanvas $* +# +# OSX Bug 1398 +#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT1 $* +#testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT10 $* +testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $* # Linux DRM/GBM # diff --git a/make/stub_includes/opengl/macosx-window-system.h b/make/stub_includes/opengl/macosx-window-system.h index 96643fca3..d8147a000 100644 --- a/make/stub_includes/opengl/macosx-window-system.h +++ b/make/stub_includes/opengl/macosx-window-system.h @@ -30,12 +30,9 @@ NSOpenGLContext* getCurrentContext(void); CGLContextObj getCGLContext(NSOpenGLContext* ctx); NSView* getNSView(NSOpenGLContext* ctx); -NSOpenGLContext* createContext(NSOpenGLContext* shareContext, - NSView* nsView, - Bool incompleteView, - NSOpenGLPixelFormat* pixelFormat, - Bool opaque, - int* viewNotReady); +NSOpenGLContext* createContext(NSOpenGLContext* share, + NSOpenGLPixelFormat* fmt, + Bool opaque); void setContextView(NSOpenGLContext* ctx, NSView* view); void clearDrawable(NSOpenGLContext* ctx); Bool makeCurrentContext(NSOpenGLContext* ctx); diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index ce4f216cd..aeec04357 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -348,14 +348,17 @@ public class MacOSXCGLContext extends GLContextImpl lastWidth = -1; lastHeight = -1; if( isCreated() && drawable.getChosenGLCapabilities().isOnscreen() && isNSContext() ) { - final boolean incompleteView; + final boolean isSurfaceless, isIncompleteView; final NativeSurface surface = drawable.getNativeSurface(); if( surface instanceof ProxySurface ) { - incompleteView = ((ProxySurface)surface).containsUpstreamOptionBits( ProxySurface.OPT_UPSTREAM_WINDOW_INVISIBLE ); + final ProxySurface ps = (ProxySurface)surface; + isSurfaceless = ps.containsUpstreamOptionBits( ProxySurface.OPT_UPSTREAM_SURFACELESS ); + isIncompleteView = isSurfaceless || ps.containsUpstreamOptionBits( ProxySurface.OPT_UPSTREAM_WINDOW_INVISIBLE ); } else { - incompleteView = false; + isSurfaceless = false; + isIncompleteView = false; } - if(!incompleteView) { + if( !isIncompleteView ) { if( useAppKit ) { OSXUtil.RunOnMainThread(true, false, new Runnable() { @Override @@ -551,92 +554,111 @@ public class MacOSXCGLContext extends GLContextImpl return sb.toString(); } - // NSOpenGLContext-based implementation - class NSOpenGLImpl implements GLBackendImpl { - private OffscreenLayerSurface backingLayerHost = null; - /** lifecycle: [create - destroy] */ - private long pixelFormat = 0; - /** microSec - defaults to 1/60s */ - private int screenVSyncTimeout = 16666; - /** microSec - for nsOpenGLLayer mode - defaults to 1/60s + 1ms */ - private volatile int vsyncTimeout = 16666 + 1000; - private int lastWidth=0, lastHeight=0; // allowing to detect size change - private boolean needsSetContextPBuffer = false; - private ShaderProgram gl3ShaderProgram = null; - - @Override - public boolean isNSContext() { return true; } + static class NSViewDescriptor { + final boolean isSurfaceless; + final boolean isIncomplete; + final boolean isPBuffer; + final boolean isFBO; + /** Only returns a valid NSView. If !NSView, return null and mark either isPBuffer, isFBO or isSurfaceless. */ + final long nsViewHandle; - @Override - public boolean isUsingCALayer() { return null != backingLayerHost; } + NSViewDescriptor(final GLDrawableImpl drawable) { + final NativeSurface surface = drawable.getNativeSurface(); + if( surface instanceof ProxySurface ) { + final ProxySurface ps = (ProxySurface)surface; + isSurfaceless = ps.containsUpstreamOptionBits( ProxySurface.OPT_UPSTREAM_SURFACELESS ); + isIncomplete = isSurfaceless || ps.containsUpstreamOptionBits( ProxySurface.OPT_UPSTREAM_WINDOW_INVISIBLE ); + } else { + isSurfaceless = false; + isIncomplete = false; + } - /** Only returns a valid NSView. If !NSView, return null and mark either isPBuffer, isFBO or isSurfaceless. */ - private long getNSViewHandle(final boolean[] isPBuffer, final boolean[] isFBO, final boolean[] isSurfaceless) { - final long nsViewHandle; - if(drawable instanceof GLFBODrawableImpl) { + if( drawable instanceof GLFBODrawableImpl ) { nsViewHandle = 0; - isPBuffer[0] = false; - isFBO[0] = true; - isSurfaceless[0] = false; - if(DEBUG) { - System.err.println("NS viewHandle.1: GLFBODrawableImpl drawable: isFBO "+isFBO[0]+", isPBuffer "+isPBuffer[0]+", isSurfaceless "+isSurfaceless[0]+", "+drawable.getClass().getName()+",\n\t"+drawable); - } + isPBuffer = false; + isFBO = true; + } else if( isSurfaceless || isIncomplete ) { + nsViewHandle = 0; + isPBuffer = false; + isFBO = false; } else { final long drawableHandle = drawable.getHandle(); final boolean isNSView = OSXUtil.isNSView(drawableHandle); final boolean isNSWindow = OSXUtil.isNSWindow(drawableHandle); - isPBuffer[0] = CGL.isNSOpenGLPixelBuffer(drawableHandle); - isFBO[0] = false; - isSurfaceless[0] = false; + isPBuffer = CGL.isNSOpenGLPixelBuffer(drawableHandle); + isFBO = false; - if( isNSView ) { + if( isPBuffer ) { + nsViewHandle = 0; + } else if( isNSView ) { nsViewHandle = drawableHandle; } else if( isNSWindow ) { nsViewHandle = OSXUtil.GetNSView(drawableHandle); - } else if( isPBuffer[0] ) { - nsViewHandle = 0; - } else if( isSurfaceless() ) { - isSurfaceless[0] = true; - nsViewHandle = 0; } else { - throw new GLException("Drawable's handle neither NSView, NSWindow nor PBuffer: drawableHandle "+toHexString(drawableHandle)+", isNSView "+isNSView+", isNSWindow "+isNSWindow+", isFBO "+isFBO[0]+", isPBuffer "+isPBuffer[0]+", "+drawable.getClass().getName()+",\n\t"+drawable); - } - if(DEBUG) { - System.err.println("NS viewHandle.2: drawableHandle "+toHexString(drawableHandle)+" -> nsViewHandle "+toHexString(nsViewHandle)+": isNSView "+isNSView+", isNSWindow "+isNSWindow+", isFBO "+isFBO[0]+", isPBuffer "+isPBuffer[0]+", isSurfaceless "+isSurfaceless[0]+", "+drawable.getClass().getName()+",\n\t"+drawable); + throw new GLException("Drawable's handle neither NSView, NSWindow nor PBuffer: drawableHandle "+toHexString(drawableHandle)+", isNSView "+isNSView+", isNSWindow "+isNSWindow+", isFBO "+isFBO+", isPBuffer "+isPBuffer+", "+drawable.getClass().getName()+",\n\t"+drawable); } } - needsSetContextPBuffer = isPBuffer[0]; - return nsViewHandle; } + @Override + public String toString() { + return "NSViewDescr[nsViewHandle "+toHexString(nsViewHandle)+", isSurfaceless "+isSurfaceless+", isIncomplete "+isIncomplete+", isFBO "+isFBO+", isPBuffer "+isPBuffer+"]"; + } + } + + // NSOpenGLContext-based implementation + class NSOpenGLImpl implements GLBackendImpl { + private OffscreenLayerSurface backingLayerHost; + /** lifecycle: [create - destroy] */ + private long pixelFormat; + /** microSec - defaults to 1/60s */ + private int screenVSyncTimeout; + /** microSec - for nsOpenGLLayer mode - defaults to 1/60s + 1ms */ + private volatile int vsyncTimeout; + private int lastWidth, lastHeight; // allowing to detect size change + private boolean needsSetContextPBuffer; + private ShaderProgram gl3ShaderProgram; + private boolean drawableAssociated; + private AttachGLLayerCmd attachGLLayerCmd; + private NSViewDescriptor lastNSViewDescr; // Bug 1398 + private SetNSViewCmd lastSetNSViewCmd; // Bug 1398 + private boolean lockCGL; // Bug 1398 + + NSOpenGLImpl() { resetState(); } + + private void resetState() { + backingLayerHost = null; + pixelFormat = 0; + screenVSyncTimeout = 16666; + vsyncTimeout = 16666 + 1000; + lastWidth=0; lastHeight=0; + needsSetContextPBuffer = false; + gl3ShaderProgram = null; + drawableAssociated = false; + attachGLLayerCmd = null; + lastNSViewDescr = null; + lastSetNSViewCmd = null; + lockCGL = true; + } + + @Override + public boolean isNSContext() { return true; } + + @Override + public boolean isUsingCALayer() { return null != backingLayerHost; } + @Override public long create(final long share, final int ctp, final int major, final int minor) { long ctx = 0; final NativeSurface surface = drawable.getNativeSurface(); final MacOSXCGLGraphicsConfiguration config = (MacOSXCGLGraphicsConfiguration) surface.getGraphicsConfiguration(); final GLCapabilitiesImmutable chosenCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities(); - final long nsViewHandle; - final boolean isPBuffer; - final boolean isFBO; - final boolean isSurfaceless; - { - final boolean[] _isPBuffer = { false }; - final boolean[] _isFBO = { false }; - final boolean[] _isSurfaceless = { false }; - nsViewHandle = getNSViewHandle(_isPBuffer, _isFBO, _isSurfaceless); - isPBuffer = _isPBuffer[0]; - isFBO = _isFBO[0]; - isSurfaceless = _isSurfaceless[0]; - } final OffscreenLayerSurface backingLayerHost = NativeWindowFactory.getOffscreenLayerSurface(surface, true); - - boolean incompleteView = null != backingLayerHost; - if( !incompleteView && surface instanceof ProxySurface ) { - incompleteView = ((ProxySurface)surface).containsUpstreamOptionBits( ProxySurface.OPT_UPSTREAM_WINDOW_INVISIBLE ); - } + final NSViewDescriptor nsViewDescr = new NSViewDescriptor(drawable); + needsSetContextPBuffer = nsViewDescr.isPBuffer; { final GLCapabilitiesImmutable targetCaps; - if( isFBO ) { + if( nsViewDescr.isFBO ) { // Use minimum GLCapabilities for the target surface w/ same profile targetCaps = new GLCapabilities( chosenCaps.getGLProfile() ); } else { @@ -651,18 +673,18 @@ public class MacOSXCGLContext extends GLContextImpl return 0; } final GLCapabilitiesImmutable fixedCaps; - if( isFBO ) { + if( nsViewDescr.isFBO ) { // pixelformat of target doesn't affect caps w/ FBO fixedCaps = chosenCaps; } else { final GLCapabilities _fixedCaps = MacOSXCGLGraphicsConfiguration.NSPixelFormat2GLCapabilities(chosenCaps.getGLProfile(), pixelFormat); - if( !_fixedCaps.isPBuffer() && isPBuffer ) { + if( !_fixedCaps.isPBuffer() && nsViewDescr.isPBuffer ) { throw new InternalError("handle is PBuffer, fixedCaps not: "+drawable); } // determine on-/offscreen caps, since pformat is ambiguous - _fixedCaps.setPBuffer( isPBuffer ); // exclusive + _fixedCaps.setPBuffer( nsViewDescr.isPBuffer ); // exclusive _fixedCaps.setBitmap( false ); // n/a in our OSX impl. - _fixedCaps.setOnscreen( !isFBO && !isPBuffer && !isSurfaceless ); + _fixedCaps.setOnscreen( !nsViewDescr.isFBO && !nsViewDescr.isPBuffer && !nsViewDescr.isSurfaceless ); fixedCaps = GLGraphicsConfigurationUtil.fixOpaqueGLCapabilities(_fixedCaps, chosenCaps.isBackgroundOpaque()); } final int sRefreshRate = OSXUtil.GetScreenRefreshRate(drawable.getNativeSurface().getGraphicsConfiguration().getScreen().getIndex()); @@ -671,28 +693,25 @@ public class MacOSXCGLContext extends GLContextImpl } if(DEBUG) { System.err.println("NS create OSX>=lion "+isLionOrLater+", OSX>=mavericks "+isMavericksOrLater); - System.err.println("NS create incompleteView: "+incompleteView); + System.err.println("NS create drawable type: "+drawable.getClass().getName()); + System.err.println("NS create surface type: "+surface.getClass().getName()); + System.err.println("NS create drawable native-handle: "+toHexString(drawable.getHandle())); + System.err.println("NS create: "+nsViewDescr); System.err.println("NS create backingLayerHost: "+backingLayerHost); System.err.println("NS create share: "+share); - System.err.println("NS create drawable type: "+drawable.getClass().getName()); - System.err.println("NS create drawable handle: isPBuffer "+isPBuffer+", isFBO "+isFBO+", isSurfaceless "+isSurfaceless); System.err.println("NS create pixelFormat: "+toHexString(pixelFormat)); System.err.println("NS create chosenCaps: "+chosenCaps); System.err.println("NS create fixedCaps: "+fixedCaps); - System.err.println("NS create drawable native-handle: "+toHexString(drawable.getHandle())); - System.err.println("NS create drawable NSView-handle: "+toHexString(nsViewHandle)); System.err.println("NS create screen refresh-rate: "+sRefreshRate+" hz, "+screenVSyncTimeout+" micros"); // Thread.dumpStack(); } config.setChosenCapabilities(fixedCaps); - final IntBuffer viewNotReady = Buffers.newDirectIntBuffer(1); - // Try to allocate a context with this - ctx = CGL.createContext(share, nsViewHandle, incompleteView, - pixelFormat, chosenCaps.isBackgroundOpaque(), viewNotReady); + // Bug 1398: Associate NSView with NSOpenGLContext in makeCurrent + ctx = CGL.createContext(share, pixelFormat, chosenCaps.isBackgroundOpaque()); if (0 == ctx) { if(DEBUG) { - System.err.println("NS create failed: viewNotReady: "+ (1 == viewNotReady.get(0))); + System.err.println("NS createContext failed: share "+toHexString(share)+", pfmt "+toHexString(pixelFormat)+", opaque "+chosenCaps.isBackgroundOpaque()); } return 0; } @@ -710,6 +729,7 @@ public class MacOSXCGLContext extends GLContextImpl CGL.deletePixelFormat(pixelFormat); pixelFormat = 0; } + resetState(); return CGL.deleteContext(ctx, true); } @@ -739,7 +759,7 @@ public class MacOSXCGLContext extends GLContextImpl /** Synchronized by instance's monitor */ long nsOpenGLLayer; /** Synchronized by instance's monitor */ - boolean valid; + boolean done; AttachGLLayerCmd(final OffscreenLayerSurface ols, final long ctx, final int shaderProgram, final long pfmt, final long pbuffer, final int texID, final boolean isOpaque, final int texWidth, final int texHeight, final int winWidth, final int winHeight) { @@ -754,12 +774,12 @@ public class MacOSXCGLContext extends GLContextImpl this.texHeight = texHeight; this.winWidth = winWidth; this.winHeight = winHeight; - this.valid = false; + this.done = false; this.nsOpenGLLayer = 0; } public final String contentToString() { - return "valid "+valid+", size tex["+texWidth+"x"+texHeight+"], win["+winWidth+"x"+winHeight+"], ctx "+toHexString(ctx)+", opaque "+isOpaque+", texID "+texID+", pbuffer "+toHexString(pbuffer)+", nsOpenGLLayer "+toHexString(nsOpenGLLayer); + return "done "+done+", size tex["+texWidth+"x"+texHeight+"], win["+winWidth+"x"+winHeight+"], ctx "+toHexString(ctx)+", opaque "+isOpaque+", texID "+texID+", pbuffer "+toHexString(pbuffer)+", nsOpenGLLayer "+toHexString(nsOpenGLLayer); } @Override @@ -770,7 +790,7 @@ public class MacOSXCGLContext extends GLContextImpl @Override public void run() { synchronized(this) { - if( !valid ) { + if( !done ) { try { final int maxwait = screenVSyncTimeout/2000; // TO 1/2 of current screen-vsync in [ms] final RecursiveLock surfaceLock = ols.getLock(); @@ -784,7 +804,7 @@ public class MacOSXCGLContext extends GLContextImpl final int currentInterval = MacOSXCGLContext.this.getSwapInterval(); final int interval = 0 <= currentInterval ? currentInterval : 1; setSwapIntervalImpl(nsOpenGLLayer, interval); // enabled per default in layered surface - valid = true; + done = true; if (DEBUG) { System.err.println("NSOpenGLLayer.Attach: OK, layer "+toHexString(nsOpenGLLayer)+" w/ pbuffer "+toHexString(pbuffer)+", texID "+texID+", texSize "+lastWidth+"x"+lastHeight+", drawableHandle "+toHexString(drawable.getHandle())+" - "+getThreadName()); } @@ -799,7 +819,7 @@ public class MacOSXCGLContext extends GLContextImpl } catch (final InterruptedException e) { e.printStackTrace(); } - if( !valid ) { + if( !done ) { // could not acquire lock, re-queue if (DEBUG) { System.err.println("NSOpenGLLayer.Attach: Re-Queue, drawableHandle "+toHexString(drawable.getHandle())+" - "+getThreadName()); @@ -807,10 +827,10 @@ public class MacOSXCGLContext extends GLContextImpl OSXUtil.RunLater(true /* onMain */, this, 1); } } + this.notifyAll(); } } } - AttachGLLayerCmd attachGLLayerCmd = null; class DetachGLLayerCmd implements Runnable { final AttachGLLayerCmd cmd; @@ -827,7 +847,7 @@ public class MacOSXCGLContext extends GLContextImpl @Override public void run() { synchronized( cmd ) { - if( cmd.valid ) { + if( cmd.done ) { // still having a valid OLS attached to surface (parent OLS could have been removed) try { final OffscreenLayerSurface ols = cmd.ols; @@ -844,10 +864,11 @@ public class MacOSXCGLContext extends GLContextImpl System.err.println("NSOpenGLLayer.Detach: OK, layer "+toHexString(cmd.nsOpenGLLayer)+" - "+getThreadName()); } cmd.nsOpenGLLayer = 0; - cmd.valid = false; + cmd.done = false; } else if(DEBUG) { System.err.println("NSOpenGLLayer.Detach: Skipped "+toHexString(cmd.nsOpenGLLayer)+" - "+getThreadName()); } + cmd.notifyAll(); } } } @@ -863,6 +884,7 @@ public class MacOSXCGLContext extends GLContextImpl } if( bound ) { + drawableAssociated = true; if( null != backingLayerHost ) { final GLCapabilitiesImmutable chosenCaps; final long ctx; @@ -915,18 +937,15 @@ public class MacOSXCGLContext extends GLContextImpl backingLayerHost, ctx, gl3ShaderProgramName, pixelFormat, pbufferHandle, texID, chosenCaps.isBackgroundOpaque(), lastWidth, lastHeight, winSize[0], winSize[1] ); if(DEBUG) { - System.err.println("MaxOSXCGLContext.NSOpenGLImpl.associateDrawable(true): "+attachGLLayerCmd); + System.err.println("MaxOSXCGLContext.NSOpenGLImpl.associateDrawable(true).calayer: "+attachGLLayerCmd); } OSXUtil.RunOnMainThread(false, false /* kickNSApp */, attachGLLayerCmd); } else { // -> null == backingLayerHost lastWidth = drawable.getSurfaceWidth(); lastHeight = drawable.getSurfaceHeight(); - final boolean[] isPBuffer = { false }; - final boolean[] isFBO = { false }; - final boolean[] isSurfaceless = { false }; - CGL.setContextView(contextHandle, getNSViewHandle(isPBuffer, isFBO, isSurfaceless)); } } else { // -> !bound + drawableAssociated = false; if( null != backingLayerHost ) { final AttachGLLayerCmd cmd = attachGLLayerCmd; attachGLLayerCmd = null; @@ -937,13 +956,13 @@ public class MacOSXCGLContext extends GLContextImpl CGL.setContextPBuffer(contextHandle, 0); } synchronized(cmd) { - if( !cmd.valid ) { - cmd.valid = true; // skip pending creation + if( !cmd.done ) { + cmd.done = true; // skip pending creation } else { // 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+" - "+Thread.currentThread().getName()); + System.err.println("MaxOSXCGLContext.NSOpenGLImpl.associateDrawable(false).calayer: "+dCmd+" - "+Thread.currentThread().getName()); } OSXUtil.RunOnMainThread(false, true /* kickNSApp */, dCmd); if( null != gl3ShaderProgram ) { @@ -993,11 +1012,37 @@ public class MacOSXCGLContext extends GLContextImpl @Override public boolean makeCurrent(final long ctx) { + // Bug 1398: Perform SetNSViewCmd's on Main-Thread async w/o blocking. + // - Only issue SetNSViewCmd if changed (boolean nsViewChanged). + // - Avoid CGLLockContext until async SetNSViewCmd is done (boolean lockCGL). + // - See api-doc in SetNSViewCmd + // + final NSViewDescriptor nsViewDescr = new NSViewDescriptor(drawable); + needsSetContextPBuffer = nsViewDescr.isPBuffer; + final boolean nsViewChanged = null == lastNSViewDescr || + lastNSViewDescr.nsViewHandle != nsViewDescr.nsViewHandle; + lastNSViewDescr = nsViewDescr; + if( nsViewChanged ) { + final SetNSViewCmd cmd = new SetNSViewCmd(ctx, nsViewDescr); + lastSetNSViewCmd = cmd; + OSXUtil.RunOnMainThread(false /* wait */, false /* kickNSApp */, cmd); + } + if( null != lastSetNSViewCmd ) { + synchronized( lastSetNSViewCmd ) { + lockCGL = lastSetNSViewCmd.done; + if( lockCGL ) { + lastSetNSViewCmd = null; // no more required + } + } + } else { + lockCGL = true; + } + final long cglCtx = CGL.getCGLContext(ctx); if(0 == cglCtx) { throw new InternalError("Null CGLContext for: "+this); } - final int err = CGL.CGLLockContext(cglCtx); + final int err = lockCGL ? CGL.CGLLockContext(cglCtx) : CGL.kCGLNoError; if(CGL.kCGLNoError == err) { validatePBufferConfig(ctx); // required to handle pbuffer change ASAP return CGL.makeCurrentContext(ctx); @@ -1024,10 +1069,20 @@ public class MacOSXCGLContext extends GLContextImpl if(0 == cglCtx) { throw new InternalError("Null CGLContext for: "+this); } - final int err = CGL.CGLUnlockContext(cglCtx); + final int err = lockCGL ? CGL.CGLUnlockContext(cglCtx) : CGL.kCGLNoError; + lockCGL = true; if(DEBUG && CGL.kCGLNoError != err) { System.err.println("CGL: Could not unlock context: err 0x"+Integer.toHexString(err)+": "+this); } + if( !drawableAssociated ) { + lastNSViewDescr = null; + lastSetNSViewCmd = null; + OSXUtil.RunOnMainThread(true /* wait */, true /* kickNSApp */, new Runnable() { + @Override + public void run() { + CGL.setContextView(ctx, 0); + } } ); + } return res && CGL.kCGLNoError == err; } @@ -1043,7 +1098,7 @@ public class MacOSXCGLContext extends GLContextImpl final AttachGLLayerCmd cmd = attachGLLayerCmd; if(null != cmd) { synchronized(cmd) { - if( cmd.valid && 0 != cmd.nsOpenGLLayer) { + if( cmd.done && 0 != cmd.nsOpenGLLayer) { setSwapIntervalImpl(cmd.nsOpenGLLayer, interval); return true; } @@ -1082,7 +1137,7 @@ public class MacOSXCGLContext extends GLContextImpl final AttachGLLayerCmd cmd = attachGLLayerCmd; if(null != cmd) { synchronized(cmd) { - if( cmd.valid && 0 != cmd.nsOpenGLLayer) { + if( cmd.done && 0 != cmd.nsOpenGLLayer) { if( validateDrawableSizeConfig(contextHandle) ) { // skip wait-for-vsync for a few frames if size has changed, // allowing to update the texture IDs ASAP. @@ -1169,6 +1224,62 @@ public class MacOSXCGLContext extends GLContextImpl return CGL.flushBuffer(contextHandle); } + /** + * Set NSOpenGLContext's NSView via [NSOpenGLContext setView:] + * on the main-thread as enforced since XCode 11 using SDL macosx10.15, + * see Bug 1398. + *

+ * This operation must be performed async w/o blocking to allow + * other tasks locking the NativeSurface on main-thread to complete. + *

+ *

+ * Further, since [NSOpenGLContext setView:] acquired the CGLContext lock, + * it can't be locked until this task has been completed. + *

+ *

+ * Worst case scenario for a late [NSOpenGLContext setView:] issuance + * might be corrupt initial frame(s) displayed. + *

+ *

+ * Since all concurrent locking is performed within JOGL, + * the unlocked CGLContext window risk is only academic. + * However, if native 3rd party toolkits take share control, + * we might have a situation. + *

+ */ + class SetNSViewCmd implements Runnable { + final long ctx; + final NSViewDescriptor nsViewDescr; + boolean done; + + SetNSViewCmd(final long ctx, final NSViewDescriptor nsViewDescr) { + this.ctx = ctx; + this.nsViewDescr = nsViewDescr; + this.done = false; + } + + @Override + public final String toString() { + return "SetNSViewCmd[ctx "+toHexString(ctx)+", drawable "+toHexString(drawable.hashCode())+", "+nsViewDescr+"]"; + } + + @Override + public void run() { + synchronized(this) { + try { + CGL.setContextView(ctx, nsViewDescr.nsViewHandle); + if (DEBUG) { + System.err.println("SetNSViewCmd: OK, drawable "+toHexString(drawable.hashCode())+", "+nsViewDescr+" - "+getThreadName()); + } + } catch (final Throwable t) { + System.err.println("Caught exception on thread "+getThreadName()); + t.printStackTrace(); + } + done = true; + this.notifyAll(); + } + } + } } class CGLImpl implements GLBackendImpl { diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m index 462b5393d..16b85974e 100644 --- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m +++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m @@ -524,42 +524,20 @@ static Bool lockViewIfReady(NSView *view) { } NSOpenGLContext* createContext(NSOpenGLContext* share, - NSView* view, - Bool incompleteView, NSOpenGLPixelFormat* fmt, - Bool opaque, - int* viewNotReady) + Bool opaque) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; getRendererInfo(); - DBG_PRINT("createContext.0: share %p, view %p, incompleteView %d, pixfmt %p, opaque %d\n", - share, view, (int)incompleteView, fmt, opaque); - - Bool viewReadyAndLocked = incompleteView ? false : lockViewIfReady(view); - - if (nil != viewNotReady) { - *viewNotReady = 1; - } - - if (nil != view && !incompleteView && !viewReadyAndLocked) { - DBG_PRINT("createContext.X: Assumed complete view not ready yet\n"); - [pool release]; - return NULL; - } + DBG_PRINT("createContext.0: share %p, pixfmt %p, opaque %d\n", share, fmt, opaque); NSOpenGLContext* ctx = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:share]; - if ( nil != ctx && nil != view ) { - if(!opaque) { - GLint zeroOpacity = 0; - [ctx setValues:&zeroOpacity forParameter:NSOpenGLCPSurfaceOpacity]; - } - [ctx setView:view]; // Bug 1087: Set default framebuffer, hence enforce NSView realization - if( viewReadyAndLocked ) { - [view unlockFocus]; - } + if ( nil != ctx && !opaque ) { + GLint zeroOpacity = 0; + [ctx setValues:&zeroOpacity forParameter:NSOpenGLCPSurfaceOpacity]; } DBG_PRINT("createContext.X: ctx: %p\n", ctx); @@ -567,19 +545,34 @@ NSOpenGLContext* createContext(NSOpenGLContext* share, return ctx; } +// #define NSOPENGLCONTEXT_LOCK_NSVIEW 1 + void setContextView(NSOpenGLContext* ctx, NSView* view) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + BOOL isMainThread = [NSThread isMainThread]; + DBG_PRINT("setContextView.0: ctx %p, view %p, isMainThread %d\n", ctx, view, isMainThread); +#ifdef NSOPENGLCONTEXT_LOCK_NSVIEW if ( nil != ctx ) { if ( nil != view ) { Bool viewReadyAndLocked = lockViewIfReady(view); - DBG_PRINT("setContextView.0: ctx %p, view %p: setView: %d\n", ctx, view, viewReadyAndLocked); + DBG_PRINT("setContextView.1a: ctx %p, view %p: viewReadyAndLocked: %d\n", ctx, view, viewReadyAndLocked); + [ctx setView:view]; // Bug 1087: Set default framebuffer, hence enforce NSView realization if( viewReadyAndLocked ) { - [ctx setView:view]; + // [ctx setView:view]; [view unlockFocus]; } + } else { + DBG_PRINT("setContextView.1b: ctx %p, view %p\n", ctx, view); + [ctx setView:view]; } - DBG_PRINT("setContextView.X\n"); } +#else + if ( nil != ctx ) { + DBG_PRINT("setContextView.1c: ctx %p, view %p\n", ctx, view); + [ctx setView:view]; + } +#endif + DBG_PRINT("setContextView.X: ctx %p, view %p\n", ctx, view); [pool release]; } diff --git a/src/test-native/bug1398/Bug1398Launcher.c b/src/test-native/bug1398/Bug1398Launcher.c index ee5407eff..d62762b5d 100644 --- a/src/test-native/bug1398/Bug1398Launcher.c +++ b/src/test-native/bug1398/Bug1398Launcher.c @@ -59,7 +59,7 @@ static void *launchJava(void *unused) JavaVMInitArgs vm_args; TRACE("launchJava.1.1%s", ""); - vm_args.nOptions = 9; + vm_args.nOptions = 10; JavaVMOption options[vm_args.nOptions]; options[0].optionString = classpath_arg; options[1].optionString = libpath_arg; @@ -68,8 +68,9 @@ static void *launchJava(void *unused) options[4].optionString = "-DNjogamp.debug.JNILibLoader=true"; options[5].optionString = "-DNnativewindow.debug=all"; options[6].optionString = "-Djogl.debug.GLContext"; - options[7].optionString = "-Djogl.debug.GLDrawable"; - options[8].optionString = "-Djogl.debug.GLProfile"; + options[7].optionString = "-DNjogl.debug.GLDrawable"; + options[8].optionString = "-DNjogl.debug.GLProfile"; + options[9].optionString = "-Dnativewindow.debug.OSXUtil.MainThreadChecker"; vm_args.version = JNI_VERSION_1_4; vm_args.options = options; -- cgit v1.2.3