Hi, Looks like you may forget closing cursor. On Thu, Sep 24, 2009 at 6:19 AM, pskr <[email protected]> wrote:
> > Hi, > We have an application which adds, updates and deletes contacts. > Some times, we get the following error and DB gets corrupted and we > loose all contacts. I pasted the relevant log at the end. > > If you look closely, the error originates with 'Too many open files'. > We just use ContentResolver API (insert, update, delete, query) to > manipulate the DB and no file operations. We are closing Cursors > properly, etc. To me, it looks like a bug in CursorWindow > implementation or ContentResolver (whcih uses CursorWindow). DId > anybody observe this? Any solution/ work around/ patch? > > E/IMemory ( 1257): cannot dup fd=1023, size=1048576, err=0 (Too many > open files) > E/IMemory ( 1257): cannot map BpMemoryHeap (binder=0x9c1618), > size=1048576, fd=-1 (Bad file number) > E/JavaBinder( 1257): *** Uncaught remote exception! (Exceptions are > not yet supported across processes.) > E/JavaBinder( 1257): java.lang.RuntimeException: No memory in memObj > E/JavaBinder( 1257): at android.database.CursorWindow.native_init > (Native Method) > E/JavaBinder( 1257): at android.database.CursorWindow.<init> > (CursorWindow.java:467) > E/JavaBinder( 1257): at android.database.CursorWindow.<init> > (CursorWindow.java:27) > E/JavaBinder( 1257): at android.database.CursorWindow > $1.createFromParcel(CursorWindow.java:442) > E/JavaBinder( 1257): at android.database.CursorWindow > $1.createFromParcel(CursorWindow.java:440) > E/JavaBinder( 1257): at > android.content.ContentProviderNative.onTransact > (ContentProviderNative.java:95) > E/JavaBinder( 1257): at android.os.Binder.execTransact(Binder.java: > 287) > E/JavaBinder( 1257): at dalvik.system.NativeStart.run(Native > Method) > ..... > E/Database( 1257): Removing corrupt database: /data/data/ > com.android.providers.contacts/databases/contacts.db > D/AndroidRuntime( 1257): Shutting down VM > > Thanks, > Sudheer > > > > -- Best Regards, Joy Aurora Device Search - The Real Android Universal Search Engine http://android-aurora.appspot.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

