cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-14020) cordova-plugin-geolocation crashes with "Collection was mutated while being enumerated"
Date Tue, 10 Jul 2018 11:10:00 GMT


ASF GitHub Bot commented on CB-14020:

Unibozu commented on issue #104: CB-14020: (ios) Fix "Collection was mutated while being enumerated"
   Some visibility regarding this issue would be appreciated.
   About 5% of our users (more than 2,000 over the last 3 months) are affected by this issue.
Since the exception is not caught, it crashes the app as soon as `addWatch` is called under
specific circumstances (which we haven't been able to reproduce). We call `addWatch` very
early when our application starts, and some users have reported that trying to start the app
again multiple times in a row seems to be a temporary solution.
   It's irrelevant of the iOS version or iphone model.
   Almost all of these crashes are due to CDVLocation

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> cordova-plugin-geolocation crashes with "Collection was mutated while being enumerated"
> ---------------------------------------------------------------------------------------
>                 Key: CB-14020
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-geolocation
>    Affects Versions: Master
>         Environment: iOS 11
> cordova-ios@4.3.1
> cordova-plugin-geolocation@2.4.2
> Although I am running an older version, this issue does not appear to be fixed in the
latest plugin version as the relevant code has not been changed.
> The javascript in my app is making multiple calls to `navigator.geolocation.getCurrentPosition()`
in rapid succession.
>            Reporter: Elijah R
>            Priority: Major
>              Labels: crash, easyfix, pull-request-available, race-condition
>         Attachments: crash-log.txt
> There is a race condition in CDVLocation.m.  The self.locationData.locationCallbacks
array can be mutated in one thread and enumerated concurrently in another thread, which causes
the app to crash with the following exception:
> Fatal Exception: NSGenericException
> Collection <__NSArrayM: 0x1d444d020> was mutated while being enumerated.
> The exception is raised at [CDVLocation returnLocationError:withMessage:] (CDVLocation.m:312)
> I am unable to reproduce the issue, however it is a common crash for users of my app.
 A user named seeday on github has opened a pull request to address this issue:
> I'm filing this bug to help get that work merged.
> I've attached an abridged crash log with the relevant stack trace.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message