[quote]You can use the switch “-Djogl.glu.nojava” to use the old working code. What pixel type are you using? There is a know bug when using packed pixels, the non-packed routines should work.
[/quote]
Thanks, the switch does work. I have an image of size 756 X 512 (TYPE_3BYTE_BGR) that I try to load with : glu.gluBuild2DMipmaps(GL.GL_TEXTURE_2D, GL.GL_RGB,bufferedImage.getWidth(), bufferedImage.getHeight(),GL.GL_BGR, GL.GL_UNSIGNED_BYTE, textureBuffer ); This causes a java.nio.BufferUnderflowException, at net.java.games.jogl.impl.mipmap.ScaleInternal.scale_internal_ubyte(ScaleInternal.java:222)
But when I resize the texture to 512 X 512, everything works fine.
[quote]I ran my app on 1.1b08 and it STILL crashes…I was hoping this ATI fix would be stable by now, but it still crashes. Here’s the info:
Powerbook G4 Mac OS 10.3.8
ATI Radeon 9600 XT
[/quote]
Have you tried specifying -DJOGL_SINGLE_THREADED_WORKAROUND=true manually on the command line? Can you post the HotSpot error log or exception backtrace? I don’t have a Mac with an ATI card to test with, but your app runs fine on my Windows box, though you should probably provide a batch file to set the system property -Dsun.java2d.noddraw=true or set that system property at the beginning of your program before creating any windows. BTW, you are distributing JOGL 1.1 b03 with your Windows download…
[quote]I have an image of size 756 X 512 (TYPE_3BYTE_BGR) that I try to load with : glu.gluBuild2DMipmaps(GL.GL_TEXTURE_2D, GL.GL_RGB,bufferedImage.getWidth(), bufferedImage.getHeight(),GL.GL_BGR, GL.GL_UNSIGNED_BYTE, textureBuffer ); This causes a java.nio.BufferUnderflowException, at net.java.games.jogl.impl.mipmap.ScaleInternal.scale_internal_ubyte(ScaleInternal.java:222)
But when I resize the texture to 512 X 512, everything works fine.
[/quote]
Do you have a test program that shows the bug? Could you please file a bug with the Issue Tracker on the JOGL home page and add your test case as an attachment? Thanks.
Ok, I did that, (issue 140) Maybe it is a good idea to make the issue tracker a little more user friendly? When I first had a look at it, I thought that you could only “query” for existing issues.
[quote]Maybe it is a good idea to make the issue tracker a little more user friendly?
[/quote]
You can suggest this with the Issue Tracker or on the Discussion Forums on the java.net project page.
JOGL 1.1 b09 has been released on February 15, 2005. Please see the following thread for details:
Please post comments about the new release here.
I’m glad to see some action on the jogl front. =)
I will update the wurm client to use 1.1 b09 Any Day Now™, so hopefully I’ll have some feedback then.
[edit: uh, typo]
Hi,
I have problems with the GLJPanel. Until this relaese I only got the message aborted and the api doesn’t start. I can’t find the problem with the exception message which looks like that one:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4E4C7332
Function=(null)+0x4E4C7332
Library=/usr/lib/tls/libGL.so.1
NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions.
Current Java thread:
at net.java.games.jogl.impl.x11.GLX.dispatch_glXMakeContextCurrent(Native Method)
at net.java.games.jogl.impl.x11.GLX.glXMakeContextCurrent(GLX.java:998)
at net.java.games.jogl.impl.x11.X11PbufferGLContext.makeCurrent(X11PbufferGLContext.java:254)
- locked <0x44dbd638> (a net.java.games.jogl.impl.x11.X11PbufferGLContext)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:246)
- locked <0x44dbd638> (a net.java.games.jogl.impl.x11.X11PbufferGLContext)
at net.java.games.jogl.impl.GLPbufferImpl.display(GLPbufferImpl.java:64)
at net.java.games.jogl.GLJPanel.paintComponent(GLJPanel.java:175)
But the same api works well when I use the GLCanvas. The problem is I need the Panel, because I use swing and a mix of light and heavy weighted components is terrible. The canvas is always in the foreground and no menu or tooltip can be seen.
With this release the api starts but when I click in the panel to rotate, it will be aborted again.
Is there anybody who has an idea what’s the problem???
Thanks
katja
[quote]I have problems with the GLJPanel.
[/quote]
What OS and graphics card are you using? Are you using your vendor’s most recent set of drivers? Do you have a test case which shows this crash? If so, could you please file a bug with the Issue Tracker on the JOGL web page and add your test case as an attachment?
[quote]The problem is I need the Panel, because I use swing and a mix of light and heavy weighted components is terrible. The canvas is always in the foreground and no menu or tooltip can be seen.
[/quote]
If your only problem is menus and tooltips, I think calling JPopupMenu.setDefaultLightWeightPopupEnabled(false) should put those in heavyweight containers. See the JOGL User’s Guide.
Hi,
I get the same exception now with b09 (b04 did fine):
xception in thread “X3d[myUniverse]” net.java.games.jogl.GLException: Error making context current
at net.java.games.jogl.impl.x11.X11GLContext.makeCurrent(X11GLContext.java:154)
at net.java.games.jogl.impl.x11.X11OnscreenGLContext.makeCurrent(X11OnscreenGLContext.java:111)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:203)
at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:186)
at net.java.games.jogl.GLCanvas.display(GLCanvas.java:74)
at com.xith3d.render.jogl.CanvasPeerImpl.render(CanvasPeerImpl.java:1162)
at com.xith3d.scenegraph.View.renderOnce(View.java:592)
at ext.xith3d.base.XithWorld.updatePostwork(XithWorld.java:210)
at kernel.math.geom3dv2.World3d.update(World3d.java:220)
OS: Suse 9.1 Graca: Ti4600: Driver 55xx, and 6629
I had the same problem some time ago while using the nvidia 44?? driver. Updating the driver resolved the issue back then.
Hi,
in the previous jogl versions the GLEventListener.reshape() method was called, if the display mode changed. I used this event to reconfigure glu.gluPerspective() accordingly. Since jogl 1.1 b09 no event is fired, neither reshape() nor displayChanged(). What is the reason for this change?
Best regards
Torsten
[quote]in the previous jogl versions the GLEventListener.reshape() method was called, if the display mode changed. I used this event to reconfigure glu.gluPerspective() accordingly. Since jogl 1.1 b09 no event is fired, neither reshape() nor displayChanged(). What is the reason for this change?
[/quote]
How are you changing the display mode, using the Java fullscreen APIs or in the Control Panel (assuming Windows)? I don’t remember changing anything in JOGL that would have affected this. Did you also upgrade your JDK or switch your setting of -Dsun.java2d.noddraw=true?
There are problems with the Java fullscreen APIs on Windows (when -Dsun.java2d.noddraw=true is set, which it needs to be for JOGL compatibility) and Mac OS X where the window and GLCanvas don’t get resized properly. This can be worked around by putting this at the top of your GLEventListener.init() method:
public void init(GLDrawable drawable) {
// FIXME: workaround for Windows full-screen bug when
// sun.java2d.noddraw=true and similar bug on Mac OS X
if (fullScreen) {
final GLDrawable tmpDrawable = drawable;
EventQueue.invokeLater(new Runnable() {
public void run() {
frame.setBounds(0, 0, initWidth, initHeight);
tmpDrawable.setSize(initWidth, initHeight);
frame.toFront();
}
});
}
The only thing that really appears to be needed out of those three lines is the call to tmpDrawable.setSize().
Linux, Nvidia Geforce 2, not the most recent driver (03.2004)
Maybe, I found out the problem. It crashes when I start the animator again, although it is already working. But when I start the animator again after the rendering was done at least one time, no crash appears. (I stop the animator when the mouse is leaving the panel and start it when the mouse is entering. I have to start the animator for the first rendering to see anything and when the mouse is outside this area and enters, the animator is started a second time and the api crashed, when no display was finished in between.)
Furthermore it crashes when I stop the animator and some milliseconds later I start it again and when I call the method gl.glSelectBuffer(bufferSize, pickBuffer) in mouseMoved(). I don’t know why!!!
Hi Ken,
removing -Dsun.java2d.noddraw=true as VM argument fixed the problem.
Thx for help.
It is only valid to make OpenGL calls from your GLEventListener’s callbacks. This is probably the root cause of your problem. You need to buffer up mouse motion and other events and process them in your next display() callback. Additionally, you probably shouldn’t need to start and stop the Animator as often as you are. Calling repaint() or just letting the AWT / Swing framework paint your GLCanvas or GLJPanel should work fine for most interactive applications.
Hello,
I’m having 2 problems with JOGL 1.1b8 and b9 on my PC :
- Running a personnal jogl app from command line, I have a JVM crash on exit (I can live with that) :
An unexpected error has been detected by HotSpot Virtual Machine:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x695838c4, pid=3236, tid=2588
Java VM: Java HotSpot™ Client VM (1.5.0-b64 mixed mode, sharing)
Problematic frame:
C [nvoglnt.dll+0x838c4]
An error report file with more information is saved as hs_err_pid3236.log
If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/bugreport/crash.jsp
Extracted form hs_errXX_pid.log
[error occurred during error reporting, step 270, id 0xc0000005]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j net.java.games.jogl.impl.windows.WGL.wglDeleteContext(J)Z+0
j net.java.games.jogl.impl.windows.WindowsGLContext.destroyImpl()V+13
j net.java.games.jogl.impl.GLContext.destroy()V+33
j net.java.games.jogl.GLCanvas.removeNotify()V+4
j java.awt.Container.removeNotify()V+38
j java.awt.Container.removeNotify()V+38
j java.awt.Frame.removeNotify()V+51
j java.awt.Window$1DisposeAction.run()V+105
j java.awt.Window.doDispose()V+16
j java.awt.Window.dispose()V+1
j shoot.ShootWindow.backToSystem()V+38
j shoot.ShootCanvasControl$4.run()V+7
j java.awt.event.InvocationEvent.dispatch()V+47
j java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+26
j java.awt.EventDispatchThread.pumpOneEventForHierarchy(ILjava/awt/Component;)Z+200
j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+26
j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j java.awt.EventDispatchThread.run()V+9
v ~StubRoutines::call_stub
- And most problematic, running (fine) the jogl demos makes my PC reboot on exit …
Configuration :
Pentium -IV, Windows XP, nvidia 6600, latest drivers.
Tried with jogl 1.1.b8 and b9.
Tried with -dsun.java2d.noddraw=true or false (same results).
Any idea ?
Lilian
[quote] It is only valid to make OpenGL calls from your GLEventListener’s callbacks.
[/quote]
Hello Ken,
thanks a lot. Now I understand. It is not allowed to call any OpenGL method outside from display, init, …
I changed my code according to this hind and now no crash at the moment, but there are still some problems with the GLJPanel. When I use this panel, text and buttons in JDialogs are not shown.
Kati
[quote]1) Running a personnal jogl app from command line, I have a JVM crash on exit (I can live with that) :
[/quote]
Does this happen with the JOGL demos or only your application? If the JOGL demos terminate cleanly, look at how the runExit() method is implemented. It starts up a new thread to shut down the Animator and call System.exit().
Also, please run with the system property -DJOGL_SINGLE_THREADED_WORKAROUND=true and post again indicating whether this fixes the behavior.
[quote]2) And most problematic, running (fine) the jogl demos makes my PC reboot on exit …
[/quote]
This has come up before with 6800 cards but I haven’t been able to reproduce it in house. Could you please run with -DJOGL_SINGLE_THREADED_WORKAROUND=true and b09 and tell us whether that works around the problem?
[quote]I changed my code according to this hind and now no crash at the moment, but there are still some problems with the GLJPanel. When I use this panel, text and buttons in JDialogs are not shown.
[/quote]
You probably need to specify the system property -Dsun.java2d.noddraw=true . Due to the fact that Java2D uses DirectDraw internally on Windows and that there are driver-level incompatibilities between OpenGL and DirectDraw you basically need to specify that system property for all JOGL applications.
Well, I’ve changed my app, and now my PC crashes as well… I’ll try to isolate where the problem comes from (as i prefer a jvm death instead of a pc reboot )
I’ve also downloaded the jogl demos, and ran them from command line (tried only Gears). It crashes my PC either with or without the -DJOGL_… arg.
Seems to be a rather serious problem…
Lilian
EDITED :
-
I have the same behaviour in full screen exclusive and windowed mode.
-
My computer does’nt reboot if I dispose() the frame and System.exit() immediately after (but JVM dies), withour removing the glcanvas.
-
It reboots immedialtely if I “frame.remove(canvas)” of if I “sleep(3000);System.exit()” after dispose() , in another thread.
Hope it helps.