0

我有一个应用程序需要将它保存的 3 个数据库表与 Android 联系人列表同步。

我遍历联系人列表,并为返回的每一行创建一个自定义对象,并将该对象属性与我为该联系人存储在我的应用程序表中的内容进行比较。

此任务在异步任务中执行。

它第一次运行时对我来说很好,但是如果我离开应用程序并多次返回它会中断并返回以下错误。有任何想法吗?

09-03 06:42:19.070: E/IMemory(31018): cannot dup fd=1023, size=2097152, err=0 (Too many open files)

09-03 06:42:19.070: E/IMemory(31018): cannot map BpMemoryHeap (binder=0x1197738), size=2097152, fd=-1 (Bad file number)

09-03 06:42:19.070: E/JavaBinder(31018): *** Uncaught remote exception!  (Exceptions are not yet supported across processes.)

09-03 06:42:19.070: E/JavaBinder(31018): java.lang.RuntimeException: No memory in memObj
09-03 
06:42:19.070: E/JavaBinder(31018):  at android.database.CursorWindow.native_init(Native Method)
09-03 
06:42:19.070: E/JavaBinder(31018):  at android.database.CursorWindow.<init>(CursorWindow.java:518)
09-03 
06:42:19.070: E/JavaBinder(31018):  at android.database.CursorWindow.<init>(CursorWindow.java:27)
09-03 
06:42:19.070: E/JavaBinder(31018):  at android.database.CursorWindow$1.createFromParcel(CursorWindow.java:493)

09-03 06:42:19.070: E/JavaBinder(31018):    at android.database.CursorWindow$1.createFromParcel(CursorWindow.java:496)
09-03 06:42:19.070: E/JavaBinder(31018):    at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:103)
09-03 06:42:19.070: E/JavaBinder(31018):    at android.os.Binder.execTransact(Binder.java:288)
09-03 06:42:19.070: E/JavaBinder(31018):    at dalvik.system.NativeStart.run(Native Method)
4

1 回答 1

1
E/IMemory(31018): cannot dup fd=1023, size=2097152, err=0 (Too many open files)

android.database.CursorWindow.native_init(Native Method)

这两行表明你正在用光标弄乱一些东西,比如不关闭等,

我建议正确关闭所有游标并观察应用程序的行为。

于 2012-09-03T06:02:44.673 回答