cannot run it on Mac OS X 10.6.6

245 views
Skip to first unread message

freebear

unread,
Mar 18, 2011, 7:31:06 AM3/18/11
to Jzy3d
Hi everybody,

I have checked out the code from SVN and was trying to run some of the
demos. I tried a few (Histogram, AnimatedSurfaceDemo, ...) and I
always get an empty window and the following exception:

java.lang.Exception: Previously locked by Thread[main,5,main], lock:
com.jogamp.nativewindow.impl.RecursiveToolkitLock@421fbfd6
at
com.jogamp.nativewindow.impl.RecursiveToolkitLock.lock(RecursiveToolkitLock.java:
112)
at
com.jogamp.nativewindow.impl.jawt.JAWTWindow.lockSurface(JAWTWindow.java:
109)
at
com.jogamp.opengl.impl.GLDrawableImpl.lockSurface(GLDrawableImpl.java:
173)
at
com.jogamp.opengl.impl.GLDrawableImpl.setRealized(GLDrawableImpl.java:
137)
at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:436)
at java.awt.Container.addNotify(Container.java:2622)
at java.awt.Window.addNotify(Window.java:663)
at java.awt.Frame.addNotify(Frame.java:470)
at java.awt.Window.pack(Window.java:704)
at org.jzy3d.bridge.awt.FrameAWT.<init>(FrameAWT.java:15)
at org.jzy3d.ui.Plugs.frame(Plugs.java:25)
at org.jzy3d.ui.ChartLauncher.openChart(ChartLauncher.java:85)
at org.jzy3d.ui.ChartLauncher.openChart(ChartLauncher.java:36)
at org.jzy3d.ui.ChartLauncher.openChart(ChartLauncher.java:33)
at org.jzy3d.demos.Launcher.openDemo(Launcher.java:108)
at org.jzy3d.demos.Launcher.openDemo(Launcher.java:100)
at
org.jzy3d.demos.animation.AnimatedSurfaceDemo.main(AnimatedSurfaceDemo.java:
34)
Exception in thread "main-Animator-1" javax.media.opengl.GLException:
java.lang.RuntimeException: Waited 5000ms for: Thread[main,5,main] -
Thread[AWT-EventQueue-0,6,main], with recursionCount 0, lock:
com.jogamp.nativewindow.impl.RecursiveToolkitLock@421fbfd6
at
com.jogamp.opengl.impl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:
101)
at
com.jogamp.opengl.impl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:
192)
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:
164)
at
javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:
594)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:302)
at com.jogamp.opengl.util.AnimatorImpl.display(AnimatorImpl.java:51)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:98)
at com.jogamp.opengl.util.Animator$MainLoop.run(Animator.java:158)
at java.lang.Thread.run(Thread.java:680)


As said in the subject I'm working on a OS X and I'm using the libs
that are provided in the lib folder of the svn trunck checkout.

I think it would help to have some kind of dependency management
system for the project just to know which libraries are needed and how
they fit with each other. "Mavenizing" the project would be great! I
would be willing to help if you want but I first need to get it
running!

Any suggestion to what I should look for to fix my problem?
Thanks in advance,

Bernard



Nils Hoffmann

unread,
Mar 18, 2011, 10:33:22 AM3/18/11
to jz...@googlegroups.com
Hi Bernard!
Am 18.03.11 12:31, schrieb freebear:

> Hi everybody,
>
> I have checked out the code from SVN and was trying to run some of the
> demos. I tried a few (Histogram, AnimatedSurfaceDemo, ...) and I
> always get an empty window and the following exception:
>
If you checked out from trunk/ you have Jzy3d with JOGL2 dependencies,
this might be problematic,
since Apple ships their JDK with JOGL1 preinstalled. I had numerous
issues with that
using Netbeans JOGL Plugin. It all works fine against the 0.8.3 branch
built against JOGL1.
BTW, which IDE are you using? For eclipse, there is an FAQ entry for
setup of JOGL1 (http://code.google.com/p/jzy3d/wiki/FAQ),
but it also applies to JOGL2, you just need to download the libraries
from here instead:
http://jogamp.org/deployment/webstart/archive/jogl-2.0-b23-20110303-macosx-universal.7z
And set everything up according to the FAQ entry.

I hope this helps. If not, please report back ;-)

Nils

freebear

unread,
Mar 18, 2011, 2:57:26 PM3/18/11
to Jzy3d
Hi Nils,

