Latest android SDL2 crashes on some phones when loading/playing sound files

Hi,

I have developed a game with SDL2 that runs on all android devices with
graphics acceleration.
It runs fine on android phones and tablets too.

My develop machine is:
Windows 7 Ultimate 64, Latest android NDK, Eclipse, Latest official SDL2
Android.
Libraries I use: SDL2,SDL2_image,SDL2_mixer,SDL2_ttf
I build them in: “APP_ABI := armeabi armeabi-v7a”

The problem is that some Samsung models (Eg: Samsung Galaxy SIII Europe)
crash when loading sound files or when playing sounds.
If I deactivate the sound, the game runs fine on all models.
I always store my data (images, sound, fonts) in the external memory and
not the apk.
(I download the data after the user installs the apk from my server)

I cannot find the reason of the crash, and its been too long:
Here are 2 debug crashes on different phone models (SIII is one of them):----------------------------------------------------------------------------------------------------------------------------------
11-20 16:01:06.976 V/SDLA A A A (17417): SDL audio: wanted stereo 16-bit
44.1kHz, 1024 frames buffer
11-20 16:01:06.976 V/AudioPolicyManagerBase( 1904): getDeviceForStrategy()
from cache strategy 0, device 2
11-20 16:01:06.976 V/AudioPolicyManagerBase( 1904): getOutput() stream 3,
samplingRate 0, format 0, channels 3, flags 0
11-20 16:01:06.976 D/AudioPolicyManagerBase( 1904):
AudioPolicyManager::getOutput tmsDevice 0 device 2
11-20 16:01:06.976 V/AudioPolicyManagerBase( 1904): getOutput() using hw
output 1 devices 2
11-20 16:01:06.981 I/ClipboardServiceEx( 2092): Send intent for dismiss
clipboard dialog inside hideCurrentInputLocked() !
11-20 16:01:06.981 I/SurfaceFlinger( 1901): id=954 Removed theodyssey
idx=5 Map Size=6
11-20 16:01:06.981 I/SurfaceFlinger( 1901): id=954 Removed theodyssey
idx=-2 Map Size=6
11-20 16:01:06.981 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:06.981 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:06.986 I/ReverbA (17417):A getpid() 17417,
IPCThreadState::self()->getCallingPid() 17417
11-20 16:01:06.986 D/CLIPBOARD(17417): Hide Clipboard dialog at Starting
input: finished by someone else… !
11-20 16:01:06.986 I/ClipboardServiceEx( 2092): mCBPickerDialog enter
case. MSG_DISMISS_DIALOG
11-20 16:01:06.986 D/OpenGLRenderer( 9830): Flushing caches (mode 0)
11-20 16:01:06.986 V/SDLA A A A (17417): SDL audio: got stereo 16-bit
44.1kHz, 4096 frames buffer
11-20 16:01:06.986 V/AudioPolicyManagerBase( 1904): startOutput() output
1, stream 3, session 58
11-20 16:01:06.986 V/AudioPolicyManagerBase( 1904): getDeviceForStrategy()
from cache strategy 0, device 2
11-20 16:01:06.986 V/AudioPolicyManagerBase( 1904): changeRefCount()
stream 3, count 1
11-20 16:01:06.986 V/AudioPolicyManagerBase( 1904): getDeviceForStrategy()
from cache strategy 0, device 2
11-20 16:01:06.986 V/AudioPolicyManagerBase( 1904): getNewDevice()
selected device 2
11-20 16:01:06.986 V/AudioPolicyManager( 1904): setOutputDevice() output 1
device 2 delayMs 0 force 0
11-20 16:01:06.986 V/AudioPolicyManager( 1904): setOutputDevice() setting
same device 2 or null device for output 1
11-20 16:01:06.986 V/AudioPolicyManagerBase( 1904): getDeviceForStrategy()
strategy 0, device 2
11-20 16:01:06.986 V/AudioPolicyManagerBase( 1904): getNewDevice()
selected device 2
11-20 16:01:06.986 D/AudioPolicyManagerBase( 1904): return MUSIC_SPK
index=10
11-20 16:01:06.986 V/AudioPolicyManagerBase( 1904): getDeviceForStrategy()
strategy 0, device 2
11-20 16:01:06.986 V/AudioPolicyManagerBase( 1904): getNewDevice()
selected device 2
11-20 16:01:06.991 I/AudioHardwareTinyALSA( 1904):
AudioStreamOutALSA::write setDevice
11-20 16:01:06.991 D/AudioHardwareTinyALSA( 1904): OutALSA::setDevice:
mode = 0, newDevice=0x2, currentDevice=0x2 ,force= 0
11-20 16:01:06.991 D/AudioHardwareTinyALSA( 1904): OutALSA::setDevice:
mDevice 0x2, newDevice = 0x2
11-20 16:01:06.991 D/AudioHardwareTinyALSA( 1904): setOutputVolume
11-20 16:01:06.991 D/TinyUCM ( 1904): setModifier Normal, en=1
11-20 16:01:06.991 I/AudioHardwareTinyALSA( 1904): OutALSA::setDevice:
mHandle NULL mode[0], Device[00000002]
11-20 16:01:06.991 I/AudioHardwareTinyALSA( 1904): Open:
mDefaults->direction=0 device=0
11-20 16:01:06.991 D/AudioHardwareTinyALSA( 1904): Channel: 2, Samplerate:
44100, Format: 0, Peroid Size: 1024, Period Count: 4
11-20 16:01:06.991 I/AudioHardwareTinyALSA( 1904): before pcm_prepare
11-20 16:01:06.991 D/AudioHardwareTinyALSA( 1904): setPcmInterface:
Stream=0x1, iSamplerate=8000++
11-20 16:01:06.991 D/AudioHardwareTinyALSA( 1904): setPcmInterface–
11-20 16:01:07.051 I/SurfaceFlinger( 1901): id=953 Removed Launcher idx=1
Map Size=5
11-20 16:01:07.051 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.056 I/SurfaceFlinger( 1901): id=953 Removed Launcher idx=-2
Map Size=5
11-20 16:01:07.056 W/IInputConnectionWrapper( 9830): showStatusIcon on
inactive InputConnection
11-20 16:01:07.056 W/InputManagerService( 2092): Starting input on
non-focused client
com.android.internal.view.IInputMethodClient$Stub$Proxy@41e591f8
(uid=10001 pid=9830)
11-20 16:01:07.056 V/InputManagerService( 2092): Starting input on
non-focused client mCurClient info is ClientState{42160410 uid 10274 pid
17417}
11-20 16:01:07.076 D/Launcher.HomeFragment( 9830): onStop
11-20 16:01:07.076 D/Launcher.Workspace( 9830): onStop
11-20 16:01:07.076 D/Launcher( 9830): onStop
11-20 16:01:07.076 D/dalvikvm( 2213): GC_FOR_ALLOC freed 1552K, 36% free
25791K/39943K, paused 36ms
11-20 16:01:07.111 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.126 I/SurfaceFlinger( 1901): id=958(414) createSurface
(2560x720),-1 flag=20000, BlackSurface
11-20 16:01:07.156 I/SurfaceFlinger( 1901): id=959(415) createSurface
(1280x1440),-1 flag=20000, BlackSurface
11-20 16:01:07.156 I/SurfaceFlinger( 1901): id=960(416) createSurface
(2560x720),-1 flag=20000, BlackSurface
11-20 16:01:07.166 I/SurfaceFlinger( 1901): id=961(417) createSurface
(1280x1440),-1 flag=20000, BlackSurface
11-20 16:01:07.166 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.171 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.171 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.176 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.181 V/PhoneStatusBar( 2213): setLightsOn(true)
11-20 16:01:07.186 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.191 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.196 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.201 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.216 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.236 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.251 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.266 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.281 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.296 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.316 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.331 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.346 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.361 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.376 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.391 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.411 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.426 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.441 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.461 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.476 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.491 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.506 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.526 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.541 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.551 I/powerA A ( 2092): *** release_dvfs_lock : lockType :
1
11-20 16:01:07.551 D/PowerManagerService( 2092): releaseDVFSLockLocked :
all DVFS_MIN_LIMIT are released
11-20 16:01:07.556 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.556 D/CustomFrequencyManagerService( 2092): releaseGPU ->
count of GPU locks :0
11-20 16:01:07.556 D/CustomFrequencyManagerService( 2092): ###
revertGPUToDefault : 0
11-20 16:01:07.576 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.591 D/KeyguardViewMediator( 2092): setHidden false
11-20 16:01:07.591 I/SurfaceFlinger( 1901): id=955 Removed FreezeSurface
idx=11 Map Size=5
11-20 16:01:07.591 I/SurfaceFlinger( 1901): id=955 Removed FreezeSurface
idx=-2 Map Size=5
11-20 16:01:07.591 I/SurfaceFlinger( 1901): id=958 Removed BlackSurface
idx=7 Map Size=5
11-20 16:01:07.591 I/SurfaceFlinger( 1901): id=959 Removed BlackSurface
idx=7 Map Size=5
11-20 16:01:07.591 I/SurfaceFlinger( 1901): id=958 Removed BlackSurface
idx=-2 Map Size=5
11-20 16:01:07.591 I/SurfaceFlinger( 1901): id=959 Removed BlackSurface
idx=-2 Map Size=5
11-20 16:01:07.591 I/SurfaceFlinger( 1901): id=960 Removed BlackSurface
idx=7 Map Size=5
11-20 16:01:07.591 I/SurfaceFlinger( 1901): id=960 Removed BlackSurface
idx=-2 Map Size=5
11-20 16:01:07.591 I/SurfaceFlinger( 1901): id=961 Removed BlackSurface
idx=7 Map Size=5
11-20 16:01:07.596 I/SurfaceFlinger( 1901): id=961 Removed BlackSurface
idx=-2 Map Size=5
11-20 16:01:07.596 V/WindowManager( 2092):
rotationForOrientationLw(orient=0, last=1); user=0A mLidOpen=-1
mDockMode=0 mHdmiPlugged=false mAccelerometerDefault=1 sensorRotation=-1
11-20 16:01:07.926 I/The Odyssey(17417): Mix_LoadWAV: Error reading from
datastream
11-20 16:01:07.956 F/libcA A A (17417): Fatal signal 11 (SIGSEGV) at
0x00000004 (code=1)
11-20 16:01:08.046 D/lightsA ( 2092): button : 2 +
11-20 16:01:08.046 D/lightsA ( 2092): button : 2 -
11-20 16:01:08.046 W/PowerManagerService( 2092): Timer 0x7->0x3|0x0
11-20 16:01:08.046 I/PowerManagerService( 2092): Ulight 0x7->0x3|0x0
11-20 16:01:08.046 D/PowerManagerService( 2092): setLightBrightness :
mButtonLight : 0
11-20 16:01:08.461 I/DEBUGA A ( 9353): *** *** *** *** *** *** *** ***


