Error While Changing scene


#1

I am getting following errors in my Eclipse Helios Logcat every time I change application Scene back and forth. These errors are random so can not write pattern and some times I am even getting these error and still application is executing. What can be the problem.

1. Crash

**08-06 16:03:47.202: W/dalvikvm: Exception thrown : error: null
08-06 16:03:48.093: E/Cocos2dxSound: java.lang.NullPointerException
08-06 16:03:48.093: E/Cocos2dxSound: at org.cocos2dx.lib.Cocos2dxSound.unloadEffect
08-06 16:03:48.093: E/Cocos2dxSound: at org.cocos2dx.lib.Cocos2dxActivity.unloadEffect
08-06 16:03:48.093: E/Cocos2dxSound: at org.cocos2dx.lib.Cocos2dxRenderer.nativeTouchesEnd
08-06 16:03:48.093: E/Cocos2dxSound: at org.cocos2dx.lib.Cocos2dxRenderer.handleActionUp
08-06 16:03:48.093: E/Cocos2dxSound: at org.cocos2dx.lib.Cocos2dxGLSurfaceView$10.run
08-06 16:03:48.093: E/Cocos2dxSound: at android.opengl.GLSurfaceView$GLThread.guardedRun
08-06 16:03:48.093: E/Cocos2dxSound: at android.opengl.GLSurfaceView$GLThread.run*
**08-06 16:03:48.123: A/libc(11213): Fatal signal 11 (SIGSEGV) at 0xfffe70a4 (code=1)*

2. Crash

**08-06 16:07:55.654: E/Cocos2dxSound: error: null
08-06 16:07:55.654: E/Cocos2dxSound: java.lang.NullPointerException
08-06 16:07:55.654: E/Cocos2dxSound: at org.cocos2dx.lib.Cocos2dxSound.unloadEffect
08-06 16:07:55.654: E/Cocos2dxSound: at org.cocos2dx.lib.Cocos2dxActivity.unloadEffect
08-06 16:07:55.654: E/Cocos2dxSound: at org.cocos2dx.lib.Cocos2dxRenderer.nativeTouchesEnd
08-06 16:07:55.654: E/Cocos2dxSound: at org.cocos2dx.lib.Cocos2dxRenderer.handleActionUp
08-06 16:07:55.654: E/Cocos2dxSound: at org.cocos2dx.lib.Cocos2dxGLSurfaceView$10.run
08-06 16:07:55.654: E/Cocos2dxSound: at android.opengl.GLSurfaceView$GLThread.guardedRun
08-06 16:07:55.654: E/Cocos2dxSound: at android.opengl.GLSurfaceView$GLThread.run*

**3. Crash*

08-06 16:10:41.616: W/dalvikvm: Exception thrown
08-06 16:10:41.616: A/libc: Fatal signal 11 at 0x015ea830
08-06 16:10:43.608: V/AudioTrack: Underrun user: 80000, server: 80000, flags 0002
08-06 16:10:43.608: V/AudioTrack: stop 0x166c278


#2

Check what pointer is null at:
at org.cocos2dx.lib.Cocos2dxSound.unloadEffect(Cocos2dxSound.java:92)

It seems to be related to the sound.


#3

Im getting same exception. When scene is changing. After app goes to background and resumes. then when i try to change scene.

So exception occurs here this.mSoundPool.unload(soundID); when soundID is null and path is not found.
Why there is no check if ID is null?