1

我的应用程序似乎每启动 3-4 次就会静默关闭。也不例外,没有强制关闭消息,它只是打开一瞬间然后关闭。之后,在同样的事情再次发生之前,我可以平均再启动 3-4 次而不会出现问题,依此类推。

我已经设法将它定位到我的一个选项卡(我正在使用 FragmentPagerAdapter)。如果我不创建该选项卡,它永远不会发生。除此之外,事实证明无法追踪,因为它不会每次都发生在同一个地方。当我查看我的 LogCat 输出时,它每次都发生在稍微不同的地方。调试器 LogCat 消息(见下文)也散布在我的一些应用程序日志之间,但这也各不相同。

我的应用程序相当大,因此无法在此处发布资源,因为我无法查明问题所在。我可以说导致这种情况的选项卡基本上是一个片段,其中包含一个使用自定义 SimpleCursorAdapter 的 ListViewFragment。

真的很感激任何可以为我指明正确方向的东西......

我在装有 Android 2.3.6 的 Nexus One 上得到了这个。

03-17 21:18:32.650: I/DEBUG(8687): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-17 21:18:32.650: I/DEBUG(8687): Build fingerprint: 'google/passion_vf/passion:2.3.6/GRK39F/224392.2:user/release-keys'
03-17 21:18:32.650: I/DEBUG(8687): pid: 8909, tid: 8910  >>> com.magnuswikhog.adrlibrary4 <<<
03-17 21:18:32.650: I/DEBUG(8687): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000c
03-17 21:18:32.650: I/DEBUG(8687):  r0 00000000  r1 00000007  r2 421b5d4c  r3 00000014
03-17 21:18:32.650: I/DEBUG(8687):  r4 100ffaf0  r5 00000004  r6 100ffb70  r7 43c9bda0
03-17 21:18:32.650: I/DEBUG(8687):  r8 100ffad0  r9 43c9bd98  10 43c9bd80  fp 800a5368
03-17 21:18:32.650: I/DEBUG(8687):  ip ad33f5d9  sp 100ffac8  lr 80049229  pc ad33f5e4  cpsr 20000030
03-17 21:18:32.650: I/DEBUG(8687):  d0  0072007500630028  d1  002e0072006f0000
03-17 21:18:32.650: I/DEBUG(8687):  d2  0043007400650029  d3  0074006e00750000
03-17 21:18:32.650: I/DEBUG(8687):  d4  00300033002a5c00  d5  0033002c00320030
03-17 21:18:32.650: I/DEBUG(8687):  d6  002c003100300030  d7  0036003000300031
03-17 21:18:32.650: I/DEBUG(8687):  d8  0000000000000000  d9  0000000000000000
03-17 21:18:32.650: I/DEBUG(8687):  d10 0000000000000000  d11 0000000000000000
03-17 21:18:32.650: I/DEBUG(8687):  d12 0000000000000000  d13 0000000000000000
03-17 21:18:32.650: I/DEBUG(8687):  d14 0000000000000000  d15 0000000000000000
03-17 21:18:32.650: I/DEBUG(8687):  d16 0000000004a50b72  d17 3ff0000000000000
03-17 21:18:32.650: I/DEBUG(8687):  d18 42eccefa43de3400  d19 3fbc71c71c71c71c
03-17 21:18:32.650: I/DEBUG(8687):  d20 4008000000000000  d21 3fd99a27ad32ddf5
03-17 21:18:32.650: I/DEBUG(8687):  d22 3fd24998d6307188  d23 3fcc7288e957b53b
03-17 21:18:32.650: I/DEBUG(8687):  d24 3fc74721cad6b0ed  d25 3fc39a09d078c69f
03-17 21:18:32.650: I/DEBUG(8687):  d26 0000000000000000  d27 0000000000000000
03-17 21:18:32.650: I/DEBUG(8687):  d28 0000000000000000  d29 0000000000000000
03-17 21:18:32.650: I/DEBUG(8687):  d30 0000000000000000  d31 0000000000000000
03-17 21:18:32.650: I/DEBUG(8687):  scr 80000012

03-17 21:18:32.720: I/DEBUG(8687):          #00  pc 0003f5e4  /system/lib/libandroid_runtime.so
03-17 21:18:32.720: I/DEBUG(8687):          #01  pc 00017e34  /system/lib/libdvm.so
03-17 21:18:32.720: I/DEBUG(8687):          #02  pc 0004968c  /system/lib/libdvm.so
03-17 21:18:32.720: I/DEBUG(8687):          #03  pc 0001d034  /system/lib/libdvm.so
03-17 21:18:32.720: I/DEBUG(8687):          #04  pc 000220e4  /system/lib/libdvm.so
03-17 21:18:32.720: I/DEBUG(8687):          #05  pc 00020fdc  /system/lib/libdvm.so

