Can't get LWJGL working under Linux (Signal 11)

Started by Zakalwe, February 25, 2004, 18:39:01

Previous topic - Next topic

Zakalwe

I've downloaded and attempted to run the lwjgl-0.8-glibc2.3-linux.zip package. I have OpenGL working fine on this system with Direct Rendering. GL4Java works perfectly and glxgears gives me 800 frames per second.
I've attached the outputs of glxinfo, java -version and java -Djava.library.path=. -classpath .:lwjgl.jar:lwjgl_test.jar  org.lwjgl.test.input.MouseTest
I've attempted to compile the CVS, but the build failed.

The machine is running Debian GNU/Linux unstable on kernel 2.6.2


java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)



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 org.lwjgl.opengl.Window.nCreate(Native Method)
       at org.lwjgl.opengl.Window.createWindow(Unknown Source)
       at org.lwjgl.opengl.Window.create(Unknown Source)
       at org.lwjgl.test.input.MouseTest.setupDisplay(Unknown Source)
       at org.lwjgl.test.input.MouseTest.initialize(Unknown Source)
       at org.lwjgl.test.input.MouseTest.executeTest(Unknown Source)
       at org.lwjgl.test.input.MouseTest.main(Unknown Source)

Dynamic libraries:
08048000-0804e000 r-xp 00000000 03:02 1982514    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/bin/java
0804e000-0804f000 rw-p 00005000 03:02 1982514    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/bin/java
40000000-40016000 r-xp 00000000 03:02 4079627    /lib/ld-2.3.2.so
40016000-40017000 rw-p 00015000 03:02 4079627    /lib/ld-2.3.2.so
40024000-40030000 r-xp 00000000 03:02 4293407    /lib/tls/libpthread-0.60.so
40030000-40031000 rw-p 0000c000 03:02 4293407    /lib/tls/libpthread-0.60.so
40034000-40036000 r-xp 00000000 03:02 4293396    /lib/tls/libdl-2.3.2.so
40036000-40037000 rw-p 00001000 03:02 4293396    /lib/tls/libdl-2.3.2.so
40037000-40165000 r-xp 00000000 03:02 4293394    /lib/tls/libc-2.3.2.so
40165000-4016e000 rw-p 0012d000 03:02 4293394    /lib/tls/libc-2.3.2.so
40171000-40568000 r-xp 00000000 03:02 16867      /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/i386/client/libjvm.so
40568000-40583000 rw-p 003f6000 03:02 16867      /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/i386/client/libjvm.so
40596000-4059e000 r-xp 00000000 03:02 3178500    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/i386/native_threads/libhpi.so
4059e000-4059f000 rw-p 00007000 03:02 3178500    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/i386/native_threads/libhpi.so
405a2000-405b4000 r-xp 00000000 03:02 4293399    /lib/tls/libnsl-2.3.2.so
405b4000-405b5000 rw-p 00011000 03:02 4293399    /lib/tls/libnsl-2.3.2.so
405b7000-405d9000 r-xp 00000000 03:02 4293397    /lib/tls/libm-2.3.2.so
405d9000-405da000 rw-p 00022000 03:02 4293397    /lib/tls/libm-2.3.2.so
405da000-405de000 rw-s 00000000 03:02 1081716    /tmp/hsperfdata_fowler/1900
405e6000-405ed000 r-xp 00000000 03:02 4293400    /lib/tls/libnss_compat-2.3.2.so
405ed000-405ee000 rw-p 00007000 03:02 4293400    /lib/tls/libnss_compat-2.3.2.so
405ee000-405f7000 r-xp 00000000 03:02 4293404    /lib/tls/libnss_nis-2.3.2.so
405f7000-405f8000 rw-p 00008000 03:02 4293404    /lib/tls/libnss_nis-2.3.2.so
405f8000-40601000 r-xp 00000000 03:02 4293402    /lib/tls/libnss_files-2.3.2.so
40601000-40602000 rw-p 00008000 03:02 4293402    /lib/tls/libnss_files-2.3.2.so
40602000-40612000 r-xp 00000000 03:02 3178503    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/i386/libverify.so
40612000-40614000 rw-p 0000f000 03:02 3178503    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/i386/libverify.so
40614000-40634000 r-xp 00000000 03:02 3178504    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/i386/libjava.so
40634000-40636000 rw-p 0001f000 03:02 3178504    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/i386/libjava.so
40636000-4064a000 r-xp 00000000 03:02 3178506    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/i386/libzip.so
4064a000-4064d000 rw-p 00013000 03:02 3178506    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/i386/libzip.so
4064d000-41fd8000 r--s 00000000 03:02 1753602    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/rt.jar
42022000-42038000 r--s 00000000 03:02 1753573    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/sunrsasign.jar
42038000-42113000 r--s 00000000 03:02 1753599    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/jsse.jar
42113000-42124000 r--s 00000000 03:02 1753574    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/jce.jar
42124000-4267d000 r--s 00000000 03:02 1753600    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/charsets.jar
4c930000-4c977000 r--p 00000000 03:02 3489948    /usr/lib/locale/locale-archive
4cb77000-4cb93000 r--s 00000000 03:02 3391823    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/ext/sunjce_provider.jar
4cb93000-4cb96000 r--s 00000000 03:02 3391824    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/ext/dnsns.jar
4cb96000-4cbce000 r--s 00000000 03:02 3391816    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/ext/gl4java.jar
4cbce000-4cbdb000 r--s 00000000 03:02 3391826    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/ext/ldapsec.jar
4cbdb000-4cc97000 r--s 00000000 03:02 3391845    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/ext/localedata.jar
4cc97000-4ccb5000 r--s 00000000 03:02 3391818    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/ext/gl4java-glutfonts.jar
4ccb5000-4cd4c000 r--s 00000000 03:02 3391821    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/ext/gl4java-glffonts.jar
4cd4c000-4cd5a000 r--s 00000000 03:02 3391825    /usr/local/lib/j2sdk1.42/j2sdk1.4.2/jre/lib/ext/png.jar
4cd5a000-4cd79000 r--s 00000000 03:02 4459414    /home/fowler/tmp/lwjgl-0.8-glibc2.3-linux/lwjgl.jar
4cd79000-4cd85000 r--s 00000000 03:02 4459415    /home/fowler/tmp/lwjgl-0.8-glibc2.3-linux/lwjgl_test.jar
4cd85000-4cdbf000 r-xp 00000000 03:02 4459410    /home/fowler/tmp/lwjgl-0.8-glibc2.3-linux/liblwjgl.so
4cdbf000-4cdcb000 rw-p 00039000 03:02 4459410    /home/fowler/tmp/lwjgl-0.8-glibc2.3-linux/liblwjgl.so
4cdd8000-4cde5000 r-xp 00000000 03:02 1523801    /usr/X11R6/lib/libXext.so.6.4
4cde5000-4cde6000 rw-p 0000c000 03:02 1523801    /usr/X11R6/lib/libXext.so.6.4
4cde6000-4ceaa000 r-xp 00000000 03:02 1524535    /usr/X11R6/lib/libX11.so.6.2
4ceaa000-4cead000 rw-p 000c4000 03:02 1524535    /usr/X11R6/lib/libX11.so.6.2
4cead000-4cf4b000 r-xp 00000000 03:02 4080039    /usr/lib/libstdc++.so.5.0.5
4cf4b000-4cf61000 rw-p 0009d000 03:02 4080039    /usr/lib/libstdc++.so.5.0.5
4cf66000-4cf6d000 r-xp 00000000 03:02 4079906    /lib/libgcc_s.so.1
4cf6d000-4cf6e000 rw-p 00007000 03:02 4079906    /lib/libgcc_s.so.1
4cf6e000-4cfe6000 r-xp 00000000 03:02 1523761    /usr/X11R6/lib/libGL.so.1.2
4cfe6000-4cfeb000 rw-p 00077000 03:02 1523761    /usr/X11R6/lib/libGL.so.1.2
4cfec000-4d06f000 r-xp 00000000 03:02 4083649    /usr/lib/libGLU.so.1.3.500
4d06f000-4d07a000 rw-p 00083000 03:02 4083649    /usr/lib/libGLU.so.1.3.500
4d07a000-4d1da000 r-xp 00000000 03:02 4084018    /usr/X11R6/lib/modules-dri-trunk/dri/r128_dri.so
4d1da000-4d1dd000 rw-p 00160000 03:02 4084018    /usr/X11R6/lib/modules-dri-trunk/dri/r128_dri.so
4d1e8000-4e1e8000 rw-s f8000000 00:0a 1835       /dev/dri/card0
4e1e8000-4e1ea000 rw-s d188b000 00:0a 1835       /dev/dri/card0
4e1ea000-4e1ee000 r--s f0200000 00:0a 1835       /dev/dri/card0
4e1ee000-4e3ee000 rw-s f4102000 00:0a 1835       /dev/dri/card0
4e3ee000-4e8ce000 rw-s f4302000 00:0a 1835       /dev/dri/card0

