You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Unrecognized selector crash when suspending and removing MGLOfflinePack #6092
When I try to cancel the download of an MGLOfflinePack, i get this error:
-[NSTaggedPointerString offlineRegionStatusDidChange:]: unrecognized selector sent to instance 0xa0000000148344a4
2016-08-19 16:53:08.187 ChemPark[659:57661] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString offlineRegionStatusDidChange:]: unrecognized selector sent to instance 0xa0000000148344a4'
*** First throw call stack:
(0x181aa6db0 0x18110bf80 0x181aadc4c 0x181aaabec 0x1819a8c5c 0x100f484e4 0x102ba9a7c 0x102ba9a3c 0x102baf4e4 0x181a5cd50 0x181a5abb8 0x181984c50 0x18326c088 0x186c6e088 0x1002b1c70 0x1815228b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
I am using this code for the task:
let packs = MGLOfflineStorage.sharedOfflineStorage().packs
for pack in packs! {
pack.suspend()
MGLOfflineStorage.sharedOfflineStorage().removePack(pack, withCompletionHandler: nil)
}
It seems similar to #4394, except this issue only seems to happen if i cancel the download, not after successfully completing the download.
let packs = MGLOfflineStorage.sharedOfflineStorage().packs
for pack in packs! {
MGLOfflineStorage.sharedOfflineStorage().removePack(pack, withCompletionHandler: nil)
}
Same crash, after a few starting and canceling cycles.
When I trie
let packs = MGLOfflineStorage.sharedOfflineStorage().packs
for pack in packs! {
let priority = DISPATCH_QUEUE_PRIORITY_DEFAULT
dispatch_async(dispatch_get_global_queue(priority, 0)) {
MGLOfflineStorage.sharedOfflineStorage().removePack(pack, withCompletionHandler: nil)
dispatch_async(dispatch_get_main_queue()) {
}
}
}
It seems to work for a little more starting a canceling cycles, but it crashes in the end as well.
I have seen this crash as well. I am on Mapbox-iOS-SDK-3.6.4. I've attached a stack trace. The line that crashes is [pack offlineRegionStatusDidChange:status];:
I have tried suspending the offline pack before removing as well as removing the offline pack without suspending, crashes occur in both cases. Can you help? This is one of the most frequent crashes in our app now.
Activity
1ec5 commentedon Aug 19, 2016
Related to #5538.
1ec5 commentedon Aug 19, 2016
Does the crash occur if you only remove the pack instead of canceling it? Removing the pack should cancel it automatically, if asynchronously.
Jackhammer42 commentedon Aug 22, 2016
I tried
Same crash, after a few starting and canceling cycles.
When I trie
It seems to work for a little more starting a canceling cycles, but it crashes in the end as well.
marceln commentedon Mar 28, 2017
This isn't fixed in any of the latest versions, right?
1ec5 commentedon Mar 29, 2017
#6186 should’ve made this crash less likely to occur; as a stale pointer issue, it’s difficult to say for sure that the crash is fixed.
Jackhammer42 commentedon Mar 30, 2017
I will try to produce the error with the latest version and give you feedback about the result.
Jackhammer42 commentedon Apr 5, 2017
sorry, still seeing this error :( (v. 3.5.0)
1ec5 commentedon Apr 5, 2017
MGLOfflinePack would really benefit from the sort of
std::anyusage being introduced to MGLStyleLayer and MGLSource in #8626 for #7375./cc @boundsj @jfirebaugh
georgejlee commentedon Oct 18, 2017
I have seen this crash as well. I am on Mapbox-iOS-SDK-3.6.4. I've attached a stack trace. The line that crashes is
[pack offlineRegionStatusDidChange:status];:I have tried suspending the offline pack before removing as well as removing the offline pack without suspending, crashes occur in both cases. Can you help? This is one of the most frequent crashes in our app now.
Unknown.txt
georgejlee commentedon Mar 6, 2018
This is still happening for me on 3.7.0. Any updates on this? Thanks.