You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/03/06 18:16:44 UTC

[jira] [Commented] (CB-6181) Android exec() bridge sometimes processes messages outside synchronously

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

ASF subversion and git services commented on CB-6181:
-----------------------------------------------------

Commit 7b681f2acc894c010342e9de3cfd2000be7e9360 in cordova-js's branch refs/heads/master from [~agrieve]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;h=7b681f2 ]

CB-6181 android: Always execute exec() callbacks async.


> Android exec() bridge sometimes processes messages outside synchronously
> ------------------------------------------------------------------------
>
>                 Key: CB-6181
>                 URL: https://issues.apache.org/jira/browse/CB-6181
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>            Reporter: Andrew Grieve
>            Assignee: Andrew Grieve
>            Priority: Minor
>
> This causes a problem for angular apps, which (correctly) call $scope.apply() in their async functions. Found this to happen in AppHarness:
> {code}
> Error: [$rootScope:inprog] $digest already in progress
> http://errors.angularjs.org/1.2.3/$rootScope/inprog?p0=%24digest
>     at file:///android_asset/www/cdvah/js/libs/angular.js:78:12
>     at beginPhase (file:///android_asset/www/cdvah/js/libs/angular.js:11970:15)
>     at Scope.$apply (file:///android_asset/www/cdvah/js/libs/angular.js:11767:11)
>     at file:///android_asset/www/cdvah/js/ListCtrl.js:105:24
>     at Object.cordova.callbackFromNative (file:///android_asset/www/cordova.js:292:54)
>     at processMessage (file:///android_asset/www/cordova.js:1029:21)
>     at Function.androidExec.processMessages (file:///android_asset/www/cordova.js:1063:13)
>     at androidExec (file:///android_asset/www/cordova.js:922:25)
>     at Object.exports.listening (file:///android_asset/www/plugins/org.apache.appharness.push/js/push.js:12:5)
>     at new <anonymous> (file:///android_asset/www/cdvah/js/ListCtrl.js:103:29) 
> {code}
> What we should be doing here is using a setTimeout() to ensure the messages are processed in their own run-loop cycle.



--
This message was sent by Atlassian JIRA
(v6.2#6252)