LWJGL example doesn't work under Linux with ATI Radeon 9250 Pro

If you feel lucky, my best guess at the critical commit would be 2969, where Display.setParent is implemented for linux.

EDIT: And beware of commit 2965, which broke a few examples, but later (post alpha 3) fixed.

  • elias

Ok I will try to check if it comes from this at first; otherwise I will use the method based on dichotomy as you suggested (I had already planned to do this in the worst case).

N.B: It is not finished. In a near future, I may have some other bugs to fix under LWJGL but I don’t know if I will have enough to investigate.

Why does Space Invaders work now on my machine??? Has something changed in LWJGL recently???

hmm, think elias changed some stuff to make linux 64 bit run from the jnlp - basically removed arch=“i386” from

But then why does GL Gears not work on my machine whereas Space Invaders does?

Gears does:

Display.setLocation((Display.getDisplayMode().getWidth() - 300) / 2, (Display.getDisplayMode().getHeight() - 300) / 2);
Display.setDisplayMode(new DisplayMode(300, 300));
Display.setTitle("Gears");
Display.create();

whereas space invaders does:

DisplayMode[] dm = org.lwjgl.util.Display.getAvailableDisplayModes(width, height, -1, -1, -1, -1, 60, 60);

org.lwjgl.util.Display.setDisplayMode(dm, new String[] {
    "width=" + width,
    "height=" + height,
    "freq=" + 60,
    "bpp=" + org.lwjgl.opengl.Display.getDisplayMode().getBitsPerPixel()
}); 

The later actually checks the available modes…
perhaps the default mode in Gears - and indeed many games that rely on the basic displaymode may have issues on youor card. The question is - what does it not like?

It’s probably the “freq=60” part, if linux reports “-1” or “0” for all modes.

  • elias

except that invaders is the one that actually works!

My home computer supports -1, you already know that it matches with the AWT constant REFRESH_RATE_UNKNOWN.

new DisplayMode(300,300) creates a display mode with the frequency at 0, it is a bit strange, isn’t it?

new DisplayMode(300,300) should be creating a very basic windowed display, which it should cope with perfectly adequately - that is, a GL display at the same bit depth as the desktop, with no specification for frequency. So it’s the windowed path that’s broken, somehow (which is odd because it’s usually the more reliable path)

Cas :slight_smile:

Maybe it is time to do what you suggested. I may do this Saturday.

I get this when I try to compile LWJGL revision 2961:

[quote]compile:
[apply] /usr/bin/ld: cannot find -lXxf86vm
[apply] collect2: ld returned 1 exit status

BUILD FAILED
/home/julien/Documents/programmation/java/java-game-lib/trunk/LWJGL/build.xml:598: The following error occurred while executing this line:
/home/julien/Documents/programmation/java/java-game-lib/trunk/LWJGL/build.xml:614: The following error occurred while executing this line:
/home/julien/Documents/programmation/java/java-game-lib/trunk/LWJGL/platform_build/linux_ant/build.xml:42: apply returned: 1
[/quote]
Please let me know what I have to do to work around this :’(

On ubuntu, you need the “libxxf86vm-dev” package

  • elias

libxxf86vm1-devel.rpm is already installed on my Mandriva Linux 2007 :frowning:

What about the basic libxxf86vm package? (without the -devel)

  • elias

libxxf86vm1.rpm is installed too:
libxxf86vm1 - Development files for libxxf86vm​ 
XFree86 Video Mode Extension Library
/usr/lib/libXxf86vm.so.1
‎/usr/lib/libXxf86vm.so.1.0.0

I installed the static development library and it worked ;D I have to go to the restaurant. I will perform the test tonight.

I enter this:

[quote]java -cp bin/:libs/ -Djava.library.path=libs/linux/ -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true org.lwjgl.examples.spaceinvaders.Game
[/quote]
and I get this:

[quote]Use -fullscreen for fullscreen mode
Xrandr extension version 1.1
Using Xrandr for display mode switching
XF86VidMode extension version 2.2
Initial mode: 1024 x 768 x 24 @60Hz
Removed 0 duplicate displaymodes
Available screen modes:
400 x 300 x 24 @60Hz
1024 x 768 x 24 @50Hz
640 x 480 x 24 @60Hz
832 x 624 x 24 @60Hz
1024 x 768 x 24 @60Hz
832 x 624 x 24 @50Hz
800 x 600 x 24 @60Hz
800 x 600 x 24 @56Hz
Sorted display modes:
800 x 600 x 24 @60Hz
832 x 624 x 24 @60Hz
1024 x 768 x 24 @60Hz
Attempting to set displaymode: 800 x 600 x 24 @60Hz
libGL warning: 3D driver claims to not support visual 0x4b
Pixel format info: r = 8, g = 8, b = 8, a = 8, depth = 24, stencil = 0, sample buffers = 0, samples = 0
getPathFromClassLoader: searching for: openal
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.Launcher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.URLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.security.SecureClassLoader.findLibrary(java.lang.String)
getPathFromClassLoader: searching for: lwjgl
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.Launcher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.URLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.security.SecureClassLoader.findLibrary(java.lang.String)
getPathFromClassLoader: searching for: lwjgl
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.Launcher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.URLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.security.SecureClassLoader.findLibrary(java.lang.String)
Found 6 OpenAL paths
Testing ‘libs/linux//libopenal.so’
Found OpenAL at ‘libs/linux//libopenal.so’
Unable to create from: null
java.lang.NullPointerException
at org.lwjgl.util.WaveData.create(WaveData.java:95)
at org.lwjgl.util.WaveData.create(WaveData.java:112)
at org.lwjgl.examples.spaceinvaders.SoundManager.addSound(SoundManager.java:154)
at org.lwjgl.examples.spaceinvaders.Game.initialize(Game.java:242)
at org.lwjgl.examples.spaceinvaders.Game.(Game.java:179)
at org.lwjgl.examples.spaceinvaders.Game.main(Game.java:580)
Exception in thread “main” java.lang.NullPointerException
at org.lwjgl.examples.spaceinvaders.SoundManager.addSound(SoundManager.java:157)
at org.lwjgl.examples.spaceinvaders.Game.initialize(Game.java:242)
at org.lwjgl.examples.spaceinvaders.Game.(Game.java:179)
at org.lwjgl.examples.spaceinvaders.Game.main(Game.java:580)
Mode 0: 1024x768 @60
XF86VidMode extension version 2.2
[/quote]
It happens in the revisions 2969 and 2990 too :frowning:

you need to add ‘res’ to the classpath for sound to be locatable

Ok but now I get a black screen whatever the version. I enter “ant clean” before compiling :frowning:

Edit.: even with the revision 3203, it does not work, I get only a black screen.