You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Michael Stanford (JIRA)" <ji...@apache.org> on 2016/02/10 09:53:18 UTC

[jira] [Comment Edited] (CB-10530) App freezes sometimes directly after starting on iOS

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

Michael Stanford edited comment on CB-10530 at 2/10/16 8:53 AM:
----------------------------------------------------------------

I experienced this issue too, new in Cordova 6.0.0. It freezes on phones, and pegs the CPU on the simulator.

It does seem to be some kind of race condition: when the onDeviceReady function is short and fast, the issue doesn't occur. When the onDeviceReady function takes a sufficient time (critical time varies from run to run), it fails to complete. 

Easily reproduced with a new empty project. Add the device and console plugins, and the iOS platform. Then in the onDeviceReady function put a console log statement, followed by a delay loop of about 100ms. Run it on the 6S simulator. Console log never executes. CPU pegs. Reduce the delay to about 50ms and everything works great.




was (Author: michaelstanford):
I experienced this issue too, new in Cordova 6.0.0. It does seem to be some kind of race condition: when the onDeviceReady function is short and fast, the issue doesn't occur. When the onDeviceReady function takes a sufficient time (critical time varies from run to run), it fails to complete. 

I put a console.log statement at the beginning of the onDeviceReady function, followed immediately by a return. This never hung. Moving the return statement sufficiently far down the onDeviceReady function, so some time was consumed, caused the console.log statement never to print, making it appear that the onDeviceReady function was not being called.

I don't have the splash screen plugin in my project. These are the plugins I have apart from device:

cordova-plugin-camera 2.1.0 "Camera"
cordova-plugin-console 1.0.2 "Console"
cordova-plugin-contacts 2.0.2-dev "Contacts"
cordova-plugin-customurlscheme 4.1.3 "Custom URL scheme"
cordova-plugin-ios-longpress-fix 1.1.0 "iOS LongPress Fix"
cordova-plugin-network-information 1.2.0 "Network Information"
cordova-plugin-statusbar 2.1.0 "StatusBar"
cordova-plugin-whitelist 1.2.1 "Whitelist"
ionic-plugin-keyboard 1.0.8 "Keyboard"
phonegap-plugin-push 1.5.3 "PushPlugin"



> 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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org