rendering stops after first frame

Hi y’all!

After developing some 2d-animation under mac os x, i tried to make it run with windows. It renders the first frame then it doesn’t do anything, not even throw an exception.

Disappointed I tried if some of NeHe’s demos work (lesson04 and lesson06), but neither did (no modification, of course). They all stop after the first frame being rendered.

Looks like display() is called just once, what can I do?

My project has to be done ntil next week and there’s still lots of work to do. I don’t want to go back to Java2d, which was much too slow.

Thanks in advance

Have you set an Animator Class that call the new displays periodically?

Yes, of course I have.

As I wrote I tried two JOGL-ports from NeHe’s tutorials and the did not work either, so this does not seem to be a problem with my code only.

Yes, sorry i haven’t read well…
Does the background becomes gray…

If you are using the latest binaries try -DATI_WORKAROUND=false at the command line.

No, it renders the first frame - which looks as expected - and then just stops being called (I put a System.out.println(frame); into my display() method, it just gives a single “1”)

I’ve read somewhere, one should add the glCanvas to the Frame after the call to setVisible(). Now the screen gets white, when I start my program.

I also read that it might help passing -Dsun.java2d.noddraw=true to the VM, which did not change anything at all.

Try hitting Ctrl-Break on the command line after the first frame renders and see where the program is executing. If you can boil down your program into a small test case please file an Issue on the JOGL web page and attach a test case.

[quote]If you are using the latest binaries try -DATI_WORKAROUND=false at the command line.
[/quote]
YEAH, YEAH, YEAH!

That did it, thanks a very lot!

Where do I find hints like taht without annoying people around here? I searched the board, google, nearly all sites I found about JOGL, but that flag’s new to me.

Have a nice day … (I do now)

The problem could be related do what I’ve seen on another PC: just the 1st frame has been rendered.

Some time ago I’ve opened a thread for it: Radeon 9800 XL experiences?

I’ve just downloaded JOGL 1.1 beta 04 (July 16, 2004). A small app using JOGL directly (*) works on my ATI 9600pro, however my Xith application using JOGL doesn’t: it doesn’t even render the 1st frame anymore, just does nothing - still it doesn’t hang, but the Canvas isn’t being updated.
Looks similar to the effect the original poster observed (except that I don’t even get the 1st frame rendered).

When I use the -DATI_WORKAROUND=false switch the Xith application works.

I’ll also ask in the Xith forum, maybe some people know more.

(*) It doesn’t use the Animator class but a time controlled direct call to glCanvas_object.display()

Can you please file an issue on this topic on the JOGL web page? Please include the thread dump (Ctrl-Break on the command line, on Windows, or Ctrl-\ or SIGQUIT on Unix) once the application appears to hang. The ATI_WORKAROUND code should (obviously) not have this kind of effect, but only make the system more stable by forcing all rendering operations onto the AWT event queue thread. This hanging behavior didn’t appear on any of the machines (ATI or NVidia) I originally tested the workaround code on.

[quote]Can you please file an issue on this topic on the JOGL web page? Please include the thread dump
[/quote]
Yes, filed as issue #98.

I’ve seen the hang for the Xith demos as well. It’s not the very latest Xith version but I don’t think they changed anything at the rendering loop.

Strangly enough my direct Jogl app doesn’t hang here on the Radeon 9600, but it did so on a Radeon 9800 XL with the Jogl version prior to the latest…

I still think Ati isn’t doing a good job with OpenGL drivers. Even though Ati’s drivers have improved, I still think John Carmack’s statement is correct, which he did over two years ago:[quote]Nvidia’s OpenGL drivers are my “gold standard”, and it has been quite a while since I have had to report a problem to them, and even their brand new extensions work as documented the first time I try them. When I have a problem on an Nvidia, I assume that it is my fault. With anyone else’s drivers, I assume it is their fault. This has turned out correct almost all the time.
[/quote]
Sigh. Unfortunately not a big help for us poor Ati users.

I updated Issue 98 with a comment indicating that I can’t see an obvious deadlock in the thread dump and requesting some more information. Hopefully with that we can get to the bottom of these problems.

[quote]I updated Issue 98 with a comment indicating that I can’t see an obvious deadlock in the thread dump and requesting some more information. Hopefully with that we can get to the bottom of these problems.
[/quote]
I’ll have to ask some Xith experts first on how to do this. As soon I find out more, I’ll report it here (and on the Jogl issue tracker).

I can get any jogl app to hang at the first frame without the ATI_WORKAROUND flag with this ATI Rage 128 Pro. Is there any data I can collect for you?

Can you run the Gears demo, wait for it to hang, and then hit Ctrl-Break and attach the thread dump to Issue 98?

Ok, I’ve attached a threaddump text file to issue 98.

Looking at the dump it looks like there is no deadlock. Could you put a println in the Gears demo’s display() routine and see whether it is actually running the rendering loop?

Just to be sure you have a clear picture of the the problem, we get the first frame, but then nothing after that. It’s more like rendering a still image. The gears are displayed, but there’s no animation.

The frame also does not process any repaint notifications. If I partically cover the window and then bring it to the foregound, I simply get a white rect where the window was obscured.

http://home.earthlink.net/~kduling/jogl/gears.png

Here is the complete output from the program. I added the two Entering/Leaving lines within the display() method.

CANVAS GL IS: net.java.games.jogl.impl.windows.WindowsGLImpl
CANVAS GLU IS: net.java.games.jogl.impl.GLUImpl
Using ATI workaround of dispatching display() on event thread
INIT GL IS: net.java.games.jogl.impl.windows.WindowsGLImpl
GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: RAGE 128 Pro Ultra x86/SSE2
GL_VERSION: 1.2.1716 WinXP Release

glLoadTransposeMatrixfARB() supported: true
Entering display()
Leaving display()

[quote]Just to be sure you have a clear picture of the the problem, we get the first frame, but then nothing after that.
[/quote]
I too can confirm this is exactly what I see with my ATI 9600pro and the Gears demo, Vertex Program Warp demo, etc, with Jogl v1.1 beta 04, Catalyst 4.7 and a newly booted PC.

When I set the -DATI_WORKAROUND switch to false, the Gears demo runs OK sometimes, while sometimes it produces a VM crash dump then.
After some VM crashes the demo sometimes runs OK no matter of the Ati_Workaround switch. Maybe once the Ati OpenGL driver is in a strange state, it works randomly…
If I find out how to attach a file to the Jogl issue tracker’s #98 issue, I could post the VM dump file.

It’s a pity there’s so much trouble with ATI’s OpenGL drivers. Not only does this lead to very unstable Jogl-Java applications, but also it brings a bad light on OpenGL and Java apps/programmers when you try to show them to non Java people. I know it’s not the fault of the Jogl developers and community and OpenGL. :frowning:
Thanks for the effort you Jogl developers and community people put into solving these issues.