OpenAL broken in rc2

Started by EgonOlsen, September 17, 2008, 07:40:18

Previous topic - Next topic

EgonOlsen

Another problem with rc2  :'( :

On my home machine, OpenAL works fine. On my work machine (SoundMAX HD Audio solution, Windows XP), this comes up:

    Inable to initialize OpenAL
    ERROR MESSAGE:
        Could not locate OpenAL library.
    STACK TRACE:
        org.lwjgl.openal.AL.create(AL.java:153)
        org.lwjgl.openal.AL.create(AL.java:104)
        org.lwjgl.openal.AL.create(AL.java:191)
        paulscode.sound.LibraryOpenAL.init(LibraryOpenAL.java:72)
        paulscode.sound.SoundSystem.newLibrary(SoundSystem.java:1707)
        paulscode.sound.SoundSystem.init(SoundSystem.java:124)
        paulscode.sound.SoundSystem.<init>(SoundSystem.java:77)
        robombs.game.sound.SoundManager.<init>(SoundManager.java:44)
        robombs.game.sound.SoundManager.getInstance(SoundManager.java:29)
        robombs.game.util.SoundUtils.loadSounds(SoundUtils.java:8)
        robombs.game.BlueThunderClient.loadSounds(BlueThunderClient.java:1418)
        robombs.game.BlueThunderClient.run(BlueThunderClient.java:472)
        robombs.game.BlueThunderClient.selected(BlueThunderClient.java:138)
        robombs.game.startup.ResolutionFrame$1$1.run(ResolutionFrame.java:25)


Replacing the dll with the one from rc1 fixes the problem and sound is playing fine again.

Matzon

ok - I'll check that tonight

Matzon

No problems with audio ?

Quotelwjgl-2.0rc2>java -cp jar\jinput.jar;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar; -Djava.library.path=native\win32 org.lwjgl.test.openal.OpenALInfo
Available playback devices:
    DirectSound Software on Realtek HD Audio output
    Wave File Writer
Available capture devices:
    WaveIn on Realtek HD Audio Input
    WaveIn on Realtek HD Digital input
Default device: DirectSound Software
Default capture device: WaveIn on Realtek HD Audio Input
ALC version: 1.1
ALC extensions:
    ALC_ENUMERATE_ALL_EXT
    ALC_ENUMERATION_EXT
    ALC_EXT_CAPTURE
    ALC_EXT_EFX
OpenAL vendor string: OpenAL Community
OpenAL renderer string: OpenAL Soft
OpenAL version string: 1.1
AL extensions:
    AL_EXT_EXPONENT_DISTANCE
    AL_EXT_FLOAT32
    AL_EXT_IMA4
    AL_EXT_LINEAR_DISTANCE
    AL_EXT_MCFORMATS
    AL_EXT_OFFSET
    AL_LOKI_quadriphonic

EgonOlsen

Quote from: Matzon on September 17, 2008, 15:59:19
No problems with audio ?
On that particular machine? Actually no, albeit i can't try that Info-program ATM, because i'm not at work. I can try it tomorrow, but i doubt that it will work. Sounds work fine with LWJGL 1.x, 2.0rc1 and all other applications that i've tried. Just not with rc2.
I think the problem is, that rc2 relies on an installed version of OpenAL, i.e. on a OpenAL32.dll in the system-directory. If i rename that dll (that is present on my home but not on my work machine), rc1 still plays sound but rc2 fails even on the home machine with the same exception.
And why is the rc2 dll only one third of the size of the rc1 dll?

Matzon

http://matzon.dk/brian/lwjgl/openal-files.zip

All of them should be renamed to OpenAL32.dll

We have switched to OpenAL Soft because its smaller, self contained (ie. does not rely on wrap_oal and others).

Please try the above. None of the should depend on the system dll afaik ?

Maybe its a compiler issue ... The RC2 has been build with the release switch, which is why its smaller.

EgonOlsen

Ok...i've renamed the dll in system32 and tried all the dlls from your zip file. Here are the results:

MinSizeRel=fails
rc1-no-upx=works
rc1-upx=works
rc2-no-upx=fails
rc2-upx=fails
RelWithDebInfo=fails, but i don't see any additional debug information printed out!?


Does this help?

Edit: When i don't rename the OpenAL32.dll in system32, all of them work.

