JSR231 craches under OSX

JSR231 often craches and system freezes completly when we try mixing swing and glcanvas. The crash often occur when we are resizeing the frame. Are there any special work arounds to consider when using jsr231 under osx ?

The app works perfect under linux and windows.

// Tomas

What OS version and JDK? There have been some reports of problems in this area recently. Some code related to the locking of Canvases using the AWT Native Interface recently changed in the JOGL implementation, and may be the root cause of the problems. Do you have a small test case? Are the problems reproducible with the JGears (rather than the Gears) demo?

I’ll set up a testcase by the end of the week. The system is a iMac PPC G5 2.1Mhz, java 1.4.2_09, ATI Radeon X600 XT, Mac OS X 10.4.5.

// Tomas

Actually I can reproduce this problem with the JGears demo so don’t worry about a test case. I’ll try to get to the bottom of this this week.

FYI, a bug fix to the GLJPanel has been checked in which was causing hangs on OS X but I don’t think this is the problem you’re talking about. Can you provide a test case for the crash?

Hi

I’ve created a quick testcase. The application freezes complete (however I didn’t manage to make it crache the system :wink: ). The app doesn’t seem to get a context either. The test is based on Gears and I’ve added a JSplitPane and changed the frame to a JFrame.

Have fun
// Tomas
CTO Agency9

Thanks for the test case. I can reproduce the crash. The problems appear to be caused by the recent introduction of an internal OpenGL worker thread in JOGL and possibly also by changes to the locking protocol in the on-screen GLContext implementations. For the time being I’ve disabled the use of this GLWorkerThread on OS X by default and switched things back to using the AWT event dispatch thread on that platform. I filed and marked as fixed Issue 210 which contains a slightly modified version of your test case. Please try a nightly build dated 3/23 or later and let us know whether the problems appear to have been fixed.

Hi

The testcase still craches and I still don’t get a context. I downloaded the new build from https://jogl.dev.java.net/ frontpage dated 2006-03-24. I’ve also switched java to 1.5.0_05-83. We have exprienced similar problem with JOGL 1.1 - 24 June on OSX.

Cheers
// Tomas

I still can’t reproduce the crash, but was able to reproduce a hang upon resizing the window which seems to come from the fact that the GLCanvas has a width and height of (0,0). Does this modified version of your test case behave any differently on your machine?

I’ll try to run your test with the ATI card I have here as well.

[quote] I still can’t reproduce the crash
[/quote]
Ooops, did I say crash … I meant hangs.

[quote]Does this modified version of your test case behave any differently on your machine?
[/quote]
It works, seems like setting the size to the canvas did the trick. Thanks, great work.
I will test the nightlybuild with the “real” app and see if the new build has cured the problems.

Cheers // Tomas :slight_smile:

Setting the size of the canvas seems to work with the “real app” aswell. Great work.

Thanks
// Tomas

Glad it’s working – but of course this isn’t the best solution. Do you have a bug filed with the JOGL Issue Tracker about this? If not, please file one and attach your test case.

I recall that we used to have tests against a width and height of 0 when creating an OpenGL context, but the lockSurfaceIfCanDraw call in JOGL’s OS X native code was supposed to obviate the need for that check. It’s actually that call which is causing the hang in your test case.

Done, Issue 214

// Tomas