only intermittent with JME3, most of the time the error don’t shows up
i use Vista
anybody had this problem ? looks like a bug to me as it is intermittent
do i have to install open al ?
It might happen if you don’t have a sound card or the sound device is disabled. Can also happen if its “reserved” by certain applications. Check to make sure other apps have sound. Otherwise, jME3 should still run even with this error.
thx a lot for your help mate
that’s what i assumed, but it happens even if no other app is using the global audio mixer/driver
anyways, i hope it won’t do it as i publish the game
question : how do i catch that exeption ?
so i can display a dialog to the user instead of having the app crash
You can add a log handler that will call a dialog box when it sees that exception.
By the way, can you post the full stack trace? There’s actually many reasons why it might happen, so I could be wrong about what I said.
here you go
AL lib: MMDevApiOpenPlayback: Device init failed: 0x80004005
févr. 28, 2012 4:58:15 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
Grave: Failed to load audio library
org.lwjgl.LWJGLException: Could not locate OpenAL library.
at org.lwjgl.openal.AL.create(AL.java:151)
at org.lwjgl.openal.AL.create(AL.java:102)
at org.lwjgl.openal.AL.create(AL.java:201)
at com.jme3.audio.lwjgl.LwjglAudioRenderer.initInThread(LwjglAudioRenderer.java:163)
at com.jme3.audio.lwjgl.LwjglAudioRenderer.run(LwjglAudioRenderer.java:123)
at java.lang.Thread.run(Thread.java:722)
log handler (jme ?) or log4j ans os forth …?
i’ll check the jme logging doc …
@rompelstilchen said:
AL lib: MMDevApiOpenPlayback: Device init failed: 0x80004005
févr. 28, 2012 4:58:15 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
Grave: Failed to load audio library
org.lwjgl.LWJGLException: Could not locate OpenAL library.
at org.lwjgl.openal.AL.create(AL.java:151)
at org.lwjgl.openal.AL.create(AL.java:102)
at org.lwjgl.openal.AL.create(AL.java:201)
at com.jme3.audio.lwjgl.LwjglAudioRenderer.initInThread(LwjglAudioRenderer.java:163)
at com.jme3.audio.lwjgl.LwjglAudioRenderer.run(LwjglAudioRenderer.java:123)
at java.lang.Thread.run(Thread.java:722)
Yes this usually happens for the reasons I mentioned.
@rompelstilchen said:
log handler (jme ?) or log4j ans os forth ...?
i'll check the jme logging doc ...
jME3 uses standard Java logger
ok
but i never used a custom log handler
from the examples i found on the net (http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Frtrb_createhandler.html)
if i create a custom handler
then i would call my initializing function from it’s contructor ?
i don’t get it
why not using just a try catch in my initializing function ?
yep i have been checking again, i don’t see how to catch that exception, it is not part of my code
i have tried this but it does not work
You will need to extend java.util.logging.Handler class and then add it to the LwjglAudioRenderer’s logger, e.g.
[java]Logger.getLogger(“com.jme3.audio.lwjgl.LwjglAudioRenderer”).addHandler(yourHandlerGoesHere)[/java]
thx mate