Thanks a lot for your quick reply!
I'm working with intelliJ, I'm developing on a Mac but I need to
deploy to various platforms (Linux, OS X & Windows) through JNLP.
I want to do some 3D visualization for scientific data, so far I was
using jMonkeyengine (a game engine) and it worked well even though
it's not its first intent. I stumbled upon Jzy3d Yesterday evening and
I felt it perfectly matches my needs (based on the screenshots) so I
was thinking of getting involved in the project. But like for jMonkey,
it's pretty complicated to get things working because of all the
dependencies that are not well documented. I have encountered all
possible cryptic exceptions and finding the source code of certain
classes seems also difficult.
Anyway thanks for your suggestions, I will look at them later on and
let you know once I get it to work.

cheers,

-b



On Mar 18, 3:33 pm, Nils Hoffmann <nils.hoffm...@web.de> wrote:
> Hi Bernard!
> Am 18.03.11 12:31, schrieb freebear:> Hi everybody,
>
> > I have checked out the code from SVN and was trying to run some of the
> > demos. I tried a few (Histogram, AnimatedSurfaceDemo, ...) and I
> > always get an empty window and the following exception:
>
> If you checked out from trunk/ you have Jzy3d with JOGL2 dependencies,
> this might be problematic,
> since Apple ships their JDK with JOGL1 preinstalled. I had numerous
> issues with that
> using Netbeans JOGL Plugin. It all works fine against the 0.8.3 branch
> built against JOGL1.
> BTW, which IDE are you using? For eclipse, there is an FAQ entry for
> setup of JOGL1 (http://code.google.com/p/jzy3d/wiki/FAQ),
> but it also applies to JOGL2, you just need to download the libraries
> from here instead:http://jogamp.org/deployment/webstart/archive/jogl-2.0-b23-20110303-m...

Martin Pernollet

unread,
Mar 18, 2011, 3:57:46 PM3/18/11
to jzy3d, freebear


2011/3/18 freebear <bernard....@gmail.com>

 But like for jMonkey,
it's pretty complicated to get things working because of all the
dependencies that are not well documented.

Hi Bernard,
Jzy3d 0.8.x (and earlier) use JOGL 1. Jzy3d 0.9 use JOGL2. The 0.9 version is not completely ported and validated because there still are few little bugs with JOGL2 (for swing only, not for awt/swt).
Maybe the download list is a mess and should be simplified with packages gathering binaries + jars for each platform? Would that help?
 
I have encountered all
possible cryptic exceptions and finding the source code of certain
classes seems also difficult.

Which classes? All the sources are available:
- in the precompiled jars
- online, through the google code browser
- offline if you check out the trunk

let us know what should be improved to have a better experience with jzy3d!

By the way, I spent little time trying to build JNLP & applets with JOGL2 and did not find it was straightforward. If you can have a simple ant file working, let us know!

Cheers,
Martin

freebear

unread,
Mar 29, 2011, 5:21:17 AM3/29/11
to Jzy3d
Hi Martin,

First of all sorry for not having replied earlier and thanks a lot for
your answers!
I have been away for a couple of days and busy with other things, now
I'm back on working with jzy3d.
So I have started again from the beginning, downloading the eclipse
demo project (org.jzy3d-0.8.2-demo-eclipse-project.zip).
I have linked the mac os native libraries with -
Djava.library.path=/.....
I have used -verbose:class in the java call to see which libraries are
loaded, it's taking those from the lib folder and not from Extensions,
so that seems to be fine.

I tried to run some demos and I always get the following exception:

Exception in thread "main" javax.media.opengl.GLException:
java.lang.ExceptionInInitializerError
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:
271)
at
javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:
299)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:133)
at
org.jzy3d.plot3d.rendering.canvas.CanvasAWT.screenshot(CanvasAWT.java:
85)
at org.jzy3d.chart.Chart.screenshot(Chart.java:109)
at org.jzy3d.ui.ChartLauncher.screenshot(ChartLauncher.java:139)
at org.jzy3d.demos.Launcher.openDemo(Launcher.java:114)
at org.jzy3d.demos.Launcher.openDemo(Launcher.java:104)
at org.jzy3d.demos.Launcher.openDemo(Launcher.java:100)
at org.jzy3d.demos.scatter.Scatter4D.main(Scatter4D.java:19)
Caused by: java.lang.ExceptionInInitializerError
at com.sun.opengl.impl.JAWT.size(JAWT.java:17)
at com.sun.opengl.impl.JAWT.create(JAWT.java:25)
at com.sun.opengl.impl.JAWT$1.run(JAWT.java:97)
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:
144)
at
com.sun.opengl.impl.macosx.MacOSXOnscreenGLContext.makeCurrentImpl(MacOSXOnscreenGLContext.java:
57)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:
134)
at
com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:
182)
at javax.media.opengl.GLCanvas
$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:341)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:678)
at java.awt.EventQueue.access$000(EventQueue.java:86)
at java.awt.EventQueue$1.run(EventQueue.java:639)
at java.awt.EventQueue$1.run(EventQueue.java:637)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext
$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:648)
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)
Caused by: java.lang.RuntimeException: Please port CPU detection
(32/64 bit) to your platform (mac os x/x86_64)
at com.sun.gluegen.runtime.CPU.<clinit>(CPU.java:72)
... 24 more
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:
131)
at
com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:
182)
at
javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:
301)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:133)
at javax.media.opengl.GLCanvas.paint(GLCanvas.java:166)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
at sun.awt.RepaintArea.paint(RepaintArea.java:241)
at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)
at java.awt.Component.dispatchEventImpl(Component.java:4812)
at java.awt.Component.dispatchEvent(Component.java:4566)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:680)
at java.awt.EventQueue.access$000(EventQueue.java:86)
at java.awt.EventQueue$1.run(EventQueue.java:639)
at java.awt.EventQueue$1.run(EventQueue.java:637)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext
$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext
$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:653)
at java.awt.EventQueue$2.run(EventQueue.java:651)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext
$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:650)
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)


