Hi,
I’m testing my game on several Android devices, but only on the Nexus 5 (up to now) with Android 5.0.1 is crashing. The first screen (the menu screen) is showing up, but as soon as the player taps the play button, it crashes with the following message in LogCat:
03-24 13:52:47.859: A/libc(22561): Fatal signal 11 (SIGSEGV), code 2, fault addr 0x3f800028 in tid 22595 (GLThread 50234)
This is the rest of the report from LogCat (the package name is nonisoft.limball):
03-24 13:52:47.961: I/DEBUG(180): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-24 13:52:47.961: I/DEBUG(180): Build fingerprint: ‘google/hammerhead/hammerhead:5.0.1/LRX22C/1602158:user/release-keys’
03-24 13:52:47.961: I/DEBUG(180): Revision: ‘11’
03-24 13:52:47.961: I/DEBUG(180): ABI: ‘arm’
03-24 13:52:47.961: I/DEBUG(180): pid: 22561, tid: 22595, name: GLThread 50234 >>> nonisoft.limball <<<
03-24 13:52:47.961: I/DEBUG(180): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x3f800028
03-24 13:52:47.988: I/DEBUG(180): r0 3f800000 r1 00000000 r2 00000000 r3 00000000
03-24 13:52:47.988: I/DEBUG(180): r4 99e8da00 r5 a30ff3b4 r6 a30ff3b4 r7 a3905b50
03-24 13:52:47.988: I/DEBUG(180): r8 a36394a9 r9 9ac68ef0 sl a390fd44 fp 99e8da00
03-24 13:52:47.988: I/DEBUG(180): ip a36afaf4 sp a30ff3a0 lr a36348ef pc a366f85a cpsr 40000030
03-24 13:52:47.989: I/DEBUG(180): backtrace:
03-24 13:52:47.989: I/DEBUG(180): #00 pc 0012485a /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (cocos2d::TextureAtlas::removeAllQuads()+1)
03-24 13:52:47.989: I/DEBUG(180): #01 pc 000e98eb /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (cocos2d::alignText()+58)
03-24 13:52:47.989: I/DEBUG(180): #02 pc 000e9f27 /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (cocos2d::updateContent()+114)
03-24 13:52:47.989: I/DEBUG(180): #03 pc 000e8b59 /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (cocos2d::getContentSize() const+28)
03-24 13:52:47.989: I/DEBUG(180): #04 pc 000d95eb /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (GameManager::init()+698)
03-24 13:52:47.989: I/DEBUG(180): #05 pc 000d7b67 /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (GameManager::CreateScene()+222)
03-24 13:52:47.989: I/DEBUG(180): #06 pc 000d42b9 /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (MenuScreen::ToNewGame()+22)
03-24 13:52:47.989: I/DEBUG(180): #07 pc 000ec9cf /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (cocos2d::MenuItem::activate()+26)
03-24 13:52:47.989: I/DEBUG(180): #08 pc 000d46d5 /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so
03-24 13:52:47.989: I/DEBUG(180): #09 pc 001127c9 /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so
03-24 13:52:47.989: I/DEBUG(180): #10 pc 00110619 /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (cocos2d::EventDispatcher::dispatchEventToListeners(cocos2d::EventDispatcher::EventListenerVector*, std::function<bool (cocos2d::EventListener*)> const&)+172)
03-24 13:52:47.989: I/DEBUG(180): #11 pc 00112d0f /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (cocos2d::EventDispatcher::dispatchTouchEvent(cocos2d::EventTouch*)+290)
03-24 13:52:47.989: I/DEBUG(180): #12 pc 00112def /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (cocos2d::EventDispatcher::dispatchEvent(cocos2d::Event*)+50)
03-24 13:52:47.989: I/DEBUG(180): #13 pc 001017b7 /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (cocos2d::GLView::handleTouchesOfEndOrCancel(cocos2d::EventTouch::EventCode, int, int*, float*, float*)+478)
03-24 13:52:47.989: I/DEBUG(180): #14 pc 00101803 /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (cocos2d::GLView::handleTouchesEnd(int, int*, float*, float*)+18)
03-24 13:52:47.989: I/DEBUG(180): #15 pc 000df963 /data/app/nonisoft.limball-2/lib/arm/libcocos2dcpp.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeTouchesEnd+34)
03-24 13:52:47.989: I/DEBUG(180): #16 pc 00130ff7 /data/dalvik-cache/arm/data@app@nonisoft.limball-2@base.apk@classes.dex
03-24 13:52:48.900: W/debuggerd(180): type=1400 audit(0.0:334): avc: denied { read } for name=“kgsl-3d0” dev=“tmpfs” ino=6028 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
03-24 13:52:48.900: W/debuggerd(180): type=1400 audit(0.0:335): avc: denied { read } for name=“kgsl-3d0” dev=“tmpfs” ino=6028 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
03-24 13:52:49.320: W/debuggerd(180): type=1400 audit(0.0:336): avc: denied { read } for name=“kgsl-3d0” dev=“tmpfs” ino=6028 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
03-24 13:52:49.320: W/debuggerd(180): type=1400 audit(0.0:337): avc: denied { read } for name=“kgsl-3d0” dev=“tmpfs” ino=6028 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
03-24 13:52:49.358: W/ActivityManager(2009): Force finishing activity nonisoft.limball/org.cocos2dx.cpp.AppActivity
03-24 13:52:49.360: I/DEBUG(180): Tombstone written to: /data/tombstones/tombstone_08
03-24 13:52:49.360: I/BootReceiver(2009): Copying /data/tombstones/tombstone_08 to DropBox (SYSTEM_TOMBSTONE)
03-24 13:52:49.361: E/SharedPreferencesImpl(2009): Couldn’t create directory for SharedPreferences file shared_prefs/log_files.xml
In the last line, there is a reference to SharedPreferences error. I use cocos2d::UserDefault to retrieve and save the current best score (and I figure that under the hood, this uses SharedPreferences). As I mentioned, it’s working in all the rest of devices I tested.
If you think this is the problem, any hints on how to fix it? Can you think of another problem (from the LogCat report) that I may be overlooking?
Thanks in advance.