简体   繁体   English

恢复一个小时后,应用程序在android中崩溃

[英]Application crashed after an hour in android while resuming

My android application crashed, when i sent that to background for half an hour and then launched from home. 当我将其发送到后台半小时,然后从家里启动时,我的android应用程序崩溃了。

the logcat information is goes below. logcat信息如下。

06-20 13:13:39.839: E/AndroidRuntime(23778):    ... 20 more
06-20 13:13:39.839: E/AndroidRuntime(23778): Caused by: java.lang.NullPointerException
06-20 13:13:39.839: E/AndroidRuntime(23778):    at com.globalnest.CaptureActivity.onCreate(CaptureActivity.java:116)
06-20 13:13:39.839: E/AndroidRuntime(23778):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-20 13:13:39.839: E/AndroidRuntime(23778):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)
06-20 13:13:39.839: E/AndroidRuntime(23778):    ... 27 more
06-20 13:13:39.849: W/ActivityManager(255):   Force finishing activity com.globalnest/.AdminTabHost
06-20 13:13:39.869: D/dalvikvm(23778): GC_CONCURRENT freed 204K, 48% free 2898K/5511K, external 1040K/1552K, paused 3ms+14ms
06-20 13:13:40.359: W/ActivityManager(255): Activity pause timeout for HistoryRecord{2b62c908 com.globalnest/.AdminTabHost}
06-20 13:13:45.409: D/lights(255): set_light_buttons: brightness=0
06-20 13:13:46.239: D/dalvikvm(22012): GC_CONCURRENT freed 465K, 49% free 3008K/5895K, external 743K/1036K, paused 9ms+2ms
06-20 13:13:49.409: W/ActivityManager(255): Launch timeout has expired, giving up wake lock!
06-20 13:13:49.669: W/ActivityManager(255): Activity idle timeout for HistoryRecord{2b62c908 com.globalnest/.AdminTabHost}
06-20 13:13:50.389: W/ActivityManager(255): Activity idle timeout for HistoryRecord{2b59f888 com.globalnest/.Main}
06-20 13:13:55.469: D/dalvikvm(22012): GC_EXPLICIT freed 138K, 52% free 2869K/5895K, external 743K/1036K, paused 80ms
06-20 13:13:59.679: W/ActivityManager(255): Activity destroy timeout for HistoryRecord{2b62c908 com.globalnest/.AdminTabHost}
06-20 13:14:00.139: D/dalvikvm(671): GC_EXPLICIT freed 4K, 49% free 2782K/5379K, external 1404K/1557K, paused 85ms
06-20 13:14:00.199: D/dalvikvm(671): GC_EXPLICIT freed 3K, 49% free 2783K/5379K, external 1404K/1557K, paused 25ms
06-20 13:14:00.199: W/CursorWrapperInner(671): Cursor finalized without prior close()
06-20 13:14:02.419: D/lights(255): set_light_backlight: brightness=20
06-20 13:14:09.419: D/lights(255): set_light_backlight: brightness=0
06-20 13:14:09.419: I/power(255): *** set_screen_state 0
06-20 13:14:09.419: D/DASH - select(255): sensors_select_callback: select canceled by request
06-20 13:14:09.419: D/DASH - select(255): sensors_select_callback: select canceled by request
06-20 13:14:09.429: D/kernel(126): [50267.656494] request_suspend_state: sleep (0->3) at 50264074243382 (2012-06-20 07:44:09.423339839 UTC)
06-20 13:14:09.429: D/kernel(126): [50267.656616] as3676 0-0040: as3676_early_suspend
06-20 13:14:09.429: D/kernel(126): [50267.659759] cyttsp-spi spi0.0: cyttsp_suspend: Enter
06-20 13:14:09.449: D/SurfaceFlinger(255): About to give-up screen, flinger = 0x91bf8
06-20 13:14:09.919: D/kernel(126): [50268.142242] active wake lock PowerManagerService
06-20 13:14:09.919: D/kernel(126): [50268.142272] active wake lock bq24185_watchdog_lock
06-20 13:14:09.919: D/kernel(126): [50268.142272] active wake lock usb_bus_active
06-20 13:14:09.919: D/kernel(126): [50268.142272] active wake lock msm_otg
06-20 13:14:09.919: D/kernel(126): [50268.142303] wake lock msm_serial_hs_rx, expired
06-20 13:14:09.919: D/kernel(126): [50268.142303] wake lock wifi_rx_wake, expired
06-20 13:14:09.939: W/ActivityManager(255): Activity pause timeout for HistoryRecord{2b59f888 com.globalnest/.Main}
06-20 13:14:14.489: I/ActivityManager(255): Start proc com.sonyericsson.lockscreen.notifications for broadcast com.sonyericsson.lockscreen.notifications.facebook/.LockscreenReceiver: pid=23791 uid=10058 gids={3003}
06-20 13:14:14.579: I/ActivityThread(23791): Pub com.sonyericsson.lockscreen.notifications: com.sonyericsson.lockscreen.notifications.provider.NotificationProvider
06-20 13:14:14.759: D/dalvikvm(255): GC_CONCURRENT freed 499K, 39% free 8315K/13447K, external 2950K/3252K, paused 3ms+8ms
06-20 13:14:15.679: I/ActivityManager(255): Process com.sonyericsson.android.datamonitor (pid 22012) has died.
06-20 13:14:15.689: W/kernel(126): [50273.912445] select 21040 (com.aricent.mtp), adj 10, size 3198, to kill
06-20 13:14:15.689: W/kernel(126): [50273.912506] select 22012 (oid.datamonitor), adj 10, size 3567, to kill

please any one help me... 请任何人帮我...

THnaking you. 打你

06-20 13:13:39.839: E/AndroidRuntime(23778): Caused by: java.lang.NullPointerException
06-20 13:13:39.839: E/AndroidRuntime(23778):    at com.globalnest.CaptureActivity.onCreate(CaptureActivity.java:116)

There's your clue. 有你的线索。 Look at line 116 of CaptureActivity.java and figure out what could be unexpectedly null . 查看CaptureActivity.java的116行,找出可能出乎意料的null

You can probably assume that your process was killed by the Android OS if it was in the background for half an hour. 如果它在后台运行了半个小时,您可能会认为您的进程已被Android OS杀死。 So when you start the application again, the Android OS will recreate the process and restart only the Activity that was on top of the stack . 因此,当您再次启动该应用程序时,Android操作系统将重新创建该过程并重新启动位于堆栈顶部的Activity

If the Activity at the top of the stack relies on anything else (that other activities may have set up before), then your app will crash. 如果堆栈顶部的“活动”依赖于其他任何内容(其他活动之前可能已经设置过),则您的应用程序将崩溃。 This is because the entire activity stack is not recreated . 这是因为未重新创建整个活动堆栈。

With that in mind, review what might happen in that case. 考虑到这一点,请检查在这种情况下可能发生的情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM