Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10276

cordova-ios@4 is unstable

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-ios
    • Environment:

      cordova@5.4.1 cordova-ios@4.0.1

      Description

      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:

      [self.commandDelegate runInBackground:^{
          ...
      }];
      

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kanoshin Kirill Anoshin
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: