[SOLVED] Attempt to make the same context current twice on thread Thread[AWT

couldnt find a thread with this problem, also didnt know, if posting this to “Experiences of migrating from JOGL 1.1.1 to JSR231”, so i startet a new thread.

i have the problem mentioned in the subject.

config:

  • jogl-jsr231-1.0.0 from september
  • mac os x 10.4.8
  • intel core duo mac
  • Java HotSpot™ Client VM (build 1.5.0_06-61, mixed mode, sharing)

i tried it with my own program, ported from jogl-1.1.1 and also with the gears demo from the jogl-demos package (also jsr231-1.0.0)


006-10-16 15:28:22.810 java[2305] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0x11b03, name = 'java.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2006-10-16 15:28:22.811 java[2305] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (java.ServiceProvider)
Exception in thread "Thread-2" javax.media.opengl.GLException: java.lang.UnsatisfiedLinkError: JAWT_GetAWT0
	at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271)
	at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:256)
	at javax.media.opengl.GLCanvas.display(GLCanvas.java:130)
	at com.sun.opengl.util.Animator.display(Animator.java:144)
	at com.sun.opengl.util.Animator$MainLoop.run(Animator.java:181)
	at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.UnsatisfiedLinkError: JAWT_GetAWT0
	at com.sun.opengl.impl.JAWTFactory.JAWT_GetAWT0(Native Method)
	at com.sun.opengl.impl.JAWTFactory.JAWT_GetAWT(JAWTFactory.java:38)
	at com.sun.opengl.impl.JAWT$1.run(JAWT.java:99)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.opengl.impl.JAWT.getJAWT(JAWT.java:95)
	at com.sun.opengl.impl.macosx.MacOSXOnscreenGLDrawable.lockSurface(MacOSXOnscreenGLDrawable.java:141)
	at com.sun.opengl.impl.macosx.MacOSXOnscreenGLContext.makeCurrentImpl(MacOSXOnscreenGLContext.java:57)
	at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:127)
	at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
	at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:298)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Attempt to make the same context current twice on thread Thread[AWT-EventQueue-0,6,main]
	at com.sun.opengl.impl.GLContextLock.lock(GLContextLock.java:83)
	at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:124)
	at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
	at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:258)
	at javax.media.opengl.GLCanvas.display(GLCanvas.java:130)
	at javax.media.opengl.GLCanvas.paint(GLCanvas.java:142)
	at sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
	at sun.awt.RepaintArea.paint(RepaintArea.java:241)
	at apple.awt.ComponentModel.handleEvent(ComponentModel.java:251)
	at java.awt.Component.dispatchEventImpl(Component.java:4097)
	at java.awt.Component.dispatchEvent(Component.java:3869)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

regards,
funsheep

it was my fault. im using my own LibraryLoader, and didnt load the “jogl_awt”-library before the “jogl”-library, so one loadCall fixed the problem.