Heap at VM Abort:
Heap
def new generation   total 576K, used 281K [0x44730000, 0x447d0000, 0x44c10000)
 eden space 512K,  55% used [0x44730000, 0x447766c0, 0x447b0000)
 from space 64K,   0% used [0x447b0000, 0x447b0000, 0x447c0000)
 to   space 64K,   0% used [0x447c0000, 0x447c0000, 0x447d0000)
tenured generation   total 1408K, used 0K [0x44c10000, 0x44d70000, 0x48730000)
  the space 1408K,   0% used [0x44c10000, 0x44c10000, 0x44c10200, 0x44d70000)
compacting perm gen  total 4096K, used 1115K [0x48730000, 0x48b30000, 0x4c730000)
  the space 4096K,  27% used [0x48730000, 0x48846ee8, 0x48847000, 0x48b30000)

Local Time = Wed Feb 25 18:07:04 2004
Elapsed Time = 0
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-b28 mixed mode)





name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
   GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
   GLX_EXT_import_context, GLX_SGI_make_current_read, GLX_SGIS_multisample
client glx vendor string: SGI
client glx version string: 1.2
client glx extensions:
   GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
   GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
   GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_OML_swap_method,
   GLX_OML_sync_control, GLX_SGI_make_current_read, GLX_SGI_swap_control,
   GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
   GLX_SGIX_visual_select_group