I don't know what to try?

to answer your previous questions :
-yes it would help to packages gathering binaries + jars for each
platform.
It would also be nice to have separate folders for each version
containing all the required jars and native libs.

-about finding the source code, I didn't think of jzy3d itself but its
dependencies, like jogl, it's actually difficult to figure out which
version one is currently using.

-regarding JOGL2 working as JNLP, I have not tried it and I'm not sure
it's straightforward.

Now I will try to get jzy3d 0.8.3 working on top of a working setup of
jogl 1.xx, that should work, shouldn't it?
I will let you know once I make progress...


Cheers,

Bernard

freebear

unread,
Mar 29, 2011, 5:35:42 AM3/29/11
to Jzy3d
Hi guys,

Just to let you know that I got 0.8.3 running on my mac using the
jogls libraries from
http://download.java.net/media/jogl/builds/archive/jsr-231-1.x-webstart-current/
using the libraries as they are specified in the jnlp files.
Afterwards I added jzy3d 0.8.3 and the missing jars and it seems to
work.
Now, I will see how much of 0.9 I can get to work.

So forget my previous post...

Cheers,

Bernard

Martin Pernollet

unread,
Mar 29, 2011, 8:52:46 AM3/29/11
to jz...@googlegroups.com

It seems to crash while the demo launcher makes the screenshot. There might be an opendemo() method with a boolean indicating that you don t want it. Otherwise copy the method and remove the call to screenshot().
If it still does not work i can export a 0.9 alpha, since it includes updates for most recent mac OS (especially 64 b).

Martin Pernollet

unread,
Mar 29, 2011, 9:43:41 AM3/29/11
to jz...@googlegroups.com


2011/3/29 Martin Pernollet <martin.p...@gmail.com>

It seems to crash while the demo launcher makes the screenshot. There might be an opendemo() method with a boolean indicating that you don t want it.


Launcher.openDemo(IDemo demo, Rectangle rectangle, boolean screenshot)

where rectangle describes the windows size and position
 

Otherwise copy the method and remove the call to screenshot().
If it still does not work i can export a 0.9 alpha, since it includes updates for most recent mac OS (especially 64 b).

You can download and try 0.9 alpha from there:

To my knowledge, there's only a little bug related to canvas resize with swing.

Note there is a "java" folder in org.jzy3d-0.9-dependencies that should be discard, sorry for this dirty release. Only use jars standing in the zip root, and jars in "jogl" folder.

freebear

unread,
Mar 29, 2011, 12:15:36 PM3/29/11
to Jzy3d
Thanks a lot!
I downloaded the files for 0.9 and unpacked the libraries as stated.
I tried some demos and got some funny exception again:

first:
objc[28068]: Class ContextUpdater is implemented in both /Users/
berdeff/Development/computationalbiology/exploratory/working-jzy3d-0-9/
native/macos/libjogl_gl2es12.jnilib and /Users/berdeff/Development/
computationalbiology/exploratory/working-jzy3d-0-9/native/macos/
libjogl_desktop.jnilib. One of the two will be used. Which one is
undefined.


