Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - SQLiteException Unable to close due to unfinalised statement

SQLiteException Unable to close due to unfinalised statement

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

SQLiteException Unable to close due to unfinalised statement

Postby victoheart » Thu Jan 21, 2010 11:45 am

Hi all,

I'm developing an app which involvels too many database operations(insertion & retrievel).

The problem is about Cursor and Contact Provider. The SQLiteException shows Unable to close due to unfinalised statement. It happened in the following code.

if(mObserverRegistered){
mObserverRegistered = false;
mContactsListCursor.unregisterContentObserver(mObserver);
^^^^^^^^^^^^^^^^^^^^^^^
}
if(mContactsListCursor != null)
mContactsListCursor.close();

mContactsListCursor = cursor;

if(cursor != null){
Log.d(TAG, "observer registered");
mContactsListCursor.registerContentObserver(mObserver);
mObserverRegistered = true;
}


The Exception shows in the following.

Does anybody know how to solve problem?

Thank you.

Uncaught handler: thread main exiting due to uncaught exception
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
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3324)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3390)
at android.app.ActivityThread.access$2700(ActivityThread.java:116)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1834)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4211)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.database.sqlite.SQLiteException: Unable to close due to unfinalised statements
at android.database.sqlite.SQLiteDatabase.dbclose(Native Method)
at android.database.sqlite.SQLiteDatabase.onAllReferencesReleased(SQLiteDatabase.java:241)
at android.database.sqlite.SQLiteClosable.releaseReference(SQLiteClosable.java:42)
at android.database.sqlite.SQLiteProgram.onAllReferencesReleased(SQLiteProgram.java:67)
at android.database.sqlite.SQLiteClosable.releaseReference(SQLiteClosable.java:42)
at android.database.sqlite.SQLiteProgram.close(SQLiteProgram.java:221)
at android.database.sqlite.SQLiteQuery.close(SQLiteQuery.java:141)
at android.database.sqlite.SQLiteCursor.close(SQLiteCursor.java:507)
at android.database.CursorWrapper.close(CursorWrapper.java:45)
at android.content.ContentResolver$CursorWrapperInner.close(ContentResolver.java:800)
at com.android.contacts.ContactsListActivity$ContactItemListAdapter.changeCursor
(ContactsListActivity.java:2393)
at com.android.contacts.ContactsListActivity.onStop(ContactsListActivity.java:1053)
at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1245)
at android.app.Activity.performStop(Activity.java:3680)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3319)
victoheart
Freshman
Freshman
 
Posts: 4
Joined: Wed Jan 20, 2010 9:02 am

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 5 guests