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

Kirill Anoshin commented on CB-10276:
-------------------------------------

Another 3rd party plugin that now causes 100% cpu is 
https://github.com/katzer/cordova-plugin-printer. This plugin must run in the 
main thread because calling UIKit from secondary thread causes errors and will 
be deprecated in future iOS releases.

> cordova-ios@4 is unstable
> -------------------------
>
>                 Key: CB-10276
>                 URL: https://issues.apache.org/jira/browse/CB-10276
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>         Environment: [email protected] [email protected]
>            Reporter: Kirill Anoshin
>            Priority: Blocker
>              Labels: cordova-ios-4.1.0
>
> Here is a demo project to reproduce unstable behavior - 
> https://github.com/kanoshin/cordova-bug-reproduction. You can try to run this 
> app ~20 times and I'm sure that you will be able to reproduce huge memory 
> leak and 100% cpu usage (both on real device and emulator). This app shows 
> current state on the screen - "Done!" means that everything is fine, any 
> other state is most likely a marker of 100% cpu usage.
> This app is using 3rd party plugin that works stable on previous versions of 
> cordova-ios. After some research I noticed that unstable behavior disappears 
> if I wrap all plugin calls in:
> {code}
> [self.commandDelegate runInBackground:^{
>     ...
> }];
> {code}
> block. Otherwise WebThread sometimes goes crazy and device becomes 
> unresponsive. I believe that this is a bug because previously it was ok to 
> run plugin calls that takes small amount of time in the main thread. Also it 
> seems that a lot of existing plugins don't care about running in background 
> thread and it makes update to cordova-ios@4 impossible.



--
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