The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Latest android SDL2 crashes on some phones when loading/play
Giorgos Sarris
Guest

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/SDL     (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/Reverb  (17417):  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/SDL     (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/power   ( 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=0  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/libc    (17417): Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1)
11-20 16:01:08.046 D/lights  ( 2092): button : 2 +
11-20 16:01:08.046 D/lights  ( 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/DEBUG   ( 9353): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-20 16:01:08.461 I/DEBUG   ( 9353): Build fingerprint: 'samsung/m0xx/m0:4.0.4/IMM76D/I9300XXBLG8:user/release-keys'
11-20 16:01:08.461 I/DEBUG   ( 9353): pid: 17417, tid: 17430  >>> com.crazysoft.theodyssey <<<
11-20 16:01:08.461 I/DEBUG   ( 9353): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000004
11-20 16:01:08.466 I/DEBUG   ( 9353):  r0 00000000  r1 00000000  r2 00000001  r3 00000001
11-20 16:01:08.466 I/DEBUG   ( 9353):  r4 4008857c  r5 00000001  r6 00000000  r7 ffffffff
11-20 16:01:08.466 I/DEBUG   ( 9353):  r8 5c56955c  r9 00000004  10 5c454114  fp 00000004
11-20 16:01:08.466 I/DEBUG   ( 9353):  ip 00000000  sp 5c569520  lr 40055ea0  pc 4005ec1c  cpsr 60000030
11-20 16:01:08.466 I/DEBUG   ( 9353):  d0  1000010700000000  d1  0000000000000000
11-20 16:01:08.466 I/DEBUG   ( 9353):  d2  0000000000000000  d3  000002d0c3b40000
11-20 16:01:08.466 I/DEBUG   ( 9353):  d4  0000000000000000  d5  0000ac443f800000
11-20 16:01:08.466 I/DEBUG   ( 9353):  d6  4000000000000000  d7  4000000000000000
11-20 16:01:08.466 I/DEBUG   ( 9353):  d8  3e875f703fc00000  d9  0000000000000000
11-20 16:01:08.466 I/DEBUG   ( 9353):  d10 0000000000000000  d11 0000000000000000
11-20 16:01:08.466 I/DEBUG   ( 9353):  d12 0000000000000000  d13 0000000000000000
11-20 16:01:08.466 I/DEBUG   ( 9353):  d14 0000000000000000  d15 0000000000000000
11-20 16:01:08.466 I/DEBUG   ( 9353):  d16 4000000000000000  d17 3eb6201867564ad0
11-20 16:01:08.466 I/DEBUG   ( 9353):  d18 bf56bf68b6314626  d19 3f1f865fd80117f2
11-20 16:01:08.466 I/DEBUG   ( 9353):  d20 3fa55553e1053a42  d21 3f1f865fd80117f2
11-20 16:01:08.466 I/DEBUG   ( 9353):  d22 00ffffff00ffffff  d23 00ffffff00ffffff
11-20 16:01:08.466 I/DEBUG   ( 9353):  d24 00ffffff00ffffff  d25 00ffffff00ffffff
11-20 16:01:08.466 I/DEBUG   ( 9353):  d26 00ffffff00ffffff  d27 3ef99342e0ee5069
11-20 16:01:08.466 I/DEBUG   ( 9353):  d28 00ffffff00ffffff  d29 00ffffff00ffffff
11-20 16:01:08.466 I/DEBUG   ( 9353):  d30 00ffffff00ffffff  d31 00ffffff00ffffff
11-20 16:01:08.466 I/DEBUG   ( 9353):  scr 60000010
11-20 16:01:08.466 I/DEBUG   ( 9353):
11-20 16:01:08.676 I/DEBUG   ( 9353):          #00  pc 0001ac1c  /system/lib/libc.so (fread)
11-20 16:01:08.676 I/DEBUG   ( 9353):          #01  pc 0002e4e4  /data/data/com.crazysoft.theodyssey/lib/libSDL2.so
11-20 16:01:08.676 I/DEBUG   ( 9353):          #02  pc 0002e7ae  /data/data/com.crazysoft.theodyssey/lib/libSDL2.so (SDL_ReadLE32)
11-20 16:01:08.676 I/DEBUG   ( 9353):          #03  pc 000079aa  /data/data/com.crazysoft.theodyssey/lib/libSDL2_mixer.so (Mix_LoadWAV_RW)
11-20 16:01:08.681 I/DEBUG   ( 9353):          #04  pc 001136d8  /data/data/com.crazysoft.theodyssey/lib/libmain.so (_Z10loadSoundsv)
11-20 16:01:08.681 I/DEBUG   ( 9353):          #05  pc 00023304  /data/data/com.crazysoft.theodyssey/lib/libmain.so (_Z8loadMainj)
11-20 16:01:08.681 I/DEBUG   ( 9353):          #06  pc 000260f0  /data/data/com.crazysoft.theodyssey/lib/libmain.so (_Z9move_Initv)
11-20 16:01:08.681 I/DEBUG   ( 9353):
11-20 16:01:08.681 I/DEBUG   ( 9353): code around pc:
11-20 16:01:08.681 I/DEBUG   ( 9353): 4005ebfc 468b4680 461e4615 0f00f1b9 464dd101  .F.F.F.F......MF
11-20 16:01:08.681 I/DEBUG   ( 9353): 4005ec0c 496ae0ce 68035860 4630b113 fedef7ff  ..jI`X.h..0F....
11-20 16:01:08.681 I/DEBUG   ( 9353): 4005ec1c 2a006872 2300da01 f8b66073 ea5fc00c  rh.*...#s`...._.
11-20 16:01:08.681 I/DEBUG   ( 9353): 4005ec2c f140738c 6bf080a1 f0402800 4b60809d  .s@....k.(@...`K
11-20 16:01:08.681 I/DEBUG   ( 9353): 4005ec3c 681158e2 f7ffb909 89b2fd71 60702000  .X.h....q.... p`
11-20 16:01:08.681 I/DEBUG   ( 9353):
11-20 16:01:08.681 I/DEBUG   ( 9353): code around lr:
11-20 16:01:08.681 I/DEBUG   ( 9353): 40055e80 eaffffe6 e3e01102 eaffffe4 e92d4070  ............p@-.
11-20 16:01:08.681 I/DEBUG   ( 9353): 40055e90 e1a05000 f57ff05f e5904000 ebffede3  .P.._....@......
11-20 16:01:08.681 I/DEBUG   ( 9353): 40055ea0 e2044a02 e3843001 e1500003 08bd8070  .J...0....P.p...
11-20 16:01:08.681 I/DEBUG   ( 9353): 40055eb0 e5854000 e1a00005 e1a01004 e3a02001  .@........... ..
11-20 16:01:08.681 I/DEBUG   ( 9353): 40055ec0 e8bd4070 eaffffd1 e92d4ff0 e24dd024  p@.......O-.$.M ([email]p@.......O-.$.M[/email]).
11-20 16:01:08.681 I/DEBUG   ( 9353):
11-20 16:01:08.681 I/DEBUG   ( 9353): stack:
11-20 16:01:08.681 I/DEBUG   ( 9353):     5c5694e0  022371a0  [heap]
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c5694e4  0208d9e8  [heap]
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c5694e8  5c569504 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c5694ec  021257c0  [heap]
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c5694f0  5c56955c 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c5694f4  00000004 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c5694f8  5c454114  /data/data/com.crazysoft.theodyssey/lib/libmain.so
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c5694fc  4005ea3f  /system/lib/libc.so
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569500  00000000 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569504  00000001 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569508  00000001 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c56950c  4008857c  /system/lib/libc.so
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569510  00000001 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569514  00000000 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569518  df0027ad 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c56951c  00000000 
11-20 16:01:08.686 I/DEBUG   ( 9353): #00 5c569520  00000000 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569524  021e9d70  [heap]
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569528  00000000 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c56952c  00000001 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569530  ffffffff 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569534  5c453a6c  /data/data/com.crazysoft.theodyssey/lib/libmain.so
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569538  5c454110  /data/data/com.crazysoft.theodyssey/lib/libmain.so
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c56953c  5c454114  /data/data/com.crazysoft.theodyssey/lib/libmain.so
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569540  00000001 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569544  5bf384e7  /data/data/com.crazysoft.theodyssey/lib/libSDL2.so
11-20 16:01:08.686 I/DEBUG   ( 9353): #01 5c569548  00000001 
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c56954c  5bf384d5  /data/data/com.crazysoft.theodyssey/lib/libSDL2.so
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569550  021e9d70  [heap]
11-20 16:01:08.686 I/DEBUG   ( 9353):     5c569554  5bf387b1  /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/SDL     ( 4020): SDL audio: wanted stereo 16-bit 44.1kHz, 1024 frames buffer
11-21 14:48:18.530 V/AudioPolicyManager(  228): getDeviceForStrategy() from cache strategy 0, device 2
11-21 14:48:18.530 V/AudioPolicyManager(  228): AudioPolicyManager::getOutput() stream 3, samplingRate 0, format 0, channels c, flags 0
11-21 14:48:18.538 V/AudioFlinger(  228): registerClient() client 0x267208, pid 4020
11-21 14:48:18.538 V/AudioFlinger(  228): sendConfigEvent() num events 1 event 0, param 0
11-21 14:48:18.538 V/AudioFlinger(  228): AudioFlinger::createTrack() sampleRate 44100, format 1, channelCount 2, frameCount 7840
11-21 14:48:18.538 V/AudioFlinger(  228): createTrack() sessionId: 0
11-21 14:48:18.538 V/AudioFlinger(  228): createTrack() lSessionId: 137
11-21 14:48:18.538 V/AudioFlinger(  228): Track constructor name 4098, calling thread 4020
11-21 14:48:18.538 V/AudioFlinger(  228): PlaybackThread::audioConfigChanged_l, thread 0x62268, event 0, param 0
11-21 14:48:18.546 V/SDL     ( 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(  228): start(4098), calling thread 4020 session 137
11-21 14:48:18.553 V/AudioFlinger(  228): ? => ACTIVE (4098) on thread 0xc7000
11-21 14:48:18.553 D/A2dpAudioInterface(  228): A2dpAudioInterface::getParameters
11-21 14:48:18.553 E/AudioPolicyManager(  228): AudioPolicyManager::isRealCall() nRealCall:0
11-21 14:48:18.553 V/AudioPolicyManager(  228): startOutput() output 1, stream 3, session 137, isRealCall 0, mPhoneOutput 0
11-21 14:48:18.553 V/AudioPolicyManager(  228): startOutput() mHardwareOutput 1, output 1, mPhoneState 0, mRefCount 0, isInCall() 0, m_VoipChecking 0
11-21 14:48:18.553 V/AudioPolicyManager(  228): getDeviceForStrategy() from cache strategy 0, device 2
11-21 14:48:18.553 V/AudioPolicyManager(  228): getNewDevice() selected device 2
11-21 14:48:18.553 V/AudioPolicyManager(  228): setOutputDevice() output 1 device 2 delayMs 0
11-21 14:48:18.553 V/AudioPolicyManager(  228): setOutputDevice() setting same device 2 or null device for output 1
11-21 14:48:18.553 V/AudioPolicyManager(  228): getDeviceForStrategy() strategy 0, device 2
11-21 14:48:18.553 V/AudioPolicyManager(  228): getNewDevice() selected device 2
11-21 14:48:18.553 V/AudioFlinger(  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/DEBUG   (  223): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-21 14:48:19.593 I/DEBUG   (  223): Build fingerprint: 'samsung/GT-S5690/GT-S5690:2.3.6/GINGERBREAD/XXLE5:user/release-keys'
11-21 14:48:19.593 I/DEBUG   (  223): pid: 4020, tid: 4027  >>> com.crazysoft.theodyssey <<<
11-21 14:48:19.593 I/DEBUG   (  223): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000004
11-21 14:48:19.593 I/DEBUG   (  223):  r0 46f2e4b4  r1 00000004  r2 00000001  r3 00000000
11-21 14:48:19.593 I/DEBUG   (  223):  r4 00000001  r5 afd41524  r6 00000000  r7 ffffffff
11-21 14:48:19.593 I/DEBUG   (  223):  r8 00000004  r9 8140b110  10 00000004  fp 00000001
11-21 14:48:19.593 I/DEBUG   (  223):  ip 80a82d6c  sp 46f2e480  lr 80a2e4e7  pc afd18fc4  cpsr 20000030
11-21 14:48:19.593 I/DEBUG   (  223):  d0  3ef99342e0ee5069  d1  3ef993423f800000
11-21 14:48:19.593 I/DEBUG   (  223):  d2  3f1f865fd80117f2  d3  00000000dba87af4
11-21 14:48:19.593 I/DEBUG   (  223):  d4  bf81495400000000  d5  3f8000004f000000
11-21 14:48:19.600 I/DEBUG   (  223):  d6  409b43d500000007  d7  0000000040e00000
11-21 14:48:19.600 I/DEBUG   (  223):  d8  3e875f703fc00000  d9  0000000000000000
11-21 14:48:19.600 I/DEBUG   (  223):  d10 0000000000000000  d11 0000000000000000
11-21 14:48:19.600 I/DEBUG   (  223):  d12 0000000000000000  d13 0000000000000000
11-21 14:48:19.600 I/DEBUG   (  223):  d14 0000000000000000  d15 0000000000000000
11-21 14:48:19.600 I/DEBUG   (  223):  scr 60000012
11-21 14:48:19.600 I/DEBUG   (  223):
11-21 14:48:19.608 V/AudioTrack( 4020): write 0x21fb10: 31360 bytes, mActive=1
11-21 14:48:19.741 I/DEBUG   (  223):          #00  pc 00018fc4  /system/lib/libc.so
11-21 14:48:19.741 I/DEBUG   (  223):          #01  pc 0002e4e4  /mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2.so
11-21 14:48:19.741 I/DEBUG   (  223):          #02  pc 0002e7ae  /mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2.so
11-21 14:48:19.741 I/DEBUG   (  223):          #03  pc 000079aa  /mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2_mixer.so
11-21 14:48:19.741 I/DEBUG   (  223):          #04  pc 00111abc  /mnt/asec/com.crazysoft.theodyssey-1/lib/libmain.so
11-21 14:48:19.749 I/DEBUG   (  223):          #05  pc 00023304  /mnt/asec/com.crazysoft.theodyssey-1/lib/libmain.so
11-21 14:48:19.749 I/DEBUG   (  223):          #06  pc 000260f0  /mnt/asec/com.crazysoft.theodyssey-1/lib/libmain.so
11-21 14:48:19.749 I/DEBUG   (  223):
11-21 14:48:19.749 I/DEBUG   (  223): code around pc:
11-21 14:48:19.749 I/DEBUG   (  223): afd18fa4 bf00bd10 47f0e92d fb014d50 447df802
11-21 14:48:19.749 I/DEBUG   (  223): afd18fb4 4614468a f1b8461e d1010f00 e0924644
11-21 14:48:19.749 I/DEBUG   (  223): afd18fc4 2b00685b 2100da01 46076071 078189b0
11-21 14:48:19.749 I/DEBUG   (  223): afd18fd4 6bf2d576 d1732a00 c114f8df 100cf855
11-21 14:48:19.749 I/DEBUG   (  223): afd18fe4 b90b680b fd92f7ff 200089b3 069a6070
11-21 14:48:19.749 I/DEBUG   (  223):
11-21 14:48:19.749 I/DEBUG   (  223): code around lr:
11-21 14:48:19.749 I/DEBUG   (  223): 80a2e4c4 4628d401 2002bd38 f854f7de bd384628
11-21 14:48:19.749 I/DEBUG   (  223): 80a2e4d4 4604b538 460869c5 461a4611 f7dd462b
11-21 14:48:19.749 I/DEBUG   (  223): 80a2e4e4 4605e9d2 69e3b918 065a899b 4628d401
11-21 14:48:19.749 I/DEBUG   (  223): 80a2e4f4 2001bd38 f83ef7de bd384628 2030b510
11-21 14:48:19.749 I/DEBUG   (  223): 80a2e504 e8d2f7dd b1084604 bd104620 f832f7de
11-21 14:48:19.749 I/DEBUG   (  223):
11-21 14:48:19.749 I/DEBUG   (  223): stack:
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e440  001ee870 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e444  00000000 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e448  46f2e498 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e44c  ac7125fd  /system/lib/libsurfaceflinger_client.so
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e450  001ee7b8 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e454  00000000 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e458  00000000 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e45c  001eeb80 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e460  46f2e4dc 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e464  a811d46b  /system/lib/libutils.so
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e468  001ee7b8 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e46c  ab92a3b7  /system/lib/libui.so
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e470  001ee7b8 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e474  ac712a45  /system/lib/libsurfaceflinger_client.so
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e478  df002777 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e47c  e3a070ad 
11-21 14:48:19.749 I/DEBUG   (  223): #00 46f2e480  00275518 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e484  00000000 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e488  00000001 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e48c  ffffffff 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e490  8140aa6c 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e494  8140b110 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e498  8140b114 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e49c  80a2e4e7  /mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2.so
11-21 14:48:19.749 I/DEBUG   (  223): #01 46f2e4a0  00000001 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e4a4  80a2e4d5  /mnt/asec/com.crazysoft.theodyssey-1/lib/libSDL2.so
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e4a8  00275518 
11-21 14:48:19.749 I/DEBUG   (  223):     46f2e4ac  80a2e7b1  /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
Latest android SDL2 crashes on some phones when loading/play
gabomdq


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
2013/1/26 Giorgos Sarris
Quote:
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.
Latest android SDL2 crashes on some phones when loading/play
gabomdq


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
2013/1/26 Giorgos Sarris
Quote:
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)

<snip>


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 :)


Gabriel.
Latest android SDL2 crashes on some phones when loading/play
Sik


Joined: 26 Nov 2011
Posts: 905
Huh, what was the problem then? :P

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

Quote:
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)

<snip>


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 :)

Gabriel.

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Latest android SDL2 crashes on some phones when loading/play
Giorgos Sarris
Guest

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

Quote:
Quote:
Huh, what was the problem then? :P

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

Quote:
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)

<snip>

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 :)

Gabriel.

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org