我正在开发一个在android中使用sqlite数据库的应用程序,最近我经常崩溃我认为与并发数据库访问有关,尽管数据库异常没有提到它..
这是错误:
09-15 15:25:45.672 195-1476/system_process V/ActivityManager﹕ Record #1 ActivityRecord{a52ecf58 u0 com.pauloslf.efatura/.MenuInicial}: app=ProcessRecord{a5317d60 0:com.pauloslf.efatura/u0a10049}
09-15 15:25:45.672 195-1476/system_process I/ActivityManager﹕ Removing activity ActivityRecord{a52ecf58 u0 com.pauloslf.efatura/.MenuInicial} from stack at 1: haveState=false stateNotNeeded=false finishing=true state=PAUSING
java.lang.RuntimeException: here
at com.android.server.am.ActivityStack.removeHistoryRecordsForAppLocked(ActivityStack.java:4249)
at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3015)
at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3085)
at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:897)
at android.os.BinderProxy.sendDeathNotice(Binder.java:470)
at dalvik.system.NativeStart.run(Native Method)
09-15 15:25:45.672 195-490/system_process W/InputDispatcher﹕ channel 'a5239e68 com.pauloslf.efatura/com.pauloslf.efatura.MenuInicial (server)' ~ Consumer closed input channel or an error occurred. events=0x9
09-15 15:25:45.672 195-490/system_process E/InputDispatcher﹕ channel 'a5239e68 com.pauloslf.efatura/com.pauloslf.efatura.MenuInicial (server)' ~ Channel is unrecoverably broken and will be disposed!
09-15 15:25:45.672 195-1476/system_process V/ActivityManager﹕ No result destination from ActivityRecord{a52ecf58 u0 com.pauloslf.efatura/.MenuInicial}
09-15 15:25:45.676 119-119/? D/Zygote﹕ Process 3287 terminated by signal (11)
09-15 15:25:45.684 195-1915/system_process W/InputDispatcher﹕ Attempted to unregister already unregistered input channel 'a5239e68 com.pauloslf.efatura/com.pauloslf.efatura.MenuInicial (server)'
我正在使用单例访问db类:
private static FacturasDB faturasdb = null;
public static FacturasDB getInstance(Context context) {
if (faturasdb == null) {
faturasdb = new FacturasDB(context);
}
return faturasdb;
}
对我来说,重现问题的最简单方法是在主要活动上启动asynctask(在后台进行数据库访问)并且我导航到另一个也使用数据库的活动。
知道为什么会出现这个问题吗?
提前多多感谢!