unexpected signal : 11 when issuing glu commands

In my computer (Fedora Core 2, Xorg 6.7, ATI Radeon 9000, jsdk1.4.2_05, jojl 1.1b5), when a jogl program issue a glu command aborts abnormally (gl commands runs ok).

Help needed !!!

Thanks.

Error message:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xEF5
Function=[Unknown.]
Library=(N/A)

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.GLUImpl.dispatch_gluPerspective(Native Method)
at net.java.games.jogl.impl.GLUImpl.gluPerspective(GLUImpl.java:935)

Dynamic libraries:

031a7000-0321f000 r-xp 00000000 03:06 205602 /usr/X11R6/lib/libGLU.so.1.3
0321f000-03221000 rw-p 00077000 03:06 205602 /usr/X11R6/lib/libGLU.so.1.3
0474e000-047c2000 r-xp 00000000 03:06 203293 /usr/X11R6/lib/libGL.so.1.2
047c2000-047c7000 rw-p 00074000 03:06 203293 /usr/X11R6/lib/libGL.so.1.2

Heap at VM Abort:
Heap
def new generation total 576K, used 209K [0xecf70000, 0xed010000, 0xed450000)
eden space 512K, 28% used [0xecf70000, 0xecf94538, 0xecff0000)
from space 64K, 100% used [0xed000000, 0xed010000, 0xed010000)
to space 64K, 0% used [0xecff0000, 0xecff0000, 0xed000000)
tenured generation total 1408K, used 1184K [0xed450000, 0xed5b0000, 0xf0f70000)
the space 1408K, 84% used [0xed450000, 0xed578250, 0xed578400, 0xed5b0000)
compacting perm gen total 6400K, used 6174K [0xf0f70000, 0xf15b0000, 0xf4f70000)
the space 6400K, 96% used [0xf0f70000, 0xf1577a20, 0xf1577c00, 0xf15b0000)

Local Time = Sat Sep 4 13:35:11 2004
Elapsed Time = 2

The exception above was detected in native code outside the VM

Java VM: Java HotSpot™ Client VM (1.4.2_05-b04 mixed mode)

An error report file has been saved as hs_err_pid3234.log.

Please refer to the file for further information.

Either you are issuing GLU commands outside your GLEventListener’s callback methods, or there is a problem with JOGL’s binding to the native GLU library. I’d need to see the complete stack trace to be able to guess whether it is the former or the latter. To address these kinds of instabilities we are planning to port more of JOGL’s GLU support to pure Java.

I’ve splitted the message in few parts (because the message was too long)

(Part I)

The code !

This is a “conflictive example code” (extracted from nehe demos lesson02). In this code
there’s a call to gluPerspective to establish de scene perspective in the reshape method.


public void reshape(GLDrawable gLDrawable, int x, int y, int width, int height) {
final GL gl = gLDrawable.getGL();
final GLU glu = gLDrawable.getGLU();

if (height <= 0) height = 1;

final float h = (float) width / (float) height;

gl.glViewport(0, 0, width, height);
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
glu.gluPerspective(45.0f, h, 1.0, 20.0);
gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glLoadIdentity();
}

The call to gluPerspective crashes (the result is the same with any glu command)

continues…

Part II

The stack trace:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xEF1
Function=[Unknown.]
Library=(N/A)

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.GLUImpl.dispatch_gluPerspective(Native Method)
at net.java.games.jogl.impl.GLUImpl.gluPerspective(GLUImpl.java:935)
at demos.nehe.lesson02.Renderer.reshape(Renderer.java:90)
at demos.common.GLDisplay$MyHelpOverlayGLEventListener.reshape(GLDisplay.java:296)
at net.java.games.jogl.impl.GLDrawableHelper.reshape(GLDrawableHelper.java:81)
at net.java.games.jogl.GLCanvas$1.run(GLCanvas.java:115)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:287)
- locked <0xed54e468> (a net.java.games.jogl.impl.x11.X11OnscreenGLContext)
at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:208)
at net.java.games.jogl.GLCanvas.display(GLCanvas.java:75)
at demos.common.FPSAnimator$RenderRunnable.run(FPSAnimator.java:168)
at java.lang.Thread.run(Thread.java:534)

