[ 
https://issues.apache.org/jira/browse/CB-9628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Kotikov updated CB-9628:
---------------------------------
    Description: 
I encounter an aleatory crash with my Cordova Application on android smartphone 
One plus One (device product:bacon model:A0001 device:A0001).

Is there any error on my code ? Can you tell me what I could do ?
Thank you.

Here is the AngularJS function : 

{noformat}
    getAllContacts : function(){
      var deferred = $q.defer();
    
      var onSuccess = function(contacts) {
        deferred.resolve(contacts);
      };
      var onError = function(contactError) {
        deferred.reject(contactError);
      };
    
      var options = new ContactFindOptions();
      options.filter = "";
      options.multiple = true;
      var fields = ["*"];
    
      navigator.contacts.find(fields, onSuccess, onError, options);

      return deferred.promise;
    },
{noformat}

Here is the crash LOG I got from ADB LOGCAT:
{noformat}
    I/chromium(10453): [INFO:CONSOLE(95)] "getContacts", source: 
file:///android_asset/www/app/components/contacts/ContactsService.js (95)
    
    D/LBSSystemMonitorService(  758): handleMessage what - 4
    
    D/Wiper_jni(  758): Send Network Location.
    
    I/chromium(10453): [INFO:CONSOLE(22)] "$ionicView.enter ListContactsCtrl", 
source: 
file:///android_asset/www/app/components/contacts/importContactsController.js 
(22)
    
    I/chromium(10453): [INFO:CONSOLE(5)] "homeCtrl", source: 
file:///android_asset/www/app/components/home/homeController.js (5)
    
    W/CursorWindow(17276): Window is full: requested allocation 168 bytes, free 
space 75 bytes, window size 2097152 bytes
    
    I/art     (  758): Explicit concurrent mark sweep GC freed 186688(8MB) 
AllocSpace objects, 9(144KB) LOS objects, 28% free, 40MB/56MB, paused
    4.019ms total 193.548ms
    
    D/HeadsetStateMachine( 3762): Disconnected process message: 10, size: 0
    
    W/ActivityManager(  758): getRunningAppProcesses: caller 10086 does not 
hold REAL_GET_TASKS; limiting output
    
    I/art     (17276): Explicit concurrent mark sweep GC freed 36472(2MB) 
AllocSpace objects, 0(0B) LOS objects, 40% free, 19MB/33MB, paused
    2.271ms total 58.172ms
    
    W/ActivityManager(  758): getRunningAppProcesses: caller 10103 does not 
hold REAL_GET_TASKS; limiting output
    
    D/HeadsetStateMachine( 3762): Disconnected process message: 10, size: 0
    
    E/CursorWindow(10453): Could not create CursorWindow from Parcel due to 
error -12.
    
    --------- beginning of crash
    
    E/AndroidRuntime(10453): FATAL EXCEPTION: pool-3-thread-3
    
    E/AndroidRuntime(10453): Process: net.myapp.app, PID: 10453
    
    E/AndroidRuntime(10453): android.database.CursorWindowAllocationException: 
Cursor window could not be created from binder.
    
    E/AndroidRuntime(10453):    at 
android.database.CursorWindow.<init>(CursorWindow.java:137)
    
    E/AndroidRuntime(10453):    at 
android.database.CursorWindow.<init>(CursorWindow.java:42)
    
    E/AndroidRuntime(10453):    at 
android.database.CursorWindow$1.createFromParcel(CursorWindow.java:685)
    
    E/AndroidRuntime(10453):    at 
android.database.CursorWindow$1.createFromParcel(CursorWindow.java:683)
    
    E/AndroidRuntime(10453):    at 
android.database.BulkCursorDescriptor.readFromParcel(BulkCursorDescriptor.java:75)
    
    E/AndroidRuntime(10453):    at 
android.database.BulkCursorDescriptor$1.createFromParcel(BulkCursorDescriptor.java:34)
    
    E/AndroidRuntime(10453):    at 
android.database.BulkCursorDescriptor$1.createFromParcel(BulkCursorDescriptor.java:30)
    
    E/AndroidRuntime(10453):    at 
android.content.ContentProviderProxy.query(ContentProviderNative.java:424)
    
    E/AndroidRuntime(10453):    at 
android.content.ContentResolver.query(ContentResolver.java:478)
    
    E/AndroidRuntime(10453):    at 
android.content.ContentResolver.query(ContentResolver.java:422)
    
    E/AndroidRuntime(10453):    at 
org.apache.cordova.contacts.ContactAccessorSdk5.photoQuery(ContactAccessorSdk5.java:910)
    
    E/AndroidRuntime(10453):    at 
org.apache.cordova.contacts.ContactAccessorSdk5.populateContactArray(ContactAccessorSdk5.java:439)
    
    E/AndroidRuntime(10453):    at 
org.apache.cordova.contacts.ContactAccessorSdk5.search(ContactAccessorSdk5.java:271)
    
    E/AndroidRuntime(10453):    at 
org.apache.cordova.contacts.ContactManager$1.run(ContactManager.java:93)
    
    E/AndroidRuntime(10453):    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    
    E/AndroidRuntime(10453):    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    
    E/AndroidRuntime(10453):    at java.lang.Thread.run(Thread.java:818)
    
    W/DropBoxManagerService(  758): Dropping: data_app_crash (1587 > 0 bytes)
    
    D/LogFetchServiceManager( 4073): Received entry added
    
    W/ActivityManager(  758):   Force finishing activity 1 
net.myapp.app/.MainActivity
    
    D/OpenGLRenderer(  758): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
{noformat}


  was:
I encounter an aleatory crash with my Cordova Application on android smartphone 
One plus One (device product:bacon model:A0001 device:A0001).

Is there any error on my code ? Can you tell me what I could do ?
Thank you.

Here is the AngularJS function : 


    getAllContacts : function(){
      var deferred = $q.defer();
    
      var onSuccess = function(contacts) {
        deferred.resolve(contacts);
      };
      var onError = function(contactError) {
        deferred.reject(contactError);
      };
    
      var options = new ContactFindOptions();
      options.filter = "";
      options.multiple = true;
      var fields = ["*"];
    
      navigator.contacts.find(fields, onSuccess, onError, options);
    
    
      return deferred.promise;
    },



*****************
Here is the crash LOG I got from ADB LOGCAT:
*****************
    I/chromium(10453): [INFO:CONSOLE(95)] "getContacts", source: 
file:///android_asset/www/app/components/contacts/ContactsService.js (95)
    
    D/LBSSystemMonitorService(  758): handleMessage what - 4
    
    D/Wiper_jni(  758): Send Network Location.
    
    I/chromium(10453): [INFO:CONSOLE(22)] "$ionicView.enter ListContactsCtrl", 
source: 
file:///android_asset/www/app/components/contacts/importContactsController.js 
(22)
    
    I/chromium(10453): [INFO:CONSOLE(5)] "homeCtrl", source: 
file:///android_asset/www/app/components/home/homeController.js (5)
    
    W/CursorWindow(17276): Window is full: requested allocation 168 bytes, free 
space 75 bytes, window size 2097152 bytes
    
    I/art     (  758): Explicit concurrent mark sweep GC freed 186688(8MB) 
AllocSpace objects, 9(144KB) LOS objects, 28% free, 40MB/56MB, paused
    4.019ms total 193.548ms
    
    D/HeadsetStateMachine( 3762): Disconnected process message: 10, size: 0
    
    W/ActivityManager(  758): getRunningAppProcesses: caller 10086 does not 
hold REAL_GET_TASKS; limiting output
    
    I/art     (17276): Explicit concurrent mark sweep GC freed 36472(2MB) 
AllocSpace objects, 0(0B) LOS objects, 40% free, 19MB/33MB, paused
    2.271ms total 58.172ms
    
    W/ActivityManager(  758): getRunningAppProcesses: caller 10103 does not 
hold REAL_GET_TASKS; limiting output
    
    D/HeadsetStateMachine( 3762): Disconnected process message: 10, size: 0
    
    E/CursorWindow(10453): Could not create CursorWindow from Parcel due to 
error -12.
    
    --------- beginning of crash
    
    E/AndroidRuntime(10453): FATAL EXCEPTION: pool-3-thread-3
    
    E/AndroidRuntime(10453): Process: net.myapp.app, PID: 10453
    
    E/AndroidRuntime(10453): android.database.CursorWindowAllocationException: 
Cursor window could not be created from binder.
    
    E/AndroidRuntime(10453):    at 
android.database.CursorWindow.<init>(CursorWindow.java:137)
    
    E/AndroidRuntime(10453):    at 
android.database.CursorWindow.<init>(CursorWindow.java:42)
    
    E/AndroidRuntime(10453):    at 
android.database.CursorWindow$1.createFromParcel(CursorWindow.java:685)
    
    E/AndroidRuntime(10453):    at 
android.database.CursorWindow$1.createFromParcel(CursorWindow.java:683)
    
    E/AndroidRuntime(10453):    at 
android.database.BulkCursorDescriptor.readFromParcel(BulkCursorDescriptor.java:75)
    
    E/AndroidRuntime(10453):    at 
android.database.BulkCursorDescriptor$1.createFromParcel(BulkCursorDescriptor.java:34)
    
    E/AndroidRuntime(10453):    at 
android.database.BulkCursorDescriptor$1.createFromParcel(BulkCursorDescriptor.java:30)
    
    E/AndroidRuntime(10453):    at 
android.content.ContentProviderProxy.query(ContentProviderNative.java:424)
    
    E/AndroidRuntime(10453):    at 
android.content.ContentResolver.query(ContentResolver.java:478)
    
    E/AndroidRuntime(10453):    at 
android.content.ContentResolver.query(ContentResolver.java:422)
    
    E/AndroidRuntime(10453):    at 
org.apache.cordova.contacts.ContactAccessorSdk5.photoQuery(ContactAccessorSdk5.java:910)
    
    E/AndroidRuntime(10453):    at 
org.apache.cordova.contacts.ContactAccessorSdk5.populateContactArray(ContactAccessorSdk5.java:439)
    
    E/AndroidRuntime(10453):    at 
org.apache.cordova.contacts.ContactAccessorSdk5.search(ContactAccessorSdk5.java:271)
    
    E/AndroidRuntime(10453):    at 
org.apache.cordova.contacts.ContactManager$1.run(ContactManager.java:93)
    
    E/AndroidRuntime(10453):    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    
    E/AndroidRuntime(10453):    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    
    E/AndroidRuntime(10453):    at java.lang.Thread.run(Thread.java:818)
    
    W/DropBoxManagerService(  758): Dropping: data_app_crash (1587 > 0 bytes)
    
    D/LogFetchServiceManager( 4073): Received entry added
    
    W/ActivityManager(  758):   Force finishing activity 1 
net.myapp.app/.MainActivity
    
    D/OpenGLRenderer(  758): Use EGL_SWAP_BEHAVIOR_PRESERVED: true



> cordova-plugin-contacts crashes the app
> ---------------------------------------
>
>                 Key: CB-9628
>                 URL: https://issues.apache.org/jira/browse/CB-9628
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts
>    Affects Versions: 5.2.0
>         Environment: Smartphone android One plus One : device product:bacon 
> model:A0001 device:A0001
>            Reporter: Rony Cohen
>            Assignee: Vladimir Kotikov
>              Labels: Android, android, triaged
>
> I encounter an aleatory crash with my Cordova Application on android 
> smartphone One plus One (device product:bacon model:A0001 device:A0001).
> Is there any error on my code ? Can you tell me what I could do ?
> Thank you.
> Here is the AngularJS function : 
> {noformat}
>     getAllContacts : function(){
>       var deferred = $q.defer();
>     
>       var onSuccess = function(contacts) {
>         deferred.resolve(contacts);
>       };
>       var onError = function(contactError) {
>         deferred.reject(contactError);
>       };
>     
>       var options = new ContactFindOptions();
>       options.filter = "";
>       options.multiple = true;
>       var fields = ["*"];
>     
>       navigator.contacts.find(fields, onSuccess, onError, options);
>       return deferred.promise;
>     },
> {noformat}
> Here is the crash LOG I got from ADB LOGCAT:
> {noformat}
>     I/chromium(10453): [INFO:CONSOLE(95)] "getContacts", source: 
> file:///android_asset/www/app/components/contacts/ContactsService.js (95)
>     
>     D/LBSSystemMonitorService(  758): handleMessage what - 4
>     
>     D/Wiper_jni(  758): Send Network Location.
>     
>     I/chromium(10453): [INFO:CONSOLE(22)] "$ionicView.enter 
> ListContactsCtrl", source: 
> file:///android_asset/www/app/components/contacts/importContactsController.js 
> (22)
>     
>     I/chromium(10453): [INFO:CONSOLE(5)] "homeCtrl", source: 
> file:///android_asset/www/app/components/home/homeController.js (5)
>     
>     W/CursorWindow(17276): Window is full: requested allocation 168 bytes, 
> free space 75 bytes, window size 2097152 bytes
>     
>     I/art     (  758): Explicit concurrent mark sweep GC freed 186688(8MB) 
> AllocSpace objects, 9(144KB) LOS objects, 28% free, 40MB/56MB, paused
>     4.019ms total 193.548ms
>     
>     D/HeadsetStateMachine( 3762): Disconnected process message: 10, size: 0
>     
>     W/ActivityManager(  758): getRunningAppProcesses: caller 10086 does not 
> hold REAL_GET_TASKS; limiting output
>     
>     I/art     (17276): Explicit concurrent mark sweep GC freed 36472(2MB) 
> AllocSpace objects, 0(0B) LOS objects, 40% free, 19MB/33MB, paused
>     2.271ms total 58.172ms
>     
>     W/ActivityManager(  758): getRunningAppProcesses: caller 10103 does not 
> hold REAL_GET_TASKS; limiting output
>     
>     D/HeadsetStateMachine( 3762): Disconnected process message: 10, size: 0
>     
>     E/CursorWindow(10453): Could not create CursorWindow from Parcel due to 
> error -12.
>     
>     --------- beginning of crash
>     
>     E/AndroidRuntime(10453): FATAL EXCEPTION: pool-3-thread-3
>     
>     E/AndroidRuntime(10453): Process: net.myapp.app, PID: 10453
>     
>     E/AndroidRuntime(10453): 
> android.database.CursorWindowAllocationException: Cursor window could not be 
> created from binder.
>     
>     E/AndroidRuntime(10453):  at 
> android.database.CursorWindow.<init>(CursorWindow.java:137)
>     
>     E/AndroidRuntime(10453):  at 
> android.database.CursorWindow.<init>(CursorWindow.java:42)
>     
>     E/AndroidRuntime(10453):  at 
> android.database.CursorWindow$1.createFromParcel(CursorWindow.java:685)
>     
>     E/AndroidRuntime(10453):  at 
> android.database.CursorWindow$1.createFromParcel(CursorWindow.java:683)
>     
>     E/AndroidRuntime(10453):  at 
> android.database.BulkCursorDescriptor.readFromParcel(BulkCursorDescriptor.java:75)
>     
>     E/AndroidRuntime(10453):  at 
> android.database.BulkCursorDescriptor$1.createFromParcel(BulkCursorDescriptor.java:34)
>     
>     E/AndroidRuntime(10453):  at 
> android.database.BulkCursorDescriptor$1.createFromParcel(BulkCursorDescriptor.java:30)
>     
>     E/AndroidRuntime(10453):  at 
> android.content.ContentProviderProxy.query(ContentProviderNative.java:424)
>     
>     E/AndroidRuntime(10453):  at 
> android.content.ContentResolver.query(ContentResolver.java:478)
>     
>     E/AndroidRuntime(10453):  at 
> android.content.ContentResolver.query(ContentResolver.java:422)
>     
>     E/AndroidRuntime(10453):  at 
> org.apache.cordova.contacts.ContactAccessorSdk5.photoQuery(ContactAccessorSdk5.java:910)
>     
>     E/AndroidRuntime(10453):  at 
> org.apache.cordova.contacts.ContactAccessorSdk5.populateContactArray(ContactAccessorSdk5.java:439)
>     
>     E/AndroidRuntime(10453):  at 
> org.apache.cordova.contacts.ContactAccessorSdk5.search(ContactAccessorSdk5.java:271)
>     
>     E/AndroidRuntime(10453):  at 
> org.apache.cordova.contacts.ContactManager$1.run(ContactManager.java:93)
>     
>     E/AndroidRuntime(10453):  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
>     
>     E/AndroidRuntime(10453):  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
>     
>     E/AndroidRuntime(10453):  at java.lang.Thread.run(Thread.java:818)
>     
>     W/DropBoxManagerService(  758): Dropping: data_app_crash (1587 > 0 bytes)
>     
>     D/LogFetchServiceManager( 4073): Received entry added
>     
>     W/ActivityManager(  758):   Force finishing activity 1 
> net.myapp.app/.MainActivity
>     
>     D/OpenGLRenderer(  758): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
> {noformat}



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

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

Reply via email to