03-17 21:18:32.720: I/DEBUG(8687):          #06  pc 0005fc40  /system/lib/libdvm.so
03-17 21:18:32.720: I/DEBUG(8687):          #07  pc 0005fe54  /system/lib/libdvm.so
03-17 21:18:32.720: I/DEBUG(8687):          #08  pc 00055fec  /system/lib/libdvm.so
03-17 21:18:32.720: I/DEBUG(8687):          #09  pc 00056068  /system/lib/libdvm.so
03-17 21:18:32.720: I/DEBUG(8687):          #10  pc 000561fa  /system/lib/libdvm.so
03-17 21:18:32.730: I/DEBUG(8687):          #11  pc 000540ce  /system/lib/libdvm.so
03-17 21:18:32.730: I/DEBUG(8687):          #12  pc 000118e4  /system/lib/libc.so
03-17 21:18:32.730: I/DEBUG(8687):          #13  pc 000114b0  /system/lib/libc.so
03-17 21:18:32.730: I/DEBUG(8687): code around pc:
03-17 21:18:32.730: I/DEBUG(8687): ad33f5c4 b5104a03 6812447a fd08f7f4 bf00bd10 
03-17 21:18:32.730: I/DEBUG(8687): ad33f5d4 00047e48 b5104a04 6812447a fcfef7f4 
03-17 21:18:32.730: I/DEBUG(8687): ad33f5e4 681868c3 bf00bd10 00047e34 b5104a05 
03-17 21:18:32.730: I/DEBUG(8687): ad33f5f4 6812447a fcf2f7f4 681a68c3 3a01b10a 
03-17 21:18:32.730: I/DEBUG(8687): ad33f604 bd10601a 00047e1c 4614b513 447a4a0e 
03-17 21:18:32.730: I/DEBUG(8687): code around lr:
03-17 21:18:32.730: I/DEBUG(8687): 80049208 21014628 fd78f009 f01368f3 69330f40 
03-17 21:18:32.730: I/DEBUG(8687): 80049218 58e4bf08 58e4d000 21074628 fd6cf009 
03-17 21:18:32.730: I/DEBUG(8687): 80049228 bd704620 6905b570 460c4616 21014628 
03-17 21:18:32.730: I/DEBUG(8687): 80049238 fd62f009 f01368f3 69330f40 5ae4bf08 
03-17 21:18:32.730: I/DEBUG(8687): 80049248 58e4d001 4628b2a4 f0092107 b220fd55 
03-17 21:18:32.730: I/DEBUG(8687): stack:
03-17 21:18:32.730: I/DEBUG(8687):     100ffa88  4068e848  
03-17 21:18:32.730: I/DEBUG(8687):     100ffa8c  4068e848  
03-17 21:18:32.730: I/DEBUG(8687):     100ffa90  4050a018  
03-17 21:18:32.730: I/DEBUG(8687):     100ffa94  00000014  
03-17 21:18:32.730: I/DEBUG(8687):     100ffa98  40009280  
03-17 21:18:32.730: I/DEBUG(8687):     100ffa9c  4068e848  
03-17 21:18:32.730: I/DEBUG(8687):     100ffaa0  00000000  
03-17 21:18:32.730: I/DEBUG(8687):     100ffaa4  0008fcb0  
03-17 21:18:32.730: I/DEBUG(8687):     100ffaa8  421b5d4c  
03-17 21:18:32.730: I/DEBUG(8687):     100ffaac  80049229  /system/lib/libdvm.so
03-17 21:18:32.730: I/DEBUG(8687):     100ffab0  100ffaf0  
03-17 21:18:32.730: I/DEBUG(8687):     100ffab4  00000004  
03-17 21:18:32.730: I/DEBUG(8687):     100ffab8  100ffb70  
03-17 21:18:32.730: I/DEBUG(8687):     100ffabc  ad333feb  /system/lib/libandroid_runtime.so
03-17 21:18:32.730: I/DEBUG(8687):     100ffac0  df002777  
03-17 21:18:32.740: I/DEBUG(8687):     100ffac4  e3a070ad  
03-17 21:18:32.740: I/DEBUG(8687): #00 100ffac8  100ffaf0  
03-17 21:18:32.740: I/DEBUG(8687):     100ffacc  80017e38  /system/lib/libdvm.so
03-17 21:18:32.740: I/DEBUG(8687): #01 100ffad0  0008fcb0  
03-17 21:18:32.740: I/DEBUG(8687):     100ffad4  00000001  
03-17 21:18:32.740: I/DEBUG(8687):     100ffad8  100ffb70  
03-17 21:18:32.740: I/DEBUG(8687):     100ffadc  43c9bd94  
03-17 21:18:32.740: I/DEBUG(8687):     100ffae0  421b5fa4  
03-17 21:18:32.740: I/DEBUG(8687):     100ffae4  0008fcb0  
03-17 21:18:32.740: I/DEBUG(8687):     100ffae8  100ffaf0  
03-17 21:18:32.740: I/DEBUG(8687):     100ffaec  8004968f  /system/lib/libdvm.so
03-17 21:18:32.990: I/DEBUG(8687): debuggerd committing suicide to free the zombie!
03-17 21:18:32.990: I/BootReceiver(101): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
03-17 21:18:33.000: E/InputDispatcher(101): channel '407606c0 com.magnuswikhog.adrlibrary4/com.magnuswikhog.adrlibrary4.MainActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
03-17 21:18:33.000: E/InputDispatcher(101): channel '407606c0 com.magnuswikhog.adrlibrary4/com.magnuswikhog.adrlibrary4.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
03-17 21:18:33.000: D/Zygote(67): Process 8909 terminated by signal (11)
03-17 21:18:33.010: I/DEBUG(8930): debuggerd: Dec  9 2011 18:21:46
03-17 21:18:33.070: D/dalvikvm(191): GC_EXPLICIT freed 4K, 48% free 3120K/5959K, external 5052K/5767K, paused 550ms
03-17 21:18:33.070: D/dalvikvm(101): GC_FOR_MALLOC freed 1537K, 48% free 6246K/11911K, external 3513K/3905K, paused 76ms
03-17 21:18:33.070: I/ActivityManager(101): Process com.magnuswikhog.adrlibrary4 (pid 8909) has died.
03-17 21:18:33.070: I/WindowManager(101): WIN DEATH: Window{407606c0 com.magnuswikhog.adrlibrary4/com.magnuswikhog.adrlibrary4.MainActivity paused=false}
03-17 21:18:33.140: W/InputManagerService(101): Client not active, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40a52960
03-17 21:18:33.270: D/dalvikvm(191): GC_EXPLICIT freed 2K, 48% free 3118K/5959K, external 5052K/5767K, paused 103ms
03-17 21:18:34.700: W/InputConnectionWrapper.ICC(174): Timed out waiting on IInputContextCallback
4

