Libor Zapletal
Libor Zapletal

Reputation: 14102

MGLMapView - Mapbox annotations crash

I have crashes in Crashlytics tool and I don't know how to fix them. Screenshot of how it looks in Crashlytics:

Crashlytics screenshot

It seems that problem is in Mapbox source codes. Codes from my project:

DispatchQueue.global(qos: .userInitiated).async {
   let annotsToRemove = self?.mapView.annotations?.filter({ $0 is MapDangerAnnotation })
   let annotsToAdd = dangers.map { MapDangerAnnotation(danger: $0) }

84 line is middle line with filter function. I don't know what could be wrong. Do you know where could be problem? One thing I could think of is that I am not working in main thread but it's just working in most cases and crashing just in few cases.

Thanks, for help

Upvotes: 0

Views: 351

Answers (0)

Related Questions