cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
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

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

ASF GitHub Bot commented on CB-14020:
-------------------------------------

Unibozu commented on issue #104: CB-14020: (ios) Fix "Collection was mutated while being enumerated"
crash
URL: https://github.com/apache/cordova-plugin-geolocation/pull/104#issuecomment-403786092
 
 
   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
   ![image](https://user-images.githubusercontent.com/1690498/42506170-09ef4c2c-8439-11e8-85f7-f383f7ac7655.png)
   

----------------------------------------------------------------
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:
users@infra.apache.org


> cordova-plugin-geolocation crashes with "Collection was mutated while being enumerated"
> ---------------------------------------------------------------------------------------
>
>                 Key: CB-14020
>                 URL: https://issues.apache.org/jira/browse/CB-14020
>             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: https://github.com/apache/cordova-plugin-geolocation/pull/91
> 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
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message