EgonOlsen

Here are some outputs from the OpenALInfo program:

rc1 (no matter if OpenAL32.dll in system32 is present or not):

E:\temp\test\lib\lwjgl-2.0rc2>java -cp jar\jinput.jar;jar\lwjgl.jar;jar\lwjgl_te
st.jar;jar\lwjgl_util.jar; -Djava.library.path=native\win32 org.lwjgl.test.opena
l.OpenALInfo
Available playback devices:
    DirectSound Software on Lautsprecher (2- Realtek High Definition Audio)
    DirectSound Software on Digitales Ausgabegerõt (HDMI) (2- High Definition Au
dio-Gerõt)
    DirectSound Software on Realtek Digital Output (2- Realtek High Definition A
udio)
    Wave File Writer
Available capture devices:
    WaveIn on Realtek Digital Input (2- Realt
Default device: DirectSound Software
Default capture device: WaveIn on Realtek Digital Input (2- Realt
ALC version: 1.1
ALC extensions:
    ALC_ENUMERATE_ALL_EXT
    ALC_ENUMERATION_EXT
    ALC_EXT_CAPTURE
    ALC_EXT_EFX
OpenAL vendor string: OpenAL Community
OpenAL renderer string: OpenAL Soft
OpenAL version string: 1.1
AL extensions:
    AL_EXT_EXPONENT_DISTANCE
    AL_EXT_FLOAT32
    AL_EXT_IMA4
    AL_EXT_LINEAR_DISTANCE
    AL_EXT_MCFORMATS
    AL_EXT_OFFSET
    AL_LOKI_quadriphonic


rc2 with OpenAL32.dll present in system32:

E:\temp\test\lib\lwjgl-2.0rc2>java -cp jar\jinput.jar;jar\lwjgl.jar;jar\lwjgl_te
st.jar;jar\lwjgl_util.jar; -Djava.library.path=native\win32 org.lwjgl.test.opena
l.OpenALInfo
Exception in thread "main" org.lwjgl.openal.OpenALException: Invalid Enum
        at org.lwjgl.openal.Util.checkALCError(Util.java:55)
        at org.lwjgl.openal.ALC10.alcIsExtensionPresent(ALC10.java:398)
        at org.lwjgl.test.openal.OpenALInfo.printALCInfo(OpenALInfo.java:84)
        at org.lwjgl.test.openal.OpenALInfo.execute(OpenALInfo.java:71)
        at org.lwjgl.test.openal.OpenALInfo.main(OpenALInfo.java:170)

(But sounds in my game are playing regardless of this with this combination...)

and finally: rc2 without the dll in system32:

E:\temp\test\lib\lwjgl-2.0rc2>java -cp jar\jinput.jar;jar\lwjgl.jar;jar\lwjgl_te
st.jar;jar\lwjgl_util.jar; -Djava.library.path=native\win32 org.lwjgl.test.opena
l.OpenALInfo
Init error Could not locate OpenAL library. occured
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.lwjgl.openal.ALC1
0.nalcIsExtensionPresent(JLjava/lang/String;)Z
        at org.lwjgl.openal.ALC10.nalcIsExtensionPresent(Native Method)
        at org.lwjgl.openal.ALC10.alcIsExtensionPresent(ALC10.java:397)
        at org.lwjgl.test.openal.OpenALInfo.printALCInfo(OpenALInfo.java:83)
        at org.lwjgl.test.openal.OpenALInfo.execute(OpenALInfo.java:71)
        at org.lwjgl.test.openal.OpenALInfo.main(OpenALInfo.java:170)


Matzon

please add: -Dorg.lwjgl.util.Debug=true

The 'rc2 with OpenAL32.dll present in system32:' is actually picking up the system oal == bad
The 'rc2 without the dll in system32:' is failing to load any dll at all == bad

So, somehow RC2 contains some stuff that your OS doesn't like - and I need some debug info to try and find out what changed.

EgonOlsen

No problem. Here are the results with rc2 and a dll in system32:

E:\temp\test\lib\lwjgl-2.0rc2>java -cp jar\jinput.jar;jar\lwjgl.jar;jar\lwjgl_te
st.jar;jar\lwjgl_util.jar; -Dorg.lwjgl.util.Debug=true -Djava.library.path=nativ
e\win32 org.lwjgl.test.openal.OpenALInfo
getPathFromClassLoader: searching for: OpenAL32
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.L
auncher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.U
RLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.secur
ity.SecureClassLoader.findLibrary(java.lang.String)
getPathFromClassLoader: searching for: lwjgl
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.L
auncher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.U
RLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.secur
ity.SecureClassLoader.findLibrary(java.lang.String)
Found 3 OpenAL paths
Testing 'native\win32\OpenAL32.dll'
Failed to load native\win32\OpenAL32.dll: Could not load OpenAL library (14001)
Testing 'E:\temp\test\lib\lwjgl-2.0rc2\OpenAL32.dll'
Failed to load E:\temp\test\lib\lwjgl-2.0rc2\OpenAL32.dll: Could not load OpenAL
 library (126)
Testing 'OpenAL32.dll'
Found OpenAL at 'OpenAL32.dll'
Exception in thread "main" org.lwjgl.openal.OpenALException: Invalid Enum
        at org.lwjgl.openal.Util.checkALCError(Util.java:55)
        at org.lwjgl.openal.ALC10.alcIsExtensionPresent(ALC10.java:398)
        at org.lwjgl.test.openal.OpenALInfo.printALCInfo(OpenALInfo.java:84)
        at org.lwjgl.test.openal.OpenALInfo.execute(OpenALInfo.java:71)
        at org.lwjgl.test.openal.OpenALInfo.main(OpenALInfo.java:170)


Edit: And the same thing for rc1:

E:\temp\test\lib\lwjgl-2.0rc2>java -cp jar\jinput.jar;jar\lwjgl.jar;jar\lwjgl_te
st.jar;jar\lwjgl_util.jar; -Dorg.lwjgl.util.Debug=true -Djava.library.path=nativ
e\win32 org.lwjgl.test.openal.OpenALInfo
getPathFromClassLoader: searching for: OpenAL32
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.L
auncher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.U
RLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.secur
ity.SecureClassLoader.findLibrary(java.lang.String)
getPathFromClassLoader: searching for: lwjgl
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.L
auncher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.U
RLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.secur
ity.SecureClassLoader.findLibrary(java.lang.String)
Found 3 OpenAL paths
Testing 'native\win32\OpenAL32.dll'
Found OpenAL at 'native\win32\OpenAL32.dll'
Available playback devices:
    DirectSound Software on Lautsprecher (2- Realtek High Definition Audio)
    DirectSound Software on Digitales Ausgabegerõt (HDMI) (2- High Definition Au
dio-Gerõt)
    DirectSound Software on Realtek Digital Output (2- Realtek High Definition A
udio)
    Wave File Writer
Available capture devices:
    WaveIn on Realtek Digital Input (2- Realt
Default device: DirectSound Software
Default capture device: WaveIn on Realtek Digital Input (2- Realt
ALC version: 1.1
ALC extensions:
    ALC_ENUMERATE_ALL_EXT
    ALC_ENUMERATION_EXT
    ALC_EXT_CAPTURE
    ALC_EXT_EFX
OpenAL vendor string: OpenAL Community
OpenAL renderer string: OpenAL Soft
OpenAL version string: 1.1
AL extensions:
    AL_EXT_EXPONENT_DISTANCE
    AL_EXT_FLOAT32
    AL_EXT_IMA4
    AL_EXT_LINEAR_DISTANCE
    AL_EXT_MCFORMATS
    AL_EXT_OFFSET
    AL_LOKI_quadriphonic

Matzon


EgonOlsen

Quote from: Matzon on September 17, 2008, 21:10:00
Not sure where to start - anyone else have this issue ?
I've tried it under Windows XP on the same machine (dual boot): The exact same problem with the same error number. I've also tried it on a secondary machine with Windows XP...the same error. And i bet the machine at work will print out the same.

EgonOlsen

I've just downloaded and installed the vcredist Runtime-stuff for Visual C++ 2008...now it works as expected. So i guess you are using some dll internally that "normal people" don't have!?

Edit: I've uninstalled VC++2008 Runtime again...now it fails again. So it definitely has something to do with this. I hope this helps to track down the problem.

Matzon

ok - this probably means that it has got something to do with my compiler. I am fairly sure that I compiled the last one in RC1 too though - so not sure whats going on!

Matzon


EgonOlsen