and then this exception:
java.lang.Exception: Previously locked by Thread[main,5,main], lock:
com.jogamp.nativewindow.impl.RecursiveToolkitLock@17094d48
at
com.jogamp.nativewindow.impl.RecursiveToolkitLock.lock(RecursiveToolkitLock.java:
112)
....
at java.awt.Window.addNotify(Window.java:663)
at java.awt.Frame.addNotify(Frame.java:470)
at java.awt.Window.pack(Window.java:704)
at org.jzy3d.bridge.awt.FrameAWT.<init>(FrameAWT.java:15)
at org.jzy3d.ui.Plugs.frame(Plugs.java:25)
at org.jzy3d.ui.ChartLauncher.openChart(ChartLauncher.java:85)
at org.jzy3d.ui.ChartLauncher.openChart(ChartLauncher.java:36)
at org.jzy3d.ui.ChartLauncher.openChart(ChartLauncher.java:33)
at org.jzy3d.demos.Launcher.openDemo(Launcher.java:108)
at org.jzy3d.demos.Launcher.openDemo(Launcher.java:100)
at
org.jzy3d.demos.animation.AnimatedSurfaceDemo.main(AnimatedSurfaceDemo.java:
34)
Exception in thread "main-Animator-1" javax.media.opengl.GLException:
java.lang.RuntimeException: Waited 5000ms for: Thread[main,5,main] -
Thread[AWT-EventQueue-0,6,main], with recursionCount 0, lock:
com.jogamp.nativewindow.impl.RecursiveToolkitLock@17094d48
at
com.jogamp.opengl.impl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:
101)
at
com.jogamp.opengl.impl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:
192)
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:
164)
at
javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:
594)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:302)
at com.jogamp.opengl.util.AnimatorImpl.display(AnimatorImpl.java:51)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:98)
at com.jogamp.opengl.util.Animator$MainLoop.run(Animator.java:158)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.RuntimeException: Waited 5000ms for: Thread[main,
5,main] - Thread[AWT-EventQueue-0,6,main], with recursionCount 0,
lock: com.jogamp.nativewindow.impl.RecursiveToolkitLock@17094d48
at
com.jogamp.nativewindow.impl.RecursiveToolkitLock.lock(RecursiveToolkitLock.java:
106)
at
com.jogamp.nativewindow.impl.jawt.JAWTWindow.lockSurface(JAWTWindow.java:
109)

Any idea what that could be?

Also, before we had jogl.jar, jogl-util.jar and jogl-all.jar, now only
jogl-util.jar and jogl-all.jar, I guess now everyhing is packaged in
jogl-all.jar, am I right?

cheers,

bernard


On Mar 29, 3:43 pm, Martin Pernollet <martin.pernol...@gmail.com>
wrote:
> 2011/3/29 Martin Pernollet <martin.pernol...@gmail.com>
> > com.sun.opengl.impl.macosx.MacOSXOnscreenGLDrawable.lockSurface(MacOSXOnscr eenGLDrawable.java:
> > > 144)
> > > at
>
> > com.sun.opengl.impl.macosx.MacOSXOnscreenGLContext.makeCurrentImpl(MacOSXOn screenGLContext.java:

Martin Pernollet

unread,
Mar 30, 2011, 3:08:37 AM3/30/11
to jz...@googlegroups.com, freebear


2011/3/29 freebear <bernard....@gmail.com>

Thanks a lot!
I downloaded the files for 0.9
 

Did you try the screenshot suggestion on 0.8.3?

 
first:
objc[28068]: Class ContextUpdater is implemented in both /Users/
berdeff/Development/computationalbiology/exploratory/working-jzy3d-0-9/
native/macos/libjogl_gl2es12.jnilib and /Users/berdeff/Development/
computationalbiology/exploratory/working-jzy3d-0-9/native/macos/
libjogl_desktop.jnilib. One of the two will be used.


I believe gl2es is for mobile devices. So keep libjogl_desktop.jnilib.

 

Caused by: java.lang.RuntimeException: Waited 5000ms for: Thread[main,
5,main] - Thread[AWT-EventQueue-0,6,main], with recursionCount 0,
lock: com.jogamp.nativewindow.impl.RecursiveToolkitLock@17094d48
       at
com.jogamp.nativewindow.impl.RecursiveToolkitLock.lock(RecursiveToolkitLock.java:
106)
       at
com.jogamp.nativewindow.impl.jawt.JAWTWindow.lockSurface(JAWTWindow.java:
109)

Any idea what that could be?


No :( maybe guys on the jogl forum can help?

Also, before we had jogl.jar, jogl-util.jar and jogl-all.jar, now only
jogl-util.jar and jogl-all.jar, I guess now everyhing is packaged in
jogl-all.jar, am I right?

yes
 

cheers,

bernard


Cheers,
Martin
 

Bernard Deffarges

unread,
Apr 1, 2011, 5:56:57 AM4/1/11
to Martin Pernollet, jz...@googlegroups.com
Hi Martin,

No I did not try the screenshot suggestion because it worked with another version of jogl (which I took from the webstart deployment of the jogl demo). So finally 0.8.3 works really well on my mac pro now!
I will ask the jogl guys about the exception.
cheers,
Bernard
Reply all
Reply to author
Forward
0 new messages