Dynamic libraries:
00111000-00119000 r-xp 00000000 03:06 618378 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/native_threads/libhpi.so
00119000-0011a000 rw-p 00007000 03:06 618378 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/native_threads/libhpi.so
0011a000-00124000 r-xp 00000000 03:06 617778 /lib/libnss_files-2.3.3.so
00124000-00125000 r–p 00009000 03:06 617778 /lib/libnss_files-2.3.3.so
00125000-00126000 rw-p 0000a000 03:06 617778 /lib/libnss_files-2.3.3.so
00126000-00146000 r-xp 00000000 03:06 618386 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libjava.so
00146000-00148000 rw-p 0001f000 03:06 618386 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libjava.so
003cc000-003d9000 r-xp 00000000 03:06 203235 /usr/X11R6/lib/libXext.so.6.4
003d9000-003da000 rw-p 0000c000 03:06 203235 /usr/X11R6/lib/libXext.so.6.4
003da000-003de000 r-xp 00000000 03:06 203265 /usr/X11R6/lib/libXtst.so.6.1
003de000-003df000 rw-p 00004000 03:06 203265 /usr/X11R6/lib/libXtst.so.6.1
003df000-003e0000 r-xp 00000000 03:06 618405 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libjawt.so
003e0000-003e1000 rw-p 00000000 03:06 618405 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libjawt.so
003e1000-003e2000 r-xp 00000000 03:06 278968 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2
003e2000-003e3000 rw-p 00000000 03:06 278968 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2
00424000-0042b000 r-xp 00000000 03:06 203221 /usr/X11R6/lib/libSM.so.6.0
0042b000-0042c000 rw-p 00007000 03:06 203221 /usr/X11R6/lib/libSM.so.6.0
0042c000-00440000 r-xp 00000000 03:06 203217 /usr/X11R6/lib/libICE.so.6.3
00440000-00441000 rw-p 00014000 03:06 203217 /usr/X11R6/lib/libICE.so.6.3
00461000-00465000 r-xp 00000000 03:06 203277 /usr/X11R6/lib/libXxf86vm.so.1.0
00465000-00466000 rw-p 00003000 03:06 203277 /usr/X11R6/lib/libXxf86vm.so.1.0
0046a000-0047a000 r-xp 00000000 03:06 618385 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libverify.so
0047a000-0047c000 rw-p 0000f000 03:06 618385 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libverify.so
0047c000-004cf000 r-xp 00000000 03:06 618395 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libmlib_image.so
004cf000-004d0000 rw-p 00052000 03:06 618395 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libmlib_image.so
004d0000-004d7000 r-xp 00000000 03:06 623149 /lib/libgcc_s-3.3.3-20040413.so.1
004d7000-004d8000 rw-p 00006000 03:06 623149 /lib/libgcc_s-3.3.3-20040413.so.1
004d8000-004e0000 r-xp 00000000 03:06 203233 /usr/X11R6/lib/libXcursor.so.1.0.2
004e0000-004e1000 rw-p 00007000 03:06 203233 /usr/X11R6/lib/libXcursor.so.1.0.2
004e1000-004e8000 r-xp 00000000 03:06 203259 /usr/X11R6/lib/libXrender.so.1.2.2
004e8000-004e9000 rw-p 00006000 03:06 203259 /usr/X11R6/lib/libXrender.so.1.2.2
004f5000-008f1000 r-xp 00000000 03:06 637201 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/client/libjvm.so
008f1000-0090c000 rw-p 003fb000 03:06 637201 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/client/libjvm.so
0099f000-009ba000 r-xp 00000000 03:06 282629 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
009ba000-009bc000 rw-p 0001b000 03:06 282629 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
009d2000-009e6000 r-xp 00000000 03:06 618388 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libzip.so
009e6000-009e9000 rw-p 00013000 03:06 618388 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libzip.so
00a22000-00a29000 r-xp 00000000 03:06 203253 /usr/X11R6/lib/libXp.so.6.2
00a29000-00a2a000 rw-p 00006000 03:06 203253 /usr/X11R6/lib/libXp.so.6.2
00ba2000-00bb3000 r-xp 00000000 03:06 623156 /lib/libnsl-2.3.3.so
00bb3000-00bb4000 r–p 00011000 03:06 623156 /lib/libnsl-2.3.3.so
00bb4000-00bb5000 rw-p 00012000 03:06 623156 /lib/libnsl-2.3.3.so
00be9000-00bfe000 r-xp 00000000 03:06 623143 /lib/ld-2.3.3.so
00bfe000-00bff000 r–p 00014000 03:06 623143 /lib/ld-2.3.3.so
00bff000-00c00000 rw-p 00015000 03:06 623143 /lib/ld-2.3.3.so
00c02000-00d17000 r-xp 00000000 03:06 623144 /lib/tls/libc-2.3.3.so
00d17000-00d19000 r–p 00115000 03:06 623144 /lib/tls/libc-2.3.3.so
00d19000-00d1b000 rw-p 00117000 03:06 623144 /lib/tls/libc-2.3.3.so
00d1f000-00d40000 r-xp 00000000 03:06 623147 /lib/tls/libm-2.3.3.so
00d40000-00d41000 r–p 00020000 03:06 623147 /lib/tls/libm-2.3.3.so
00d41000-00d42000 rw-p 00021000 03:06 623147 /lib/tls/libm-2.3.3.so
00d44000-00d46000 r-xp 00000000 03:06 623148 /lib/libdl-2.3.3.so
00d46000-00d47000 r–p 00001000 03:06 623148 /lib/libdl-2.3.3.so
00d47000-00d48000 rw-p 00002000 03:06 623148 /lib/libdl-2.3.3.so
00d6d000-00d7b000 r-xp 00000000 03:06 623145 /lib/tls/libpthread-0.61.so
00d7b000-00d7c000 r–p 0000d000 03:06 623145 /lib/tls/libpthread-0.61.so
00d7c000-00d7d000 rw-p 0000e000 03:06 623145 /lib/tls/libpthread-0.61.so
02d7f000-02df7000 r-xp 00000000 03:06 205602 /usr/X11R6/lib/libGLU.so.1.3
02df7000-02df9000 rw-p 00077000 03:06 205602 /usr/X11R6/lib/libGLU.so.1.3
02df9000-02f70000 r-xp 00000000 03:06 439725 /usr/X11R6/lib/modules/dri/r200_dri.so
02f70000-02f74000 rw-p 00177000 03:06 439725 /usr/X11R6/lib/modules/dri/r200_dri.so
0391a000-039d4000 r-xp 00000000 03:06 618399 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libfontmanager.so
039d4000-039ef000 rw-p 000b9000 03:06 618399 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libfontmanager.so
04186000-04457000 r-xp 00000000 03:06 618396 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libawt.so
04457000-0446d000 rw-p 002d0000 03:06 618396 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libawt.so

