IllegalArgumentException when switching between fragments

Hi Everyone,
I have a consistent problem:
In my Android application I switch between two fragments , one of them is AndroidHarnessFragment fragment
Every time I reach the 4th switch I’m getting this exception:

java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Buffer.java:276)
at com.jme3.audio.openal.ALAudioRenderer.initOpenAL(ALAudioRenderer.java:152)
at com.jme3.audio.openal.ALAudioRenderer.initialize(ALAudioRenderer.java:225)
at com.jme3.app.LegacyApplication.initAudio(LegacyApplication.java:283)
at com.jme3.app.LegacyApplication.initialize(LegacyApplication.java:603)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:178)
at com.jme3.app.AndroidHarnessFragment.initialize(AndroidHarnessFragment.java:556)
at com.jme3.system.android.OGLESContext.onDrawFrame(OGLESContext.java:334)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1608)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1299)

I guess it has something to do with memory leak, not cleaning\closing the fragment before switching etc.

What do you think?
Thank you

Just use and re use one. Why are you making so many?

I’m not making many. I’m switching between 2 fragments. one of them is AndroidHarnessFragment . something happens when switching. I don’t know what… after 4 switches I’m getting this crash

When you create the harness, you’re starting your game. You only need one. You should just use that for all of your AndroidHarness needs. That’s your entry point. When you create many you are creating another instance of a running engine and all that goes with it.