2015-10-07 166 views
0

我设计了一个应用程序来绘制LatLngMarkersGoogle Map V2。我在SQLite Database中存储了LatLng值。这一切都运作良好。但有时候,当我在其他应用程序之间切换并恢复我的应用程序时,屏幕显示为黑色并返回,软键不起作用。我必须重新启动以再次打开应用程序。 我在stacktrace中监控了我的手机,但我无法理解这个问题。我在这里发布了我的Stacktrace。请帮助我。Android-有时应用程序挂着黑色屏幕说渠道是无法恢复打破

我的堆栈跟踪

10-07 11:52:20.126 1216-1316/? E/﹕ no predefined limited group find for com.realtech.latlngrecorder, add to foreground group 
10-07 11:52:20.976  933-946/? I/Timeline﹕ Timeline: Activity_windows_visible id: ActivityRecord{43296ca0 u0 com.realtech.latlngrecorder/.LocationsList t55} time:77643091 
10-07 11:52:33.376 15866-15876/? W/SQLiteConnectionPool﹕ A SQLiteConnection object for database '/data/data/com.realtech.latlngrecorder/databases/latLngDB' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed. 
10-07 11:52:33.376 15866-15876/? W/SQLiteConnectionPool﹕ A SQLiteConnection object for database '/data/data/com.realtech.latlngrecorder/databases/latLngDB' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed. 
10-07 11:54:12.986 1216-1216/? D/WhetstoneStrategy﹕ kill process in { PackageName :com.realtech.latlngrecorder Pid: 15866 Start by: activity Score:10 Old score:50 state:128 mBackgroundTimeInMillis:1444199053000 WakelockCount:0 wakelogsize:0 ActivityDestroied:false Activity size: 2 PackageInfo:{WhetstonePackageInfo#PacakgeName:com.realtech.latlngrecorderFlag:5312 [,TRIMHEAPS,SOFT_RESET,ZRAM,FLAG_DEAL_SCHEDULE] Type:0[] } tasknum:59} 
10-07 11:54:12.996  933-1491/? I/ActivityManager﹕ Killing 15866:com.realtech.latlngrecorder/u0a110 (adj 7): kill background 
10-07 11:54:13.126  933-1173/? I/WindowState﹕ WIN DEATH: Window{4279e108 u0 com.realtech.latlngrecorder/com.realtech.latlngrecorder.MainPage} 
10-07 11:54:13.146  933-977/? W/InputDispatcher﹕ channel '43aa65d0 com.realtech.latlngrecorder/com.realtech.latlngrecorder.LocationsList (server)' ~ Consumer closed input channel or an error occurred. events=0x9 
10-07 11:54:13.146  933-977/? E/InputDispatcher﹕ channel '43aa65d0 com.realtech.latlngrecorder/com.realtech.latlngrecorder.LocationsList (server)' ~ Channel is unrecoverably broken and will be disposed! 
10-07 11:54:13.146  933-1491/? W/InputDispatcher﹕ Attempted to unregister already unregistered input channel '43aa65d0 com.realtech.latlngrecorder/com.realtech.latlngrecorder.LocationsList (server)' 
10-07 11:54:13.146  933-1491/? I/WindowState﹕ WIN DEATH: Window{43aa65d0 u0 com.realtech.latlngrecorder/com.realtech.latlngrecorder.LocationsList} 
10-07 11:54:13.176  933-948/? W/LocationManagerService﹕ RemoteException calling onLocationChanged on Reciever[43426f90 listener UpdateRecord[gps com.realtech.latlngrecorder(10110) Request[ACCURACY_FINE gps requested=0 fastest=0]]] 
10-07 11:54:13.176  933-948/? W/LocationManagerService﹕ RemoteException calling onLocationChanged on Reciever[438453b0 listener UpdateRecord[gps com.realtech.latlngrecorder(10110) Request[ACCURACY_FINE gps requested=0 fastest=0]]] 
10-07 11:54:34.136  933-1215/? I/ActivityManager﹕ Start proc com.realtech.latlngrecorder for activity com.realtech.latlngrecorder/.LocationsList: pid=12918 uid=10110 gids={50110, 3003, 1028, 1015} 
10-07 11:54:34.296 1216-1316/? E/﹕ no predefined limited group find for com.realtech.latlngrecorder, add to foreground group 
10-07 11:54:34.446 12918-12918/? D/ActivityThread﹕ handleBindApplication:com.realtech.latlngrecorder 
10-07 11:54:35.136 1015-1015/? D/PhoneStatusBar﹕ addNotification pkg=com.realtech.latlngrecorder;basepkg=com.android.systemui;id=252119 
10-07 11:54:44.466  933-946/? E/WindowManager﹕ Starting window AppWindowToken{43695b28 token=Token{43296e00 ActivityRecord{43296ca0 u0 com.realtech.latlngrecorder/.LocationsList t55}}} timed out 
10-07 11:54:54.046  933-947/? E/ActivityManager﹕ ANR in com.realtech.latlngrecorder (com.realtech.latlngrecorder/.LocationsList) 
PID: 12918 
Reason: Input dispatching timed out (Waiting because no window has focus but there is a focused application that may eventually add a window when it finishes starting up.) 
Parent: com.ttxapps.dropsync/com.ttxapps.syncapp.MainActivity 
    Load: 5.33/4.76/4.41 
CPU usage from 5618ms to 0ms ago: 
99% 12918/com.realtech.latlngrecorder: 98% user + 1% kernel/faults: 2799 minor 
1.7% 933/system_server: 0.7% user + 1% kernel/faults: 368 minor 4 major 
0.7% 12640/com.ttxapps.dropsync: 0.5% user + 0.1% kernel/faults: 17 minor 
0.3% 1015/com.android.systemui: 0.3% user + 0% kernel/faults: 5 minor 
    0.3% 1175/com.google.android.gms.persistent: 0.1% user + 0.1% kernel/faults: 7 minor 1 major 
0.3% 1892/com.lbe.security.miui: 0.1% user + 0.1% kernel/faults: 6 minor 1 major 
0% 1//init: 0% user + 0% kernel/faults: 92 minor 
0.1% 132/irq/327-ft5x06_: 0% user + 0.1% kernel 
0% 138/cfinteractive: 0% user + 0% kernel 
0% 143/mmcqd/0: 0% user + 0% kernel 
0% 1133/com.xiaomi.xmsf: 0% user + 0% kernel/faults: 10 minor 
0.1% 9027/kworker/0:5: 0% user + 0.1% kernel 
0% 12423/kworker/1:4: 0% user + 0% kernel 
52% TOTAL: 50% user + 1.5% kernel + 0.1% iowait 
CPU usage from 2667ms to 3183ms later with 98% awake: 
98% 12918/com.realtech.latlngrecorder: 98% user + 0% kernel/faults: 245 minor 
100% 12918/.latlngrecorder: 100% user + 0% kernel 
3.8% 933/system_server: 1.9% user + 1.9% kernel 
3.8% 947/ActivityManager: 1.9% user + 1.9% kernel 
1.4% 12452/com.google.android.gms: 1.4% user + 0% kernel/faults: 3 minor 
1.4% 12760/Chrome_IOThread: 1.4% user + 0% kernel 
5.2% TOTAL: 0% user + 0% kernel + 5.1% iowait 
10-07 11:54:57.796  933-947/? W/ActivityManager﹕ Activity pause timeout for ActivityRecord{43296ca0 u0 com.realtech.latlngrecorder/.LocationsList t55} 
10-07 11:55:01.596 1216-1316/? E/﹕ no predefined limited group find for com.realtech.latlngrecorder, add to foreground group 
10-07 11:55:06.186  933-947/? W/ActivityManager﹕ Activity pause timeout for ActivityRecord{43296ca0 u0 com.realtech.latlngrecorder/.LocationsList t55} 

回答

0

这是一个有点困难,该处你的错误/问题,原因你没有分享您的代码,但我认为这个问题是,你不密切的联系你的数据库,然后到达它使用所有手机资源并因此崩溃的地步。查看代码,查看内存泄漏的位置。