You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Vladimir Kotikov (JIRA)" <ji...@apache.org> on 2015/11/21 13:16:11 UTC

[jira] [Commented] (CB-8517) App crash because of ContentResolver query returned null on lollipop device

    [ https://issues.apache.org/jira/browse/CB-8517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15020416#comment-15020416 ] 

Vladimir Kotikov commented on CB-8517:
--------------------------------------

[~arunpv], [~manoj.kp], i see a potential source of NPE in {{ContactAccessorSdk5}}, but to fix this properly i need find out why contentResolver returns null cursor there.

Could you please add a bit more details so i can reproduce this: {{contacts.find}} params would be very useful, Also, does this happen only on MotoG device, or other devices also affected?

> App crash because of ContentResolver query returned null on lollipop device
> ---------------------------------------------------------------------------
>
>                 Key: CB-8517
>                 URL: https://issues.apache.org/jira/browse/CB-8517
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts
>         Environment: Lollipop, MotoG
>            Reporter: Manoj Katari P
>              Labels: Android, triaged
>
> ContentResolver.query() can return null in devices running with lollipop.
> Its not handled in contacts plugin at ContactAccessorSdk5.java:186 for idCursor
> ---------------------------------------------------------------------------
> FATAL EXCEPTION: pool-1-thread-38
> E/AndroidRuntime(17921): Process: com.toshiba.uclient, PID: 17921
> E/AndroidRuntime(17921): java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.database.Cursor.moveToNext()' on a null object reference
> E/AndroidRuntime(17921): 	at org.apache.cordova.contacts.ContactAccessorSdk5.search(ContactAccessorSdk5.java:186)
> E/AndroidRuntime(17921): 	at org.apache.cordova.contacts.ContactManager$1.run(ContactManager.java:93)
> E/AndroidRuntime(17921): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
> E/AndroidRuntime(17921): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
> E/AndroidRuntime(17921): 	at java.lang.Thread.run(Thread.java:818)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org