2 回答 2

0

您是否在特定选项卡中使用任何自定义字体?几年前我遇到了完全相同的问题,它缩小到我声明的自定义字体。

https://groups.google.com/forum/m/#!topic/android-developers/lNxOU-BMkJ0

http://dixonof.wordpress.com/2009/09/01/android-debuggerd-zombie/

希望这可以帮助!

于 2014-03-18T07:33:13.493 回答
0

我使用 Passion-symbols-189904 解码了堆栈跟踪,它也是 GRK39F,但似乎来自不同的设备。我希望libandroid_runtime.so基本上没有变化。痕迹是:

Stack Trace:
  RELADDR   FUNCTION                                     FILE:LINE
  0003f5e4  android::getNumRows(_JNIEnv*, _jobject*)+12      /usr/local/google/buildbot/repo_clients/goog/frameworks/base/core/jni/android_database_CursorWindow.cpp:508
  00017e34  dvmPlatformInvoke+116                        /usr/local/google/buildbot/repo_clients/goog/dalvik/vm/arch/arm/CallEABI.S:243
  0004968c  dvmCallJNIMethod_virtualNoRef+52             /usr/local/google/buildbot/repo_clients/goog/dalvik/vm/Jni.c:1790
  0001d034  dalvik_mterp+12                              /usr/local/google/buildbot/repo_clients/goog/dalvik/vm/mterp/out/InterpAsm-armv7-a-neon.S:10017
  000220e4  dvmMterpStd+140                              /usr/local/google/buildbot/repo_clients/goog/dalvik/vm/mterp/Mterp.c:105
  00020fdc  dvmInterpret+272                             /usr/local/google/buildbot/repo_clients/goog/dalvik/vm/interp/Interp.c:1345
  0005fc40  dvmCallMethodV+300                           /usr/local/google/buildbot/repo_clients/goog/dalvik/vm/interp/Stack.c:529
  0005fe54  dvmCallMethod+20                             /usr/local/google/buildbot/repo_clients/goog/dalvik/vm/interp/Stack.c:434
  00055fec  callMethod+88                                /usr/local/google/buildbot/repo_clients/goog/dalvik/vm/alloc/HeapWorker.c:244
  00056068  doHeapWork+52                                /usr/local/google/buildbot/repo_clients/goog/dalvik/vm/alloc/HeapWorker.c:307
  000561fa  heapWorkerThreadStart+310                    /usr/local/google/buildbot/repo_clients/goog/dalvik/vm/alloc/HeapWorker.c:437

假设符号匹配,它从终结器调用 CursorWindow 函数。您看不到托管堆栈跟踪,因此很难说哪个终结器。看这里的第 508 行,我猜“窗口”是 NULL。

它发生在终结器中的事实可能解释了为什么它每次都发生在稍微不同的地方——时间与垃圾收集有关。

我猜想有些东西Cursor你可以明确地关闭但不是,所以终结器正在做(并摸索)这项工作。

于 2014-03-18T00:29:41.987 回答