我花了更多的时间来处理这个问题并寻找关于在哪里/如何进行的想法。
首先,我的开发者控制台报告说我的一个用户崩溃了我在发布时假设,因为crashlytics从未向我报告此事件。
我正在参与Google的发布前报告,并且始终有5个设备因类似的SIGSEGV而失败。
我没有任何KitKat设备,只有通过预发布报告,我才能重现"这个问题。 (否则在我测试的所有内容上按预期工作。)
编译为Java项目。
07-11 06:58:18.317: A/libc(10635): Fatal signal 11 (SIGSEGV) at 0xbdf44066 (code=1), thread 10862 (AsyncTask #3)
07-11 06:58:18.417: I/System(10558): exec(/system/bin/sh -c dumpsys window windows | grep mCurrentFocus @ com.google.android.apps.common.walkman.util.DeviceSysCommands.execute:97)
07-11 06:58:18.417: V/HtcNativeCrashUtil(929): Read id1=-1243796867 id2=-217320719, they are start flags. This is HTC header
07-11 06:58:18.427: I/DEBUG(363): Build fingerprint: 'htc/brightstarus_wwe/htc_m8:4.4.4/KTU84P/389838.5:user/release-keys'
07-11 06:58:18.427: I/DEBUG(363): Revision: '0'
07-11 06:58:18.427: I/DEBUG(363): pid: 10635, tid: 10862, name: AsyncTask #3 >>> <com.xyz.myapp> <<<
07-11 06:58:18.427: I/DEBUG(363): debuggerd: checkTellHTCSettings
07-11 06:58:18.427: I/DEBUG(363): debuggerd: buildType: user, roAaReport: com, ro.sf: 0
07-11 06:58:18.427: I/DEBUG(363): debuggerd: rosf: 0
07-11 06:58:18.427: I/DEBUG(363): debuggerd: [New ROM] isShippingROM: false
07-11 06:58:18.427: I/DEBUG(363): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr bdf44066
07-11 06:58:18.557: I/DEBUG(363): r0 4205ec68 r1 bdf44052 r2 302d7c76 r3 40427dda
07-11 06:58:18.557: I/DEBUG(363): r4 00000003 r5 7e59cdd8 r6 81634fd0 r7 4205ec38
07-11 06:58:18.557: I/DEBUG(363): r8 00000011 r9 4205ec68 sl 00000003 fp 4205ec38
07-11 06:58:18.557: I/DEBUG(363): ip 00000000 sp 83172c40 lr 00000000 pc 7ba8f978 cpsr a00d0030
07-11 06:58:18.557: I/DEBUG(363): d0 0000000000000000 d1 0000000000000000
07-11 06:58:18.557: I/DEBUG(363): d2 0000000000000000 d3 0000000000000000
07-11 06:58:18.557: I/DEBUG(363): d4 000d006d00700020 d5 003d09000020000a
07-11 06:58:18.557: I/DEBUG(363): d6 0062006d00650076 d7 0031002000720065
07-11 06:58:18.557: I/DEBUG(363): d8 40427dda302d7c76 d9 404272a5bdf44052
07-11 06:58:18.557: I/DEBUG(363): d10 c052fcd07064b945 d11 3fb668e4727848cd
07-11 06:58:18.557: I/DEBUG(363): d12 3f9668e4727848cd d13 40427572da828f5b
07-11 06:58:18.557: I/DEBUG(363): d14 404272a5bdf44052 d15 4010000000000000
07-11 06:58:18.557: I/DEBUG(363): d16 00000001002b0003 d17 0000000100060101
07-11 06:58:18.557: I/DEBUG(363): d18 6d5e71986d61c900 d19 6d61c9a86d5e71d0
07-11 06:58:18.557: I/DEBUG(363): d20 6d5e72786d5e7240 d21 6d61c7e86d5e72b0
07-11 06:58:18.557: I/DEBUG(363): d22 6d61c8c86d61c820 d23 6d61c9706d61c938
07-11 06:58:18.557: I/DEBUG(363): d24 4024000000000000 d25 4000000000000000
07-11 06:58:18.557: I/DEBUG(363): d26 4000000000000000 d27 547d42aea2879f2e
07-11 06:58:18.557: I/DEBUG(363): d28 4012d97c7f3321d2 d29 bfe3e7b5f9990e90
07-11 06:58:18.557: I/DEBUG(363): d30 3fd8c36bcf685477 d31 3f811110896efbb2
07-11 06:58:18.567: I/DEBUG(363): scr 88000013
07-11 06:58:18.567: I/DEBUG(363): backtrace:
07-11 06:58:18.567: I/DEBUG(363): #00 pc 00039978 /dev/ashmem/dalvik-jit-code-cache (deleted)
07-11 06:58:18.567: I/DEBUG(363): stack:
07-11 06:58:18.567: I/DEBUG(363): 83172c00 4168cc1c /system/lib/libdvm.so
07-11 06:58:18.567: I/DEBUG(363): 83172c04 415e8fd8 /system/lib/libdvm.so (dvmMalloc(unsigned int, int)+68)
07-11 06:58:18.567: I/DEBUG(363): 83172c08 4247b5e0 /dev/ashmem/dalvik-heap (deleted)
07-11 06:58:18.567: I/DEBUG(363): 83172c0c 415eaaa4 /system/lib/libdvm.so (dvmCheckBefore+552)
07-11 06:58:18.567: I/DEBUG(363): 83172c10 41aa5360 [anon:libc_malloc]
07-11 06:58:18.567: I/DEBUG(363): 83172c14 416378a5 /system/lib/libdvm.so (dvmInstanceofNonTrivial+92)
07-11 06:58:18.567: I/DEBUG(363): 83172c18 4253e690 /dev/ashmem/dalvik-heap (deleted)
07-11 06:58:18.567: I/DEBUG(363): 83172c1c 41b3b890 /dev/ashmem/dalvik-zygote (deleted)
07-11 06:58:18.567: I/DEBUG(363): 83172c20 6e6df214 /system/framework/core.odex
07-11 06:58:18.567: I/DEBUG(363): 83172c24 78e6e620 /data/dalvik-cache/data@app@<com.xyz.myapp>-1.apk@classes.dex
07-11 06:58:18.567: I/DEBUG(363): 83172c28 7e59cdd8
07-11 06:58:18.567: I/DEBUG(363): 83172c2c 81634fd0 [anon:libc_malloc]
07-11 06:58:18.567: I/DEBUG(363): 83172c30 00000562
07-11 06:58:18.567: I/DEBUG(363): 83172c34 415dbc40 /system/lib/libdvm.so
07-11 06:58:18.567: I/DEBUG(363): 83172c38 00000010
07-11 06:58:18.567: I/DEBUG(363): 83172c3c 415e4d60 /system/lib/libdvm.so
07-11 06:58:18.567: I/DEBUG(363): #00 83172c40 00000000
07-11 06:58:18.567: I/DEBUG(363): 83172c44 81634fd0 [anon:libc_malloc]
07-11 06:58:18.567: I/DEBUG(363): 83172c48 6d5ebf70 /dev/ashmem/dalvik-LinearAlloc (deleted)
07-11 06:58:18.567: I/DEBUG(363): 83172c4c 00000000
07-11 06:58:18.567: I/DEBUG(363): 83172c50 83172d78 [stack:10862]
07-11 06:58:18.567: I/DEBUG(363): 83172c54 81634fd0 [anon:libc_malloc]
07-11 06:58:18.567: I/DEBUG(363): 83172c58 83172c94 [stack:10862]
07-11 06:58:18.567: I/DEBUG(363): 83172c5c 4168cc1c /system/lib/libdvm.so
07-11 06:58:18.567: I/DEBUG(363): 83172c60 4247b5e0 /dev/ashmem/dalvik-heap (deleted)
07-11 06:58:18.567: I/DEBUG(363): 83172c64 415ed868 /system/lib/libdvm.so (dvmMterpStd(Thread*)+80)
07-11 06:58:18.567: I/DEBUG(363): 83172c68 00000000
07-11 06:58:18.567: I/DEBUG(363): 83172c6c 00000000
07-11 06:58:18.567: I/DEBUG(363): 83172c70 00000000
07-11 06:58:18.567: I/DEBUG(363): 83172c74 00000000
07-11 06:58:18.567: I/DEBUG(363): 83172c78 00000000
07-11 06:58:18.567: I/DEBUG(363): 83172c7c 00000003
07-11 06:58:18.567: I/DEBUG(363): memory near r0:
07-11 06:58:18.567: I/DEBUG(363): 4205ec48 790a7ee6 00004019 41f95b10 00000000
....
....
07-11 06:58:18.607: I/DEBUG(363): memory map around fault addr bdf44066:
07-11 06:58:18.607: I/DEBUG(363): 8356f000-8376f000 rw- /dev/ashmem/CursorWindow: /data/data/<com.xyz.myapp>/databases/vb_events (deleted)
07-11 06:58:18.607: I/DEBUG(363): (no map for address)
07-11 06:58:18.607: I/DEBUG(363): be865000-be886000 rw- [stack]
07-11 06:58:18.607: I/DEBUG(363): --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
....
07-11 06:58:18.957: E/ActivityManager(929): App crashed! Process: <com.xyz.myapp>
07-11 06:58:18.967: W/ActivityManager(929): Force finishing activity <com.xyz.myapp>/.MainActivity
07-11 06:58:18.987: I/ActivityManager(929): Recipient 10635
基于SIGSEGV信息,对我的数据库或数据库本身的引用是否已损坏?
我还注意到HTC One logcat提供了各种堆栈跟踪,但在那个特定位置,我只是将数据从CursorLoader提供的游标中拉出来。
07-11 06:58:18.237: I/dalvikvm(10635): JNI: CheckJNI is off
07-11 06:58:18.237: I/dalvikvm(10635): ; workarounds are off
07-11 06:58:18.237: I/dalvikvm(10635): ; pins=0
07-11 06:58:18.237: I/dalvikvm(10635): ; globals=318
07-11 06:58:18.237: I/dalvikvm(10635): DALVIK THREADS:
07-11 06:58:18.237: I/dalvikvm(10635): (mutexes: tll=0 tsl=0 tscl=0 ghl=0)
07-11 06:58:18.237: I/dalvikvm(10635): "main" prio=5 tid=1 SUSPENDED
07-11 06:58:18.237: I/dalvikvm(10635): | group="main" sCount=1 dsCount=0 obj=0x41b4bf30 self=0x41b3a600
07-11 06:58:18.237: I/dalvikvm(10635): | sysTid=10635 nice=0 sched=0/0 cgrp=apps handle=1074381208
07-11 06:58:18.237: I/dalvikvm(10635): | state=S schedstat=( 0 0 0 ) utm=145 stm=35 core=0
07-11 06:58:18.237: I/dalvikvm(10635): at java.lang.String.hashCode(String.java:~924)
07-11 06:58:18.237: I/dalvikvm(10635): at java.util.HashMap.get(HashMap.java:302)
07-11 06:58:18.237: I/dalvikvm(10635): at android.database.sqlite.SQLiteCursor.getColumnIndex(SQLiteCursor.java:207)
07-11 06:58:18.237: I/dalvikvm(10635): at android.database.CursorWrapper.getColumnIndex(CursorWrapper.java:77)
07-11 06:58:18.237: I/dalvikvm(10635): at <com.xyz.myapp>.sql.AttractionTable.transform(AttractionTable.java:115)
07-11 06:58:18.237: I/dalvikvm(10635): at <com.xyz.myapp>.fragments.MapFragment.transformLocations(MapFragment.java:295)
07-11 06:58:18.237: I/dalvikvm(10635): at <com.xyz.myapp>.fragments.MapFragment.onLoadFinished(MapFragment.java:1168)
07-11 06:58:18.237: I/dalvikvm(10635): at <com.xyz.myapp>.fragments.MapFragment.onLoadFinished(MapFragment.java:81)
07-11 06:58:18.237: I/dalvikvm(10635): at android.support.v4.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:476)
07-11 06:58:18.237: I/dalvikvm(10635): at android.support.v4.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:444)
07-11 06:58:18.237: I/dalvikvm(10635): at android.support.v4.content.Loader.deliverResult(Loader.java:126)
07-11 06:58:18.237: I/dalvikvm(10635): at android.support.v4.content.CursorLoader.deliverResult(CursorLoader.java:105)
07-11 06:58:18.237: I/dalvikvm(10635): at android.support.v4.content.CursorLoader.deliverResult(CursorLoader.java:37)
07-11 06:58:18.237: I/dalvikvm(10635): at android.support.v4.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:249)
07-11 06:58:18.237: I/dalvikvm(10635): at android.support.v4.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:77)
07-11 06:58:18.237: I/dalvikvm(10635): at android.support.v4.content.ModernAsyncTask.finish(ModernAsyncTask.java:466)
07-11 06:58:18.237: I/dalvikvm(10635): at android.support.v4.content.ModernAsyncTask.access$400(ModernAsyncTask.java:48)
07-11 06:58:18.237: I/dalvikvm(10635): at android.support.v4.content.ModernAsyncTask$InternalHandler.handleMessage(ModernAsyncTask.java:483)
07-11 06:58:18.237: I/dalvikvm(10635): at android.os.Handler.dispatchMessage(Handler.java:102)
07-11 06:58:18.237: I/dalvikvm(10635): at android.os.Looper.loop(Looper.java:157)
07-11 06:58:18.237: I/dalvikvm(10635): at android.app.ActivityThread.main(ActivityThread.java:5633)
07-11 06:58:18.237: I/dalvikvm(10635): at java.lang.reflect.Method.invokeNative(Nati
ve Method)