<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>467</bug_id>
          
          <creation_ts>2011-02-08 22:42:42 +0100</creation_ts>
          <short_desc>invokeAndWait exception exclusive to MacOS and Safari browser</short_desc>
          <delta_ts>2011-11-18 08:24:48 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>applet</component>
          <version>2</version>
          <rep_platform>All</rep_platform>
          <op_sys>macosx</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vincent Ly">vsector</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>cdefranoux</cc>
    
    <cc>wwalker3</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs></cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>821</commentid>
    <comment_count>0</comment_count>
    <who name="Vincent Ly">vsector</who>
    <bug_when>2011-02-08 22:42:42 +0100</bug_when>
    <thetext>Starting the applet results in an invokeAndWait exception in any browser operating on the MacOS and any OS running the Safari browser.

Steps to reproduce:
-Using macOS, go to http://jogamp.org/jogl-demos/www/applettest.html
-Using Safari, go to http://jogamp.org/jogl-demos/www/applettest.html

Actual Results:
Application hangs on the Starting Applet JOGL Applet Test loading screen.

Expected Results:
Application should display spinning gears.

Build Date and Platform:
8 February 2010 - Mac OS X 10.6.6 and Safari on Windows Vista

Additional:
Does not occur on Linux or Vista with Firefox or Chrome.  Does occur with Safari with Vista.  Does occur with Firefox on Mac OS X 10.6.6.

Report:

JNLPAppletLauncher: static initializer
GearsApplet: init() - begin
Exception in thread &quot;AWT-EventQueue-3&quot; java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1017)
	at com.jogamp.nativewindow.impl.jawt.JAWTUtil.&lt;clinit&gt;(JAWTUtil.java:121)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.jogamp.common.util.ReflectionUtil.callMethod(ReflectionUtil.java:267)
	at javax.media.nativewindow.NativeWindowFactory.initSingleton(NativeWindowFactory.java:199)
	at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1090)
	at javax.media.opengl.GLProfile.access$000(GLProfile.java:66)
	at javax.media.opengl.GLProfile$1.run(GLProfile.java:111)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:109)
	at demos.applets.GearsApplet.init(GearsApplet.java:19)
	at org.jdesktop.applet.util.JNLPAppletLauncher.startSubApplet(JNLPAppletLauncher.java:1987)
	at org.jdesktop.applet.util.JNLPAppletLauncher.access$200(JNLPAppletLauncher.java:661)
	at org.jdesktop.applet.util.JNLPAppletLauncher$5.run(JNLPAppletLauncher.java:1324)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
GearsApplet: stop() - begin
java.lang.NullPointerException
	at demos.applets.GearsApplet.stop(GearsApplet.java:38)
	at org.jdesktop.applet.util.JNLPAppletLauncher.stop(JNLPAppletLauncher.java:930)
	at sun.applet.AppletPanel.run(AppletPanel.java:525)
	at java.lang.Thread.run(Thread.java:680)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>896</commentid>
    <comment_count>1</comment_count>
    <who name="Wade Walker">wwalker3</who>
    <bug_when>2011-03-16 03:55:43 +0100</bug_when>
    <thetext>This works for me on OS X 10.6.6, Java 1.6.0_24-b07-334, Safari 5.0.4 (6533.20.27), NVIDIA GeForce 320M. Could you tell us your versions of the above?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>981</commentid>
    <comment_count>2</comment_count>
    <who name="Cyrille">cdefranoux</who>
    <bug_when>2011-05-17 14:07:25 +0200</bug_when>
    <thetext>I notice a similar stacktrace with 2.0-b11-20101213-windows-i586 (commit e735c312c874ae6abc401b4765b24a83f5238a99) when I create a GLCanvas on Swing&apos;s event dispatching thread (by calling SwingUtilities.invokeAndWait()).
This is consistent with the fact that stacktrace&apos;s top is java.awt.EventQueue.invokeAndWait that does clearly not support being called from Swing&apos;s EDT.

I upgraded Jogl to signed rc2 (commit bcf5d6ac871a29398b441df617923d3dd2cf35c1) and I got rid of that fatal error when creating my GLCanvas on EDT. I still notice a weird NullPointerException exception being thrown with the following stacktrace:
Thread [AWT-EventQueue-0] (Suspended (exception NullPointerException))	
	JAWTUtil$1.run() line: 105	
	AccessController.doPrivileged(PrivilegedAction&lt;T&gt;) line: not available [native method]	
	JAWTUtil.&lt;clinit&gt;() line: 100	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available	
	Method.invoke(Object, Object...) line: not available	
	ReflectionUtil.callMethod(Object, Method, Object[]) line: 266	
	NativeWindowFactory.initSingleton(boolean) line: 203	
	GLProfile.initProfilesForDefaultDevices(boolean) line: 1164	
	GLProfile.access$000(boolean) line: 71	
	GLProfile$1.run() line: 117	
	AccessController.doPrivileged(PrivilegedAction&lt;T&gt;) line: not available [native method]	
	GLProfile.initSingleton(boolean) line: 115	
	GLProfile.validateInitialization() line: 1428	
	GLProfile.getProfileMap(AbstractGraphicsDevice) line: 1580	
	GLProfile.get(AbstractGraphicsDevice, String[]) line: 642	
	GLProfile.get(String[]) line: 657	
	GLProfile.getMaxFixedFunc() line: 547	
	GLCanvas.&lt;clinit&gt;() line: 498


This null pointer exception is not fatal but it may not be a wanted behaviour, though.
BTW, I&apos;m wondering whether creating a GLCanvas from EDT is a supported feature. Never read anything that disproves this assumption but...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1183</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2011-11-18 08:24:48 +0100</bug_when>
    <thetext>at the time of writing, we had no OS X browser / applet support, which is comming up w/ RC4.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>