continues …

Part III

04760000-04811000 r-xp 00000000 03:06 494233 /usr/lib/libstdc++.so.5.0.5
04811000-04816000 rw-p 000b0000 03:06 494233 /usr/lib/libstdc++.so.5.0.5
05ecb000-05f18000 r-xp 00000000 03:06 203263 /usr/X11R6/lib/libXt.so.6.0
05f18000-05f1c000 rw-p 0004c000 03:06 203263 /usr/X11R6/lib/libXt.so.6.0
06cbd000-06d82000 r-xp 00000000 03:06 203223 /usr/X11R6/lib/libX11.so.6.2
06d82000-06d85000 rw-p 000c5000 03:06 203223 /usr/X11R6/lib/libX11.so.6.2
06e95000-06f09000 r-xp 00000000 03:06 203293 /usr/X11R6/lib/libGL.so.1.2
06f09000-06f0e000 rw-p 00074000 03:06 203293 /usr/X11R6/lib/libGL.so.1.2
077ef000-07912000 r-xp 00000000 03:06 618469 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libjogl.so
07912000-07914000 rw-p 00123000 03:06 618469 /usr/local/java/j2sdk1.4.2_05/jre/lib/i386/libjogl.so
08048000-08056000 r-xp 00000000 03:06 686643 /usr/local/java/j2sdk1.4.2_05/bin/java
08056000-08059000 rw-p 0000d000 03:06 686643 /usr/local/java/j2sdk1.4.2_05/bin/java
e3ccb000-e41ab000 rw-s e8302000 03:06 912831 /dev/dri/card0
e41ab000-e43ab000 rw-s e8102000 03:06 912831 /dev/dri/card0
e43ab000-e43ac000 r–s e8101000 03:06 912831 /dev/dri/card0
e43ac000-e442c000 r–s ec100000 03:06 912831 /dev/dri/card0
e442c000-e442e000 rw-s 2282c000 03:06 912831 /dev/dri/card0
e442e000-e842e000 rw-s f0000000 03:06 912831 /dev/dri/card0
e842e000-e8434000 r–s 00000000 03:06 212362 /usr/lib/gconv/gconv-modules.cache
e8434000-e8914000 rw-s e8302000 03:06 912831 /dev/dri/card0
e8914000-e8b14000 rw-s e8102000 03:06 912831 /dev/dri/card0
e8b14000-e8b15000 r–s e8101000 03:06 912831 /dev/dri/card0
e8b15000-e8b95000 r–s ec100000 03:06 912831 /dev/dri/card0
e8b95000-e8b97000 rw-s 2282c000 03:06 912831 /dev/dri/card0
e8b97000-ecb97000 rw-s f0000000 03:06 912831 /dev/dri/card0
ecb97000-ecbb3000 r–s 00000000 03:06 682796 /usr/local/java/j2sdk1.4.2_05/jre/lib/ext/sunjce_provider.jar
ecbb3000-ecca4000 r–s 00000000 03:06 688829 /usr/local/java/j2sdk1.4.2_05/jre/lib/ext/jogl.jar
ecca4000-ecd60000 r–s 00000000 03:06 686636 /usr/local/java/j2sdk1.4.2_05/jre/lib/ext/localedata.jar
ecd60000-ecd6d000 r–s 00000000 03:06 685735 /usr/local/java/j2sdk1.4.2_05/jre/lib/ext/ldapsec.jar
ecd6d000-ecd70000 r–s 00000000 03:06 682797 /usr/local/java/j2sdk1.4.2_05/jre/lib/ext/dnsns.jar
ecd70000-ecf70000 r–p 00000000 03:06 198721 /usr/lib/locale/locale-archive
f4fa4000-f54fd000 r–s 00000000 03:06 618453 /usr/local/java/j2sdk1.4.2_05/jre/lib/charsets.jar
f54fd000-f550e000 r–s 00000000 03:06 618411 /usr/local/java/j2sdk1.4.2_05/jre/lib/jce.jar
f550e000-f55eb000 r–s 00000000 03:06 618452 /usr/local/java/j2sdk1.4.2_05/jre/lib/jsse.jar
f55eb000-f5601000 r–s 00000000 03:06 618410 /usr/local/java/j2sdk1.4.2_05/jre/lib/sunrsasign.jar
f564b000-f6fef000 r–s 00000000 03:06 618468 /usr/local/java/j2sdk1.4.2_05/jre/lib/rt.jar
f6ffc000-f7000000 rw-s 00000000 03:06 32659 /tmp/hsperfdata_fran/2831

