Hi all,
I have a question. Does the cursor error cause SQLiteException?
I also have the following information in the log file.
I am confused.Do the two exception ( IllegalStateException and
SQLiteException) will occur together if I don't close one of cursors?
Thank you.

01-14 21:02:53.262 E/AndroidRuntime( 1923): Uncaught handler: thread
main exiting due to uncaught exception
01-14 21:02:53.292 E/AndroidRuntime( 1923):
java.lang.RuntimeException: Unable to stop activity
{com.android.contacts/com.android.contacts.ContactsListActivity}:
android.database.sqlite.SQLiteException: Unable to close due to
unfinalised statements
01-14 21:02:53.292 E/AndroidRuntime( 1923):     at
android.app.ActivityThread.performDestroyActivity(ActivityThread.java:
3324)
01-14 21:02:53.292 E/AndroidRuntime( 1923):     at
android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:
3390)
01-14 21:02:53.292 E/AndroidRuntime( 1923):     at
android.app.ActivityThread.access$2700(ActivityThread.java:116)
01-14 21:02:53.292 E/AndroidRuntime( 1923):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1834)
01-14 21:02:53.292 E/AndroidRuntime( 1923):     at
android.os.Handler.dispatchMessage(Handler.java:99)
01-14 21:02:53.292 E/AndroidRuntime( 1923):     at android.os.Looper.loop
(Looper.java:123)
01-14 21:02:53.292 E/AndroidRuntime( 1923):     at
android.app.ActivityThread.main(ActivityThread.java:4211)
01-14 21:02:53.292 E/AndroidRuntime( 1923):     at
java.lang.reflect.Method.invokeNative(Native Method)
01-14 21:02:53.292 E/AndroidRuntime( 1923):     at
java.lang.reflect.Method.invoke(Method.java:521)
01-14 21:02:53.292 E/AndroidRuntime( 1923):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:793)
01-14 21:02:53.292 E/AndroidRuntime( 1923):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
                  .........



On Jan 26, 1:17 am, Romain Guy <romain...@android.com> wrote:
> It is not the normal behavior. Read the log, it tells you that you did
> not close one of your Cursors. Make sure you close them in your
> Activity's onDestroy() at the very least.
>
>
>
> On Mon, Jan 25, 2010 at 9:15 AM, Vic <kvic2...@gmail.com> wrote:
> > Hi all,
>
> > I develope an application about Contacts Provider. It includes many
> > database operations.
>
> > But there is a problem about sqlite exception. I have the following
> > information exits in the log file.
>
> > I am confused. Is it normal behavior?
>
> > Thanks.
>
> > 01-14 21:02:48.692 I/dalvikvm( 1923): Uncaught exception thrown by
> > finalizer (will be discarded):
> > 01-14 21:02:48.692 I/dalvikvm( 1923): Ljava/lang/
> > IllegalStateException;: Finalizing cursor
> > android.database.sqlite.sqlitecur...@2e56fef8 on people that has not
> > been deactivated or closed
> > 01-14 21:02:48.692 I/dalvikvm( 1923): at
> > android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
> > 01-14 21:02:48.702 I/dalvikvm( 1923): at dalvik.system.NativeStart.run
> > (Native Method)
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to