Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25836

iOS: Using "run-on-main-thread", multiple global event listeners do not work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 7.1.0, Release 7.0.2
    • Fix Version/s: Release 7.3.0
    • Component/s: iOS
    • Labels:

      Description

      The following:

      var functionA = function(arg) {
      	Ti.App.removeEventListener('TestCheckNetwork', functionA);
      };
       
      var functionB = function(arg) {
      	Ti.App.removeEventListener('TestCheckNetwork', functionB);
      };
       
      Ti.App.addEventListener('TestCheckNetwork', functionA);
      Ti.App.addEventListener('TestCheckNetwork', functionB);
       
      Ti.App.fireEvent('TestCheckNetwork');
      

      If main-thread is enabled:

        <property name="run-on-main-thread" type="bool">true</property>
      

      There is the following issue:

      [ERROR] :  Script Error {
      [ERROR] :      column = 17;
      [ERROR] :      line = 511;
      [ERROR] :      message = "*** Collection <__NSArrayM: 0x608000049ea0> was mutated while being enumerated.";
      [ERROR] :      sourceURL = "";
      [ERROR] :  }
      [ERROR] :  ErrorController is up. ABORTING open
      

        Attachments

          Activity

            People

            • Assignee:
              vijaysingh Vijay Singh
              Reporter:
              andreas.pingas Andreas Pingas
              Reviewer:
              Hans Knöchel
              Tester:
              Samir Mohammed
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6229
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code