小部件强制关闭,但logcat没有告诉我什么

时间:2011-04-11 10:39:03

标签: android service android-widget

您好 我创建了一个主屏幕小部件。 它在我的设备上工作得很好,但在其他(看似)随机间隔崩溃,我试图研究这些用户发送给我的logcats但我似乎无法找到导致强制关闭的错误/异常

这里有一个例子的日志:

 I/ActivityThread(29303): Publishing provider 

com.facebook.katana.provider.UserStatusesProvider: com.facebook.katana.provider.UserStatusesProvider
I/ActivityThread(29303): Publishing provider com.facebook.katana.provider.PhotosProvider: com.facebook.katana.provider.PhotosProvider
D/dalvikvm(29303): GC_FOR_MALLOC freed 3424 objects / 203960 bytes in 51ms
D/dalvikvm(29303): GC_EXTERNAL_ALLOC freed 2369 objects / 136048 bytes in 58ms
D/dalvikvm(29303): GC_FOR_MALLOC freed 875 objects / 52040 bytes in 73ms
D/dalvikvm(29303): GC_FOR_MALLOC freed 1530 objects / 447680 bytes in 38ms
D/dalvikvm(   86): GC_EXPLICIT freed 23778 objects / 1131048 bytes in 132ms
I/Gmail   (25020): MainSyncRequestProto: lowestBkwdConvoId: 0, highestHandledServerOp: 1804642, normalSync: true
D/GTalkService(  196): [RosterMgr] roster not modified
D/GTalkService(  196): [OtrMgr] OTR not modified
D/AccelerometerListener(  167): orientation: horizontal
D/PhoneApp(  167): updateProximitySensorMode: releasing...
E/Sensors (   86): CAPELLA_CM3602_IOCTL_ENABLE error (I/O error)
I/power   (   86): *** set_screen_state 1
D/SurfaceFlinger(   86): Screen about to return, flinger = 0x1fe220
D/GoogleLoginService(  196): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService }
D/InCallScreen(  167): onResume()...
D/PhoneApp(  167): disable status bar
D/PhoneApp(  167): StatusBarManager.DISABLE_EXPAND
D/InCallScreen(  167): - onResume: initial status = SUCCESS
D/InCallScreen(  167): setInCallScreenMode: NORMAL
D/InCallScreen(  167): syncWithPhoneState()...
D/PhoneUtils(  167): dumpCallState():
D/PhoneUtils(  167): - Phone: Handler{44954ab8}, name = GSM, state = OFFHOOK
D/PhoneUtils(  167):   - FG call: ACTIVE isAlive true isRinging false isDialing false isIdle false hasConnections true
D/PhoneUtils(  167):   - BG call: IDLE isAlive false isRinging false isDialing false isIdle true hasConnections false
D/PhoneUtils(  167):   - RINGING call: IDLE isAlive false isRinging false isDialing false isIdle true hasConnections false
D/PhoneUtils(  167):   - hasRingingCall false hasActiveCall true hasHoldingCall false allLinesTaken false
D/PhoneUtils(  167):   - Ringer state: false
D/InCallScreen(  167): updateScreen()...
D/InCallScreen(  167): - updateScreen: updating the in-call UI...
I/power   (   86): *** set_screen_state 1
D/PhoneApp(  167): updateWakeState: callscreen true, dialer false, speaker false...
D/PhoneApp(  167): updateWakeState: keepScreenOn = false (isRinging false, isDialing false, showingDisc false)
D/skia    (   86): purging 193K from font cache [8 entries]
D/CallNotifier(  167): stopRing()... (OFFHOOK state)
D/Ringer  (  167): stopRing()...
D/Ringer  (  167): - stopRing: null mRingHandler!
D/InCallScreen(  167): onPhoneStateChanged()...
D/InCallScreen(  167): updateScreen()...
D/InCallScreen(  167): - updateScreen: updating the in-call UI...
D/PhoneApp(  167): updateWakeState: callscreen true, dialer false, speaker false...
D/PhoneApp(  167): updateWakeState: keepScreenOn = false (isRinging false, isDialing false, showingDisc false)
D/InCallScreen(  167): updateScreen()...
D/InCallScreen(  167): - updateScreen: updating the in-call UI...
D/AndroidRuntime(29278): Shutting down VM
W/dalvikvm(29278): threadid=1: thread exiting with uncaught exception (group=0x4001d7f0)
D/AccelerometerListener(  167): orientation: vertical
D/PhoneApp(  167): updateProximitySensorMode: acquiring...
I/power   (   86): *** set_screen_state 0
D/InCallScreen(  167): onPause()...
D/InCallScreen(  167): dismissAllDialogs()...
D/PhoneApp(  167): re-enable status bar   

我相信这个区块是强制关闭的地方,但我不明白为什么:

D/AndroidRuntime(29278): Shutting down VM
W/dalvikvm(29278): threadid=1: thread exiting with uncaught exception (group=0x4001d7f0)

通常下一行是堆栈跟踪或其他什么,但在这种情况下我什么都没得到。

请帮帮我。 我提前谢谢你。

编辑:最终我意识到我必须直接查看整个logcat(我为这个日志尝试了alogcat),我发现问题就是没有被捕获的NUllPointerExceptions。 一旦我发现了这些例外并与他们的创作者打交道 - 一切都很好。

1 个答案:

答案 0 :(得分:2)

编辑:最终我意识到我必须直接查看整个logcat。 (我为这个日志尝试了alogcat)。我发现问题只是NullPointerException没有被发现。一旦我发现了这些例外,并与他们的创作者打交道,一切都很好。