Heap at VM Abort:
Heap
def new generation total 576K, used 215K [0xecf70000, 0xed010000, 0xed450000)
eden space 512K, 29% used [0xecf70000, 0xecf95e38, 0xecff0000)
from space 64K, 100% used [0xed000000, 0xed010000, 0xed010000)
to space 64K, 0% used [0xecff0000, 0xecff0000, 0xed000000)
tenured generation total 1408K, used 1180K [0xed450000, 0xed5b0000, 0xf0f70000)
the space 1408K, 83% used [0xed450000, 0xed577288, 0xed577400, 0xed5b0000)
compacting perm gen total 6400K, used 6175K [0xf0f70000, 0xf15b0000, 0xf4f70000)
the space 6400K, 96% used [0xf0f70000, 0xf1577dc0, 0xf1577e00, 0xf15b0000)

Local Time = Wed Sep 8 10:58:35 2004
Elapsed Time = 2

The exception above was detected in native code outside the VM

Java VM: Java HotSpot™ Client VM (1.4.2_05-b04 mixed mode)

It looks like you’re using the GLU object properly. We’ve seen crashes while using GLU on some Linux systems before; see for example Issue 42 in the JOGL Issue Tracker. I think the right answer is for us to port GLU to Java, as has been proposed by the LWJGL team as well. I’ve increased the priority of Issue 42 and will personally try to get to it soon; any help is definitely welcome. As a workaround, I would recommend you download the source code for the GLU implementation from SGI’s web site and extract the code for the gluPerspective routine, which should be fairly small and self-contained. I think the LWJGL source tree might also have this ported to Java already.

http://oss.sgi.com/projects/ogl-sample/