11-20 16:01:08.461 I/DEBUGA A ( 9353): Build fingerprint:
'samsung/m0xx/m0:4.0.4/IMM76D/I9300XXBLG8:user/release-keys’
11-20 16:01:08.461 I/DEBUGA A ( 9353): pid: 17417, tid: 17430A >>>
com.crazysoft.theodyssey <<<
11-20 16:01:08.461 I/DEBUGA A ( 9353): signal 11 (SIGSEGV), code 1
(SEGV_MAPERR), fault addr 00000004
11-20 16:01:08.466 I/DEBUGA A ( 9353):A r0 00000000A r1 00000000A r2
00000001A r3 00000001
11-20 16:01:08.466 I/DEBUGA A ( 9353):A r4 4008857cA r5 00000001A r6
00000000A r7 ffffffff
11-20 16:01:08.466 I/DEBUGA A ( 9353):A r8 5c56955cA r9 00000004A 10
5c454114A fp 00000004
11-20 16:01:08.466 I/DEBUGA A ( 9353):A ip 00000000A sp 5c569520A lr
40055ea0A pc 4005ec1cA cpsr 60000030
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d0A 1000010700000000A d1A
0000000000000000
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d2A 0000000000000000A d3A
000002d0c3b40000
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d4A 0000000000000000A d5A
0000ac443f800000
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d6A 4000000000000000A d7A
4000000000000000
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d8A 3e875f703fc00000A d9A
0000000000000000
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d10 0000000000000000A d11
0000000000000000
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d12 0000000000000000A d13
0000000000000000
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d14 0000000000000000A d15
0000000000000000
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d16 4000000000000000A d17
3eb6201867564ad0
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d18 bf56bf68b6314626A d19
3f1f865fd80117f2
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d20 3fa55553e1053a42A d21
3f1f865fd80117f2
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d22 00ffffff00ffffffA d23
00ffffff00ffffff
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d24 00ffffff00ffffffA d25
00ffffff00ffffff
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d26 00ffffff00ffffffA d27
3ef99342e0ee5069
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d28 00ffffff00ffffffA d29
00ffffff00ffffff
11-20 16:01:08.466 I/DEBUGA A ( 9353):A d30 00ffffff00ffffffA d31
00ffffff00ffffff
11-20 16:01:08.466 I/DEBUGA A ( 9353):A scr 60000010
11-20 16:01:08.466 I/DEBUGA A ( 9353):
11-20 16:01:08.676 I/DEBUGA A ( 9353):A A A A A A A A A #00A pc
0001ac1cA /system/lib/libc.so (fread)
11-20 16:01:08.676 I/DEBUGA A ( 9353):A A A A A A A A A #01A pc
0002e4e4A /data/data/com.crazysoft.theodyssey/lib/libSDL2.so
11-20 16:01:08.676 I/DEBUGA A ( 9353):A A A A A A A A A #02A pc
0002e7aeA /data/data/com.crazysoft.theodyssey/lib/libSDL2.so
(SDL_ReadLE32)
11-20 16:01:08.676 I/DEBUGA A ( 9353):A A A A A A A A A #03A pc
000079aaA /data/data/com.crazysoft.theodyssey/lib/libSDL2_mixer.so
(Mix_LoadWAV_RW)
11-20 16:01:08.681 I/DEBUGA A ( 9353):A A A A A A A A A #04A pc
001136d8A /data/data/com.crazysoft.theodyssey/lib/libmain.so
(_Z10loadSoundsv)
11-20 16:01:08.681 I/DEBUGA A ( 9353):A A A A A A A A A #05A pc
00023304A /data/data/com.crazysoft.theodyssey/lib/libmain.so
(Z8loadMainj)
11-20 16:01:08.681 I/DEBUGA A ( 9353):A A A A A A A A A #06A pc
000260f0A /data/data/com.crazysoft.theodyssey/lib/libmain.so
(Z9move_Initv)
11-20 16:01:08.681 I/DEBUGA A ( 9353):
11-20 16:01:08.681 I/DEBUGA A ( 9353): code around pc:
11-20 16:01:08.681 I/DEBUGA A ( 9353): 4005ebfc 468b4680 461e4615
0f00f1b9 464dd101A .F.F.F.F…MF
11-20 16:01:08.681 I/DEBUGA A ( 9353): 4005ec0c 496ae0ce 68035860
4630b113 fedef7ffA …jIX.h..0F.... 11-20 16:01:08.681 I/DEBUGA A ( 9353): 4005ec1c 2a006872 2300da01 f8b66073 ea5fc00cA rh.*...#s
.
11-20 16:01:08.681 I/DEBUGA A ( 9353): 4005ec2c f140738c 6bf080a1
f0402800 4b60809dA .s@…k.(@…K 11-20 16:01:08.681 I/DEBUGA A ( 9353): 4005ec3c 681158e2 f7ffb909 89b2fd71 60702000A .X.h....q.... p
11-20 16:01:08.681 I/DEBUGA A ( 9353):
11-20 16:01:08.681 I/DEBUGA A ( 9353): code around lr:
11-20 16:01:08.681 I/DEBUGA A ( 9353): 40055e80 eaffffe6 e3e01102
eaffffe4 e92d4070A …p@-.
11-20 16:01:08.681 I/DEBUGA A ( 9353): 40055e90 e1a05000 f57ff05f
e5904000 ebffede3A .P…
…@…
11-20 16:01:08.681 I/DEBUGA A ( 9353): 40055ea0 e2044a02 e3843001
e1500003 08bd8070A .J…0…P.p…
11-20 16:01:08.681 I/DEBUGA A ( 9353): 40055eb0 e5854000 e1a00005
e1a01004 e3a02001A .@… …
11-20 16:01:08.681 I/DEBUGA A ( 9353): 40055ec0 e8bd4070 eaffffd1
e92d4ff0 e24dd024A p@…O-.$.M.
11-20 16:01:08.681 I/DEBUGA A ( 9353):
11-20 16:01:08.681 I/DEBUGA A ( 9353): stack:
11-20 16:01:08.681 I/DEBUGA A ( 9353):A A A A 5c5694e0A 022371a0A
[heap]
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c5694e4A 0208d9e8A
[heap]
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c5694e8A 5c569504A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c5694ecA 021257c0A
[heap]
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c5694f0A 5c56955cA
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c5694f4A 00000004A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c5694f8A 5c454114A
/data/data/com.crazysoft.theodyssey/lib/libmain.so
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c5694fcA 4005ea3fA
/system/lib/libc.so
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569500A 00000000A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569504A 00000001A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569508A 00000001A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c56950cA 4008857cA
/system/lib/libc.so
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569510A 00000001A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569514A 00000000A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569518A df0027adA
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c56951cA 00000000A
11-20 16:01:08.686 I/DEBUGA A ( 9353): #00 5c569520A 00000000A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569524A 021e9d70A
[heap]
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569528A 00000000A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c56952cA 00000001A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569530A ffffffffA
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569534A 5c453a6cA
/data/data/com.crazysoft.theodyssey/lib/libmain.so
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569538A 5c454110A
/data/data/com.crazysoft.theodyssey/lib/libmain.so
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c56953cA 5c454114A
/data/data/com.crazysoft.theodyssey/lib/libmain.so
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569540A 00000001A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569544A 5bf384e7A
/data/data/com.crazysoft.theodyssey/lib/libSDL2.so
11-20 16:01:08.686 I/DEBUGA A ( 9353): #01 5c569548A 00000001A
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c56954cA 5bf384d5A
/data/data/com.crazysoft.theodyssey/lib/libSDL2.so
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569550A 021e9d70A
[heap]
11-20 16:01:08.686 I/DEBUGA A ( 9353):A A A A 5c569554A 5bf387b1A
/data/data/com.crazysoft.theodyssey/lib/libSDL2.so
11-20 16:01:09.271 D/dalvikvm( 2092): GC_EXPLICIT freed 767K, 31% free
24611K/35463K, paused 3ms+8ms
11-20 16:01:10.201 W/SignalStrength( 2092): getGsmLevel=4

11-21 14:48:18.530 V/SDLA A A A ( 4020): SDL audio: wanted stereo 16-bit
44.1kHz, 1024 frames buffer
11-21 14:48:18.530 V/AudioPolicyManager(A 228): getDeviceForStrategy()
from cache strategy 0, device 2
11-21 14:48:18.530 V/AudioPolicyManager(A 228):
AudioPolicyManager::getOutput() stream 3, samplingRate 0, format 0,
channels c, flags 0
11-21 14:48:18.538 V/AudioFlinger(A 228): registerClient() client
0x267208, pid 4020
11-21 14:48:18.538 V/AudioFlinger(A 228): sendConfigEvent() num events 1
event 0, param 0
11-21 14:48:18.538 V/AudioFlinger(A 228): AudioFlinger::createTrack()
sampleRate 44100, format 1, channelCount 2, frameCount 7840
11-21 14:48:18.538 V/AudioFlinger(A 228): createTrack() sessionId: 0
11-21 14:48:18.538 V/AudioFlinger(A 228): createTrack() lSessionId: 137
11-21 14:48:18.538 V/AudioFlinger(A 228): Track constructor name 4098,
calling thread 4020
11-21 14:48:18.538 V/AudioFlinger(A 228):
PlaybackThread::audioConfigChanged_l, thread 0x62268, event 0, param 0
11-21 14:48:18.546 V/SDLA A A A ( 4020): SDL audio: got stereo 16-bit
44.1kHz, 7840 frames buffer
11-21 14:48:18.546 V/AudioTrack( 4020): start 0x21fb10
11-21 14:48:18.553 V/AudioFlinger(A 228): start(4098), calling thread
4020 session 137
11-21 14:48:18.553 V/AudioFlinger(A 228): ? => ACTIVE (4098) on thread
0xc7000
11-21 14:48:18.553 D/A2dpAudioInterface(A 228):
A2dpAudioInterface::getParameters
11-21 14:48:18.553 E/AudioPolicyManager(A 228):
AudioPolicyManager::isRealCall() nRealCall:0
11-21 14:48:18.553 V/AudioPolicyManager(A 228): startOutput() output 1,
stream 3, session 137, isRealCall 0, mPhoneOutput 0
11-21 14:48:18.553 V/AudioPolicyManager(A 228): startOutput()
mHardwareOutput 1, output 1, mPhoneState 0, mRefCount 0, isInCall() 0,
m_VoipChecking 0
11-21 14:48:18.553 V/AudioPolicyManager(A 228): getDeviceForStrategy()
from cache strategy 0, device 2
11-21 14:48:18.553 V/AudioPolicyManager(A 228): getNewDevice() selected
device 2
11-21 14:48:18.553 V/AudioPolicyManager(A 228): setOutputDevice() output
1 device 2 delayMs 0
11-21 14:48:18.553 V/AudioPolicyManager(A 228): setOutputDevice() setting
same device 2 or null device for output 1
11-21 14:48:18.553 V/AudioPolicyManager(A 228): getDeviceForStrategy()
strategy 0, device 2
11-21 14:48:18.553 V/AudioPolicyManager(A 228): getNewDevice() selected
device 2
11-21 14:48:18.553 V/AudioFlinger(A 228): mWaitWorkCV.broadcast
11-21 14:48:18.553 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1
11-21 14:48:18.553 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1
11-21 14:48:18.718 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1
11-21 14:48:18.874 D/dalvikvm( 3944): GC_CONCURRENT freed 684K, 49% free
3757K/7239K, external 961K/1473K, paused 3ms+6ms
11-21 14:48:18.921 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1
11-21 14:48:19.077 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1
11-21 14:48:19.257 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1
11-21 14:48:19.460 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1
11-21 14:48:19.593 I/DEBUGA A (A 223): *** *** *** *** *** *** *** ***


11-21 14:48:19.593 I/DEBUGA A (A 223): Build fingerprint:
'samsung/GT-S5690/GT-S5690:2.3.6/GINGERBREAD/XXLE5:user/release-keys’
11-21 14:48:19.593 I/DEBUGA A (A 223): pid: 4020, tid: 4027A >>>
com.crazysoft.theodyssey <<<
11-21 14:48:19.593 I/DEBUGA A (A 223): signal 11 (SIGSEGV), code 1
(SEGV_MAPERR), fault addr 00000004
11-21 14:48:19.593 I/DEBUGA A (A 223):A r0 46f2e4b4A r1 00000004A r2
00000001A r3 00000000
11-21 14:48:19.593 I/DEBUGA A (A 223):A r4 00000001A r5 afd41524A r6
00000000A r7 ffffffff
11-21 14:48:19.593 I/DEBUGA A (A 223):A r8 00000004A r9 8140b110A 10
00000004A fp 00000001
11-21 14:48:19.593 I/DEBUGA A (A 223):A ip 80a82d6cA sp 46f2e480A lr
80a2e4e7A pc afd18fc4A cpsr 20000030
11-21 14:48:19.593 I/DEBUGA A (A 223):A d0A 3ef99342e0ee5069A d1A
3ef993423f800000
11-21 14:48:19.593 I/DEBUGA A (A 223):A d2A 3f1f865fd80117f2A d3A
00000000dba87af4
11-21 14:48:19.593 I/DEBUGA A (A 223):A d4A bf81495400000000A d5A
3f8000004f000000
11-21 14:48:19.600 I/DEBUGA A (A 223):A d6A 409b43d500000007A d7A
0000000040e00000
11-21 14:48:19.600 I/DEBUGA A (A 223):A d8A 3e875f703fc00000A d9A
0000000000000000
11-21 14:48:19.600 I/DEBUGA A (A 223):A d10 0000000000000000A d11
0000000000000000
11-21 14:48:19.600 I/DEBUGA A (A 223):A d12 0000000000000000A d13
0000000000000000
11-21 14:48:19.600 I/DEBUGA A (A 223):A d14 0000000000000000A d15
0000000000000000
11-21 14:48:19.600 I/DEBUGA A (A 223):A scr 60000012
11-21 14:48:19.600 I/DEBUGA A (A 223):
11-21 14:48:19.608 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1
11-21 14:48:19.741 I/DEBUGA A (A 223):A A A A A A A A A #00A pc
00018fc4A /system/lib/libc.so
11-21 14:48:19.741 I/DEBUGA A (A 223):A A A A A A A A A #01A pc
0002e4e4A /mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2.so
11-21 14:48:19.741 I/DEBUGA A (A 223):A A A A A A A A A #02A pc
0002e7aeA /mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2.so
11-21 14:48:19.741 I/DEBUGA A (A 223):A A A A A A A A A #03A pc
000079aaA /mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2_mixer.so
11-21 14:48:19.741 I/DEBUGA A (A 223):A A A A A A A A A #04A pc
00111abcA /mnt/asec/com.crazysoft.theodyssey-1/lib/libmain.so
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A A A A A A #05A pc
00023304A /mnt/asec/com.crazysoft.theodyssey-1/lib/libmain.so
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A A A A A A #06A pc
000260f0A /mnt/asec/com.crazysoft.theodyssey-1/lib/libmain.so
11-21 14:48:19.749 I/DEBUGA A (A 223):
11-21 14:48:19.749 I/DEBUGA A (A 223): code around pc:
11-21 14:48:19.749 I/DEBUGA A (A 223): afd18fa4 bf00bd10 47f0e92d
fb014d50 447df802
11-21 14:48:19.749 I/DEBUGA A (A 223): afd18fb4 4614468a f1b8461e
d1010f00 e0924644
11-21 14:48:19.749 I/DEBUGA A (A 223): afd18fc4 2b00685b 2100da01
46076071 078189b0
11-21 14:48:19.749 I/DEBUGA A (A 223): afd18fd4 6bf2d576 d1732a00
c114f8df 100cf855
11-21 14:48:19.749 I/DEBUGA A (A 223): afd18fe4 b90b680b fd92f7ff
200089b3 069a6070
11-21 14:48:19.749 I/DEBUGA A (A 223):
11-21 14:48:19.749 I/DEBUGA A (A 223): code around lr:
11-21 14:48:19.749 I/DEBUGA A (A 223): 80a2e4c4 4628d401 2002bd38
f854f7de bd384628
11-21 14:48:19.749 I/DEBUGA A (A 223): 80a2e4d4 4604b538 460869c5
461a4611 f7dd462b
11-21 14:48:19.749 I/DEBUGA A (A 223): 80a2e4e4 4605e9d2 69e3b918
065a899b 4628d401
11-21 14:48:19.749 I/DEBUGA A (A 223): 80a2e4f4 2001bd38 f83ef7de
bd384628 2030b510
11-21 14:48:19.749 I/DEBUGA A (A 223): 80a2e504 e8d2f7dd b1084604
bd104620 f832f7de
11-21 14:48:19.749 I/DEBUGA A (A 223):
11-21 14:48:19.749 I/DEBUGA A (A 223): stack:
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e440A 001ee870A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e444A 00000000A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e448A 46f2e498A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e44cA ac7125fdA
/system/lib/libsurfaceflinger_client.so
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e450A 001ee7b8A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e454A 00000000A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e458A 00000000A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e45cA 001eeb80A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e460A 46f2e4dcA
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e464A a811d46bA
/system/lib/libutils.so
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e468A 001ee7b8A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e46cA ab92a3b7A
/system/lib/libui.so
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e470A 001ee7b8A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e474A ac712a45A
/system/lib/libsurfaceflinger_client.so
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e478A df002777A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e47cA e3a070adA
11-21 14:48:19.749 I/DEBUGA A (A 223): #00 46f2e480A 00275518A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e484A 00000000A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e488A 00000001A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e48cA ffffffffA
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e490A 8140aa6cA
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e494A 8140b110A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e498A 8140b114A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e49cA 80a2e4e7A
/mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2.so
11-21 14:48:19.749 I/DEBUGA A (A 223): #01 46f2e4a0A 00000001A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e4a4A 80a2e4d5A
/mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2.so
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e4a8A 00275518A
11-21 14:48:19.749 I/DEBUGA A (A 223):A A A A 46f2e4acA 80a2e7b1A
/mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2.so
11-21 14:48:19.788 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1
11-21 14:48:19.843 D/dalvikvm( 3944): GC_CONCURRENT freed 650K, 49% free
3749K/7239K, external 961K/1473K, paused 4ms+7ms
11-21 14:48:19.991 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1
11-21 14:48:20.139 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1
11-21 14:48:20.319 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes,
mActive=1

So the question is: Why does it crash on these models and what can I do to
fix that?
I can see the “Mix_LoadWAV: Error reading from datastream” on the first
one but why?

If someone can help me on this I would appreciate it,
Giorgos

2013/1/26 Giorgos Sarris

Hi,

I have developed a game with SDL2 that runs on all android devices with
graphics acceleration.
It runs fine on android phones and tablets too.

My develop machine is:
Windows 7 Ultimate 64, Latest android NDK, Eclipse, Latest official SDL2
Android.
Libraries I use: SDL2,SDL2_image,SDL2_mixer,SDL2_ttf
I build them in: “APP_ABI := armeabi armeabi-v7a”

The problem is that some Samsung models (Eg: Samsung Galaxy SIII Europe)
crash when loading sound files or when playing sounds.
If I deactivate the sound, the game runs fine on all models.
I always store my data (images, sound, fonts) in the external memory and
not the apk.
(I download the data after the user installs the apk from my server)

I cannot find the reason of the crash, and its been too long:
Here are 2 debug crashes on different phone models (SIII is one of them):

So the question is: Why does it crash on these models and what can I do to
fix that?
I can see the “Mix_LoadWAV: Error reading from datastream” on the first
one but why?

If someone can help me on this I would appreciate it,
Giorgos

What’s the line that crashes in libSDL2.so? .

#01 pc 0002e4e4 /mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2.so

You can use something like this
http://stackoverflow.com/questions/5314036/how-to-use-addr2line-in-android to
find out which line of code belongs to each PC–
Gabriel.

2013/1/26 Giorgos Sarris

Hi,

I have developed a game with SDL2 that runs on all android devices with
graphics acceleration.
It runs fine on android phones and tablets too.

My develop machine is:
Windows 7 Ultimate 64, Latest android NDK, Eclipse, Latest official SDL2
Android.
Libraries I use: SDL2,SDL2_image,SDL2_mixer,SDL2_ttf
I build them in: “APP_ABI := armeabi armeabi-v7a”

The problem is that some Samsung models (Eg: Samsung Galaxy SIII Europe)
crash when loading sound files or when playing sounds.
If I deactivate the sound, the game runs fine on all models.
I always store my data (images, sound, fonts) in the external memory and
not the apk.
(I download the data after the user installs the apk from my server)

As a benefit for future generations (http://xkcd.com/979/), I helped
Giorgos debug this off list, it turned out there was no problem in SDL, at
least in this particular case :slight_smile:

Gabriel.

Huh, what was the problem then? :stuck_out_tongue:

2013/1/27, Gabriel Jacobo :> 2013/1/26 Giorgos Sarris

Hi,

I have developed a game with SDL2 that runs on all android devices with
graphics acceleration.
It runs fine on android phones and tablets too.

My develop machine is:
Windows 7 Ultimate 64, Latest android NDK, Eclipse, Latest official SDL2
Android.
Libraries I use: SDL2,SDL2_image,SDL2_mixer,SDL2_ttf
I build them in: “APP_ABI := armeabi armeabi-v7a”

The problem is that some Samsung models (Eg: Samsung Galaxy SIII Europe)
crash when loading sound files or when playing sounds.
If I deactivate the sound, the game runs fine on all models.
I always store my data (images, sound, fonts) in the external memory and
not the apk.
(I download the data after the user installs the apk from my server)

As a benefit for future generations (http://xkcd.com/979/), I helped
Giorgos debug this off list, it turned out there was no problem in SDL, at
least in this particular case :slight_smile:

Gabriel.

I fopen many sound files in a row without then checking is the fopen file
is NULL.
That caused errors in some samsung models.> ----- Original Message -----

Subject: Re: [SDL] Latest android SDL2 crashes on some phones when
loading/playing sound files
From: Sik the hedgehog
To: SDL Development List
Date: 27/01/2013 23:37

Huh, what was the problem then? :stuck_out_tongue:

2013/1/27, Gabriel Jacobo :

2013/1/26 Giorgos Sarris

Hi,

I have developed a game with SDL2 that runs on all android devices with
graphics acceleration.
It runs fine on android phones and tablets too.

My develop machine is:
Windows 7 Ultimate 64, Latest android NDK, Eclipse, Latest official SDL2
Android.
Libraries I use: SDL2,SDL2_image,SDL2_mixer,SDL2_ttf
I build them in: “APP_ABI := armeabi armeabi-v7a”

The problem is that some Samsung models (Eg: Samsung Galaxy SIII Europe)
crash when loading sound files or when playing sounds.
If I deactivate the sound, the game runs fine on all models.
I always store my data (images, sound, fonts) in the external memory and
not the apk.
(I download the data after the user installs the apk from my server)

As a benefit for future generations (http://xkcd.com/979/), I helped
Giorgos debug this off list, it turned out there was no problem in SDL, at
least in this particular case :slight_smile:

Gabriel.


SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org