OpenALException

Hi,



i have an OpenAL error on starting the TestApplication.



INFO LwjglMouseInput 13:44:26 Mouse destroyed.

INFO LwjglKeyInput 13:44:26 Keyboard destroyed.

SCHWERWIEGEND Application 13:44:26 Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

org.lwjgl.openal.OpenALException: OpenAL error: Invalid Name (40961)

at org.lwjgl.openal.Util.checkALError(Util.java:64)

at org.lwjgl.openal.AL10.alDeleteSources(AL10.java:730)

at com.jme3.audio.lwjgl.LwjglAudioRenderer.cleanup(LwjglAudioRenderer.java:128)

at com.jme3.app.Application.destroy(Application.java:418)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.deinitInThread(LwjglAbstractDisplay.java:136)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:167)

at java.lang.Thread.run(Unknown Source)



When i start a test with the TestChooser the test runs without this error, but on stopping it appears.

Seems to deal with cleanup of sound resources.





P.S. Nice work guys, i'm very impressed of it, Keep it up!

I added some more checks in OpenAL and also fixed the bug in TestOgg. Please update from SVN :slight_smile:

I also get this error when anything extending SimpeApplication stops. I haven't tested if its that class that introduces the problem or not, but I dont think it is.

Hi,



thought I would add this here as I am not sure if this could be your problem.



When testing TestOgg.java under Test, I found a "missing" .Ogg file in the updateAudioApp function, but the path might just be wrong as a similarly named file is being loaded by the initAudioapp function.



The commented line below has the missing .Ogg file.


    @Override
    public void initAudioApp(){
        System.out.println("Playing without filter");
        src = new AudioNode(manager, "Sound/Effects/Foot steps.ogg", true);
        ar.playSource(src);
    }

    public void updateAudioApp(float tpf){
        if (src.getStatus() != AudioNode.Status.Playing){
            ar.deleteAudioData(src.getAudioData());

            System.out.println("Playing with low pass filter");
//            src = new AudioNode(manager, "sounds/footsteps.ogg", true);
            src = new AudioNode(manager, "Sound/Effects/Foot steps.ogg", true);
            src.setDryFilter(new LowPassFilter(1f, .5f));
            ar.playSource(src);
        }
    }



Cheers
Andy

I still have the same error, nothing changed after update.

Ah… I know why it happens now.

The ib IntBuffer still uses the limit from the createAttribs() call… So not all 16 channels are created initially. I fixed this bug now.

I talked on another thread about this, but I just checked out the svn and built and got the same stack overflow.  This is on Snow Leopard.



noonmac:jme3 rmnoon$ ant run
Buildfile: build.xml

-pre-init:

-init-private:

-pre-init-libraries:

-init-private-libraries:

-init-libraries:

-init-user:

-init-project:

-init-macrodef-property:

-do-init:

-post-init:

-init-check:

-init-macrodef-javac:

-init-macrodef-junit:

-init-debug-args:

-init-macrodef-nbjpda:

-init-macrodef-debug:

-init-macrodef-java:

-init-presetdef-jar:

init:

-deps-jar-init:
   [delete] Deleting: /Users/rmnoon/acode/jme3/build/built-jar.properties

deps-jar:

-warn-already-built-jar:
[propertyfile] Updating property file: /Users/rmnoon/acode/jme3/build/built-jar.properties

-check-automatic-build:

-clean-after-automatic-build:

-verify-automatic-build:

-pre-pre-compile:

-pre-compile:

-compile-depend:

-do-compile:
    [javac] Compiling 2 source files to /Users/rmnoon/acode/jme3/build/classes

-post-compile:

compile:

run:
     [java] Jun 21, 2010 2:43:57 PM jme3test.TestChooser start
     [java] INFO: Composing Test list...
     [java] Jun 21, 2010 2:43:57 PM jme3test.TestChooser find
     [java] INFO: Searching for Demo classes in "jme3test".
     [java] Creating application..
     [java] Jun 21, 2010 2:44:07 PM com.jme3.asset.DesktopAssetManager <init>
     [java] Starting application in LWJGL mode..
     [java] INFO: DesktopAssetManager created.
     [java] INFO JmeSystem 2:44:07 PM Running on jMonkey Engine 3 ALPHA 0.50
     [java] INFO Natives 2:44:07 PM Extraction Directory #1: file:/Users/rmnoon/acode/jme3/build/classes/com/jme3/system/
     [java] INFO Natives 2:44:07 PM Extraction Directory #2: /Users/rmnoon/acode/jme3
     [java] INFO Natives 2:44:07 PM Extraction Directory #3: /Users/rmnoon/acode/jme3
     [java] Waiting 5 seconds
     [java] INFO LwjglAbstractDisplay 2:44:07 PM Using LWJGL 2.4.2
     [java] INFO LwjglDisplay 2:44:07 PM Selected display mode: 640 x 480 x 0 @0Hz
     [java] INFO LwjglAbstractDisplay 2:44:07 PM Display created.
     [java] INFO LwjglAbstractDisplay 2:44:07 PM Adapter: null
     [java] INFO LwjglAbstractDisplay 2:44:07 PM Driver Version: null
     [java] INFO LwjglAbstractDisplay 2:44:07 PM Vendor: NVIDIA Corporation
     [java] INFO LwjglAbstractDisplay 2:44:07 PM OpenGL Version: 2.1 NVIDIA-1.6.10
     [java] INFO LwjglAbstractDisplay 2:44:07 PM Renderer: NVIDIA GeForce GT 330M OpenGL Engine
     [java] INFO LwjglAbstractDisplay 2:44:07 PM GLSL Ver: 1.20
     [java] INFO LwjglTimer 2:44:07 PM Timer resolution: 1000 ticks per second
     [java] INFO Camera 2:44:08 PM Camera created (W: 640, H: 480)
     [java] INFO LwjglMouseInput 2:44:08 PM Mouse created.
     [java] INFO LwjglKeyInput 2:44:08 PM Keyboard created.
     [java] SEVERE Application 2:44:08 PM Uncaught exception thrown in Thread[LWJGL Renderer Thread,6,main]
     [java] java.lang.StackOverflowError
     [java]    at java.nio.ByteBuffer.<init>(ByteBuffer.java:259)
     [java]    at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:52)
     [java]    at java.nio.ByteBuffer.wrap(ByteBuffer.java:350)
     [java]    at java.lang.StringCoding$StringDecoder.decode(StringCoding.java:137)
     [java]    at java.lang.StringCoding.decode(StringCoding.java:173)
     [java]    at java.lang.StringCoding.decode(StringCoding.java:185)
     [java]    at java.lang.String.<init>(String.java:570)
     [java]    at java.lang.String.<init>(String.java:593)
     [java]    at org.lwjgl.openal.ALC10.nalcGetString(Native Method)
     [java]    at org.lwjgl.openal.ALC10.alcGetString(ALC10.java:155)
     [java]    at org.lwjgl.openal.Util.checkALCError(Util.java:55)
     [java]    at org.lwjgl.openal.ALC10.alcGetString(ALC10.java:156)
     [java]    at org.lwjgl.openal.Util.checkALCError(Util.java:55)
     [java]    at org.lwjgl.openal.ALC10.alcGetString(ALC10.java:156)
     [java]    at org.lwjgl.openal.Util.checkALCError(Util.java:55)

...continuing on until we're out of stack space

I've reverted that particular file to a revision that is known to work on Mac. So everything should work now.

It works now, bug fixed and solved  :smiley: