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

Torsten Freyhall edited comment on CB-10530 at 2/11/16 8:34 PM:
----------------------------------------------------------------

Checked a little more, and the reason for the freeze is because the 
handleBridgeChange() function always indicates that the bridge has changed 
since `if (execProxy !== cordovaExec())` always returns true.

Bridge change causes the current command stack to be executed in the new 
bridge, which then runs pokeNative again. The handleBridgeChange basically does 
while(var a = stack.shift()) { exec(a) } and then exec(a) does stack.push(a), 
which causes the inifinite loop since stack is never emptied, because the 
bridge hasn't actually changed.

This was changed in the recent commit f2e056e5fe945801b518b752871f5c64c0a28a88, 
which makes sense since this was changed between cordova-ios 3.9 and 4.0.

I can't really understand what is the intended check, maybe [~shazron] can have 
a look at what was intented?



was (Author: toostn):
Checked a little more, and the reason for the freeze is because the 
handleBridgeChange() function always indicates that the bridge has changed 
since `if (execProxy !== cordovaExec())` always returns true.

Bridge change causes the current command stack to be executed in the new 
bridge, which then runs pokeNative again. The handleBridgeChange basically does 
while(var a = stack.shift()) { exec(a) } and then exec(a) does stack.push(a), 
which causes the inifinite loop since stack is never emptied.

This was changed in the recent commit f2e056e5fe945801b518b752871f5c64c0a28a88, 
which makes sense since this was changed between cordova-ios 3.9 and 4.0.

I can't really understand what is the intended check, maybe [~shazron] can have 
a look at what was intented?


> App freezes sometimes directly after starting on iOS
> ----------------------------------------------------
>
>                 Key: CB-10530
>                 URL: https://issues.apache.org/jira/browse/CB-10530
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 6.0.0
>         Environment: OSX El Capitan 10.11.3, XCODE (7.2.1), iOS 9.2.1, 
> cordova 6.0.0, ionic 1.7.14
>            Reporter: Florian Krüger
>            Priority: Critical
>              Labels: triaged
>         Attachments: Instruments.trace.zip
>
>
> * Installed the "ionic start myApp sidemenu" example application
> * Start XCODE (7.2.1)
> * Start the app by clicking the run button from  xCODE
> * The app probably starts as expected.
> * Repeat the start process until the app freezes.
> The app sometimes freezes completely. If this happens you cannot do anything 
> with the app (you need to push the home button and close the app via task 
> manager). I had the same issue for another more complex app.
> The CPU stays at around 99% workload.
> I made a snapshot of the profiler (Instruments)
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to