cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon MacDonald (JIRA)" <>
Subject [jira] [Created] (CB-1969) Searching for emails in Contacts throws an exception always errors out
Date Wed, 05 Dec 2012 20:13:58 GMT
Simon MacDonald created CB-1969:

             Summary: Searching for emails in Contacts throws an exception always errors out
                 Key: CB-1969
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 2.2.0, 2.1.0
            Reporter: Simon MacDonald
            Assignee: Simon MacDonald
            Priority: Critical
             Fix For: 2.3.0

I just upgraded to Cordova 2.2 and now my app crashes whenever I try to look for contacts.
 This only happens when "emails" is listed in the fields to search.  I went back to 2.1 and
found that although the device did not crash, it would call the error callback each time.
 Going back to 2.0 fixes the issue entirely. I have been testing this on a Galaxy Nexus running
Android 4.1

The code to reproduce:

                var contactOptions = new ContactFindOptions();
                contactOptions.filter = searchString;
                contactOptions.multiple = true;

                var fields = ["displayName", "name", "emails"];
                navigator.contacts.find(fields, callback, function (error) { alert('error='
+ error); }, contactOptions);

The stack trace:

?:??: W/?(?): threadid=16: thread exiting with uncaught exception (group=0x41bed300)
?:??: W/?(?): [ 12-05 09:57:39.230 18818:19071 E/AndroidRuntime ]
?:??: W/?(?): FATAL EXCEPTION: pool-1-thread-9
?:??: W/?(?): java.lang.IllegalStateException: Couldn't read row 5, col -1 from CursorWindow.
 Make sure the Cursor is initialized correctly before accessing data from it.
?:??: W/?(?): 	at android.database.CursorWindow.nativeGetString(Native Method)
?:??: W/?(?): 	at android.database.CursorWindow.getString(
?:??: W/?(?): 	at android.database.AbstractWindowedCursor.getString(
?:??: W/?(?): 	at android.database.CursorWrapper.getString(
?:??: W/?(?): 	at org.apache.cordova.ContactAccessorSdk5.emailQuery(
?:??: W/?(?): 	at org.apache.cordova.ContactAccessorSdk5.populateContactArray(
?:??: W/?(?): 	at
?:??: W/?(?): 	at org.apache.cordova.ContactManager$
?:??: W/?(?): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(
?:??: W/?(?): 	at java.util.concurrent.ThreadPoolExecutor$
?:??: W/?(?): 	at

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message