I am experiencing the same thing, using SDK 1.6. At first it happened
always the third time, but now it happens later. I have tried several
things but I always get the exception. I wonder if it would be ok to
leave it like that.

On Mar 15, 2:55 pm, creativepragmatic <[email protected]>
wrote:
> Hello,
>
> The following function throws the exception "Uncaught exception thrown
> by finalizer (will be discarded): Ljava/lang/IllegalStateException;:
> Finalizing cursor android.database.sqlite.sqlitecur...@437b64a8 on
> Stores that has not been deactivated or closed".
>
> private void generateList() {
>
>         try {
>                 listCursor = dbHelper.generateList(bundle.getString("STORE"),
>                         bundle.getString("PERCENT"));
>
>                 if(listCursor.moveToFirst())
>                         do {
>                                 Integer quantity = listCursor.getInt(0);
>                                 String itemName = listCursor.getString(1);
>
>                                 ListItem listItem = new ListItem(listId, 
> itemName, quantity,
> false);
>
>                                 dbHelper.insertItem(listItem);
>                                 alItems.add(listItem);
>                         } while(listCursor.moveToNext());
>         } catch(Exception ex) {
>                 ex.printStackTrace();
>         } finally {
>                 if(!listCursor.isClosed() || listCursor != null) {
>                         listCursor.deactivate();
>                         listCursor.close();
>                 }
>         }
>
>         iaList.notifyDataSetChanged();
>
> }
>
> The exception is usually thrown after the third time the function has
> been called.  LogCat shows the exception in green (Info) and does not
> seem to affect performance of the app when running on ADP2 after it
> has been disconnected.  When the line with alItems.add(listItem) is
> not commented out, the exception is not thrown.  I am using Android
> 1.5.
>
> Has anyone experience anything similar?

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to