GLX extensions:
   GLX_ARB_get_proc_address, GLX_EXT_import_context, GLX_EXT_visual_info,
   GLX_EXT_visual_rating, GLX_MESA_swap_control, GLX_MESA_swap_frame_usage,
   GLX_SGI_video_sync
OpenGL vendor string: VA Linux Systems, Inc.
OpenGL renderer string: Mesa DRI Rage 128 Mobility 20030328 AGP 1x x86/MMX/SSE
OpenGL version string: 1.2 Mesa 5.0.2
OpenGL extensions:
   GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_texture_env_add,
   GL_ARB_texture_mirrored_repeat, GL_ARB_transpose_matrix,
   GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
   GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
   GL_EXT_compiled_vertex_array, GL_EXT_convolution, GL_EXT_copy_texture,
   GL_EXT_draw_range_elements, GL_EXT_histogram, GL_EXT_packed_pixels,
   GL_EXT_polygon_offset, GL_EXT_rescale_normal,
   GL_EXT_separate_specular_color, GL_EXT_subtexture, GL_EXT_texture,
   GL_EXT_texture3D, GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,
   GL_EXT_texture_object, GL_EXT_vertex_array, GL_APPLE_packed_pixels,
   GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat,
   GL_MESA_ycbcr_texture, GL_MESA_window_pos, GL_NV_texgen_reflection,
   GL_SGI_color_matrix, GL_SGI_color_table, GL_SGIS_generate_mipmap,
   GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod
glu version: 1.3
glu extensions:
   GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

  visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x23 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x24 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x25 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x26 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow
0x27 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x28 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x29 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x2a 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow
0x2b 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x2c 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x2d 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x2e 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow
0x2f 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x30 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x31 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x32 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow

Morgrog

this looks exactly like the problem I had

Make sure the the resolution your going into is available to your XServer (check your XFreeConfig86-4 file)

hth

Zakalwe

The error is from the MouseTest class which runs in a window. The window flashed up momentarily for me as the app bombs. Every one of the tests does this. I would understand if it was one test that went fullscreen, but this is them all.

Morgrog

800 on glxgears? that seems a bit low, but not as low as if you were using software rendering (or didn't have opengl enabled) (what kind of system do you have, I'm running a 2400+ with a Radeon 9600XT and getting 3k on glxgears)



do you use an ATI card? if I remember correctly you must not have dri enabled for the ati drivers to work correctly (Direct Rendering Manager in the character devices when u compile your kernel)

Bleh, this might just be rubbish

So you're saying that it crashes when running windowed?
and you're running the tests eh?

More info would be fun :(

Zakalwe

Sorry about the lateness of this reply. The machine is a pIII700 laptop with a Rage 128 . In software mode glxgears gives me 125fps. With DRI enabled I get 800+

As I said before, other GL apps work properly.

I've just got a newer laptop with a Radeon 7500 Mobility chipset which I will test out tomorrow. I'll let you know how I get on.

Zakalwe

Success!

I'm now using the unofficial 0.89 and have my GL4Java stuff all ported and working under LWJGL

The speed is VERY impressive. I love the keyboard and mouse handler interfaces.

I have noticed a few problems though. modes = Display.getAvailableDisplayModes(); modes
  • .freq for each valid x returns 0;  Could this not be set to 60 as a default if you can't read it on Linux?

    Window.setVSyncEnabled(true) doesn't work on Linux as noted in the sample's sources glxinfo tells me that GLX_SGI_video_sync is a valid extension on my card. Could this be used in the native part of lwjgl or is there some way for me to call it from Java?

elias

1. I don't think 60 is a valid "not known" value.

2. the linux v sync is implemented through GLX_SGI_swap_control. You can't access windowing system specific extensions in LWJGL from java.

- elias