Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-9630

CursorWindowAllocationException

    XMLWordPrintableJSON

Details

    Description

      Whilst running a contacts lookup (with many 1000s of auto generated contacts as I'm testing performance) I experienced the following exception:
      android.database.CursorWindowAllocationException: Cursor window could not be created from binder

          android.database.CursorWindowAllocationException: Cursor window could not be created from binder.
                  at android.database.CursorWindow.<init>(CursorWindow.java:150)
                  at android.database.CursorWindow.<init>(CursorWindow.java:42)
                  at android.database.CursorWindow$1.createFromParcel(CursorWindow.java:698)
                  at android.database.CursorWindow$1.createFromParcel(CursorWindow.java:696)
                  at android.database.BulkCursorDescriptor.readFromParcel(BulkCursorDescriptor.java:75)
                  at android.database.BulkCursorDescriptor$1.createFromParcel(BulkCursorDescriptor.java:34)
                  at android.database.BulkCursorDescriptor$1.createFromParcel(BulkCursorDescriptor.java:30)
                  at android.content.ContentProviderProxy.query(ContentProviderNative.java:423)
                  at android.content.ContentResolver.query(ContentResolver.java:484)
                  at android.content.ContentResolver.query(ContentResolver.java:428)
                  at org.apache.cordova.contacts.ContactAccessorSdk5.photoQuery(ContactAccessorSdk5.java:910)
                  at org.apache.cordova.contacts.ContactAccessorSdk5.populateContactArray(ContactAccessorSdk5.java:439)
                  at org.apache.cordova.contacts.ContactAccessorSdk5.search(ContactAccessorSdk5.java:271)
                  at org.apache.cordova.contacts.ContactManager$1.run(ContactManager.java:93)
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                  at java.lang.Thread.run(Thread.java:818)
      

      From the following post, I can see why: http://stackoverflow.com/questions/14316082/cursor-window-could-not-be-created-from-binder

      photoCursor.close();

      is being called only when the cursor is not empty. I've made an update to my copy but though I should report it as well.

      I only started to notice after upgrading a device to 5.0.1 (have devices on older android versions that are ok)

      Attachments

        Issue Links

          Activity

            People

              vladimir.kotikov Vladimir Kotikov
              mcassidygamma Martin Cassidy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: