Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6556119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:54:13+00:00 2026-05-25T12:54:13+00:00

I have a weird problem with listview, while using simplecursor adapter. Here is the

  • 0

I have a weird problem with listview, while using simplecursor adapter. Here is the error

08-31 21:50:14.540: INFO/dalvikvm(12195): Uncaught exception thrown by finalizer (will be discarded):
08-31 21:50:14.540: INFO/dalvikvm(12195): java.lang.IllegalStateException: Binder has been finalized!
08-31 21:50:14.540: INFO/dalvikvm(12195):     at android.os.BinderProxy.transact(Native Method)
08-31 21:50:14.540: INFO/dalvikvm(12195):     at android.database.BulkCursorProxy.close(BulkCursorNative.java:289)
08-31 21:50:14.540: INFO/dalvikvm(12195):     at android.database.BulkCursorToCursorAdaptor.close(BulkCursorToCursorAdaptor.java:141)
08-31 21:50:14.540: INFO/dalvikvm(12195):     at android.database.CursorWrapper.close(CursorWrapper.java:43)
08-31 21:50:14.540: INFO/dalvikvm(12195):     at android.content.ContentResolver$CursorWrapperInner.close(ContentResolver.java:1575)
08-31 21:50:14.540: INFO/dalvikvm(12195):     at android.content.ContentResolver$CursorWrapperInner.finalize(ContentResolver.java:1586)
08-31 21:50:14.540: INFO/dalvikvm(12195):     at dalvik.system.NativeStart.run(Native Method)

I have runQueryOnBackgroundThread implemented in my cursorAdapter, which is invoked by the Filter.filter method call from the activity. So I dont have any reference of the cursor in my activity. Everytime I query I understand I get cursor changed callback in my cursor adapter, which extends SimpleCursorAdapter

Here is how it looks

public void changeCursor(Cursor cursor) {
        Log.d(TAG, "Cursor changed ... **************** "+ cursor);
        if (cursor != null) {
            setLoading(false);
        }
        super.changeCursor(cursor);
        initSectionHeaders(cursor);
        notifyDataSetChanged();
    }

runQueryOnBackgroundThread() just returns a cursor from a query.

Am I missing something, should the cursor be closed or managed anywhere? Any help on the leads would greatly help. Thanks in advance.

**UPDATE** Snippets of my adapter

public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
        Log.d(TAG, "runQueryOnBackgroundThread "+ constraint);
        if (getFilterQueryProvider() != null) {
            return getFilterQueryProvider().runQuery(constraint);
        }
        return doQuery(constraint, People.CONTENT_URI);
    }

private Cursor doQuery(CharSequence constraint, Uri queryUri){
        StringBuilder selectionStrBuilder = new StringBuilder();
        String selectionArgs[] = null;
        String selection = null;

        if(constraint!=null){
            //ADDING GLOB so that the sql query can interpret linux style wildcards
            selectionStrBuilder.append("(UPPER(").append(People.DISPLAY_NAME).append(") GLOB ?)");

            selection = selectionStrBuilder.toString();
            String constraintStr = constraint.toString().toUpperCase();

            //prepend and append '*' - TODO improve
            constraintStr = "*"+ constraintStr;
            constraintStr +="*";

            selectionArgs = new String[]{constraintStr};
        }
        ContentResolver contentRes = context.getContentResolver();
        return contentRes.query(queryUri, null, selection, selectionArgs, People.DISPLAY_NAME);
    }

Other than these two functions I have changeCursor overridden as posted earlier and use the cursor in bind view to get the data. I don’t close or modify cursor properties anywhere else.

My provider getQuery function looks like

SQLiteDatabase db = dbHelper.getReadableDatabase();
        Cursor c = qb.query(db, projection, selection, selectionArgs, null, null, orderBy);

        // Tell the cursor what uri to watch,
        // so it knows when its source data changes
        c.setNotificationUri(getContext().getContentResolver(), uri);
        return c;

UPDATE2*

When I run the same program on the emulator I get this stack trace, which is very different from what I see on the tablet.

01-03 17:21:44.130: ERROR/IMemory(9328): binder=0x3891a0 transaction failed fd=-2147483647, size=0, err=-2147483646 (Unknown error: 2147483646)
01-03 17:21:44.130: ERROR/IMemory(9328): cannot dup fd=-2147483647, size=0, err=-2147483646 (Bad file number)
01-03 17:21:44.130: ERROR/IMemory(9328): cannot map BpMemoryHeap (binder=0x3891a0), size=0, fd=-1 (Bad file number)
01-03 17:21:44.130: WARN/dalvikvm(9328): JNI WARNING: JNI method called with exception raised
01-03 17:21:44.130: WARN/dalvikvm(9328):              in Ldalvik/system/NativeStart;.run ()V (CallStaticVoidMethodV)
01-03 17:21:44.130: WARN/dalvikvm(9328): Pending exception is:
01-03 17:21:44.130: INFO/dalvikvm(9328): Ljava/lang/RuntimeException;: No memory in memObj
01-03 17:21:44.130: INFO/dalvikvm(9328):     at android.database.CursorWindow.native_init(Native Method)
01-03 17:21:44.130: INFO/dalvikvm(9328):     at android.database.CursorWindow.<init>(CursorWindow.java:518)
01-03 17:21:44.130: INFO/dalvikvm(9328):     at android.database.CursorWindow.<init>(CursorWindow.java:27)
01-03 17:21:44.130: INFO/dalvikvm(9328):     at android.database.CursorWindow$1.createFromParcel(CursorWindow.java:493)
01-03 17:21:44.130: INFO/dalvikvm(9328):     at android.database.CursorWindow$1.createFromParcel(CursorWindow.java:491)
01-03 17:21:44.130: INFO/dalvikvm(9328):     at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:103)
01-03 17:21:44.130: INFO/dalvikvm(9328):     at android.os.Binder.execTransact(Binder.java:320)
01-03 17:21:44.130: INFO/dalvikvm(9328):     at dalvik.system.NativeStart.run(Native Method)
01-03 17:21:44.130: INFO/dalvikvm(9328): "Binder Thread #3" prio=5 tid=9 NATIVE
01-03 17:21:44.130: INFO/dalvikvm(9328):   | group="main" sCount=0 dsCount=0 obj=0x405de828 self=0x8e288
01-03 17:21:44.130: INFO/dalvikvm(9328):   | sysTid=9336 nice=0 sched=0/0 cgrp=[fopen-error:24] handle=959480
01-03 17:21:44.130: INFO/dalvikvm(9328):   at dalvik.system.NativeStart.run(Native Method)
01-03 17:21:44.130: ERROR/dalvikvm(9328): VM aborting

And Crashes the application.

I found a bug report on this issue here

Anyone faced the same problem? Any help would be appreciated.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:54:14+00:00Added an answer on May 25, 2026 at 12:54 pm

    Ah finally found a soln to this freaking issue. Just that some cursor in some other part of the framework was open. Works when closed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a weird problem using the Java Box class. I am using JDK
I have a weird problem here. In short to the environment we have: There
I have a weird problem with HTML select box height in Firefox 2, here's
I have a weird problem! I'm trying to create a listview with checkboxes. In
I have weird problem. I'm using Eclipse for writing J2EE (java, jsf, javascript) application
I have a weird problem, I want to add a global query using context
i have a weird problem. i would like to delete an assembly(plugin.dll on harddisk)
I have a weird problem with images in visual web developer, I cant change
I have a weird problem where after setting nocheck on a foreign constraint and
I have this weird problem with setting up cookies with PHP. Everything worked fine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.