Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

MGLMapView willResignActive Crash #485

Closed
MarcoCarnevali opened this issue Sep 29, 2020 · 5 comments
Closed

MGLMapView willResignActive Crash #485

MarcoCarnevali opened this issue Sep 29, 2020 · 5 comments

Comments

@MarcoCarnevali
Copy link

Hello, a lot of our app users seems to have this crash happening. Seems to happen on willResignActive
I can't reproduce this, this is the stack trace coming from Crashlytics:

Crashed: com.apple.main-thread
0  libsystem_platform.dylib       0x1e21481a4 _platform_memmove + 164
1  AGXMetalA9                     0x1e269efc0 (Missing)
2  AGXMetalA9                     0x1e26807b4 (Missing)
3  AppleMetalGLRenderer           0x1e2755750 gldReadFramebufferData
4  GLEngine                       0x1cca09044 glReadPixels_Exec
5  GLKit                          0x1cb706044 -[GLKView snapshot] + 248
6  Mapbox                         0x105775824 -[MGLMapView willResignActive:] + 38044
7  CoreFoundation                 0x19c813098 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
8  CoreFoundation                 0x19c813058 ___CFXRegistrationPost_block_invoke + 48
9  CoreFoundation                 0x19c812650 _CFXRegistrationPost + 400
10 CoreFoundation                 0x19c812048 _CFXNotificationPost + 696
11 Foundation                     0x19da31b20 -[NSNotificationCenter postNotificationName:object:userInfo:] + 60
12 UIKitCore                      0x19f0e9b74 -[UIApplication _deactivateForReason:notify:] + 1540
13 UIKitCore                      0x19e7d2b6c __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 928
14 UIKitCore                      0x19ecf482c _UIScenePerformActionsWithLifecycleActionMask + 100
15 UIKitCore                      0x19e7d2734 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 196
16 UIKitCore                      0x19e7d223c -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 472
17 UIKitCore                      0x19e7d2560 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 740
18 UIKitCore                      0x19e7d1e1c -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 336
19 UIKitCore                      0x19e7d99bc __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 188
20 UIKitCore                      0x19ec0e0a0 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 812
21 UIKitCore                      0x19ed0c10c _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 244
22 UIKitCore                      0x19e7d9754 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 348
23 UIKitCore                      0x19e61b9b4 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 772
24 UIKitCore                      0x19e61a454 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
25 UIKitCore                      0x19e61b600 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 220
26 UIKitCore                      0x19ec34d84 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 464
27 FrontBoardServices             0x1ab12f4b0 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 456
28 FrontBoardServices             0x1ab157cec __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 124
29 FrontBoardServices             0x1ab13c410 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 232
30 FrontBoardServices             0x1ab157c38 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 368
31 libdispatch.dylib              0x19c4e9280 _dispatch_client_callout + 16
32 libdispatch.dylib              0x19c48eb0c _dispatch_block_invoke_direct$VARIANT$mp + 224
33 FrontBoardServices             0x1ab17b4b8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40
34 FrontBoardServices             0x1ab17b180 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 404
35 FrontBoardServices             0x1ab17b654 -[FBSSerialQueue _performNextFromRunLoopSource] + 28
36 CoreFoundation                 0x19c830240 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
37 CoreFoundation                 0x19c830140 __CFRunLoopDoSource0 + 204
38 CoreFoundation                 0x19c82f488 __CFRunLoopDoSources0 + 256
39 CoreFoundation                 0x19c829a40 __CFRunLoopRun + 776
40 CoreFoundation                 0x19c829200 CFRunLoopRunSpecific + 572
41 GraphicsServices               0x1b2924598 GSEventRunModal + 160
42 UIKitCore                      0x19f0ef004 -[UIApplication _run] + 1052
43 UIKitCore                      0x19f0f45d8 UIApplicationMain + 164
44 <AppName>                         0x10443aa18 main + 28 (MapRouteSelection.swift:28)
45 libdyld.dylib                  0x19c508598 start + 4

Mapbox SDK versions: 5.5.1
**iOS versions: 13 and 14 **
Device/simulator models: every iPhone models
Xcode version: 12.0

@nnhubbard
Copy link

You need to update to a newer version of the SDK. The bug fix for the GLView snapshot bug was added I think in v6.2.

@alessandrodn
Copy link

I wonder if would it be possible to update Mapbox SDK to 6.2, while using Mapbox 0.40?

@1ec5
Copy link
Contributor

1ec5 commented Oct 23, 2020

Hi @alessandrodn, we don’t currently have any plans to update navigation SDK v0.40.x to support map SDK v6.x. In part that’s because the new installation process for map SDK v6.x would be backwards-incompatible with navigation SDK v0.40.x’s installation process. Moreover, navigation SDK v1.0 supports map SDK v6.x and comes with many improvements to both route tracking and the UI, so that’s where we’re currently focusing our efforts. If you’re finding it difficult to upgrade to navigation SDK v1.0, we’d like to hear why, either in the https://github.com/mapbox/mapbox-navigation-ios/issues/ or a message to the Mapbox Support team. Thanks for your understanding.

@alessandrodn
Copy link

Hi @1ec5,
thanks for the answer.
There are some issues in upgrading to Mapbox 1.0 when using CocoaPods.
One of the required packages (MapboxCommon) requires CocoaPods 1.10.x to work (there an issue in the linkage reported 2674) and that version of CocoaPods was not officially available until last week.
Since we are stuck with Cocoapods 1.9.x, I developed a small patch to fix the linking issue.

Anyway I can confirm that updating to Mapbox 1.0 fixes the crash.

@julianrex
Copy link
Contributor

Closed as fixed.

n8han added a commit to flutter-mapbox-gl/maps that referenced this issue Jan 28, 2021
The 6.0.0 upgrade had no breaking changes:

> This major release does not include any breaking changes to public
> APIs. We are treating this release as a SEMVER major change because
> our installation instructions have changed.
https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v6.0.0

I did however need to cast the `accessToken` as a `String` to satisfy
the compiler after this upgrade.

Prior to the upgrade I was seeing crashes from this bug, which was fixed
in 6.2: mapbox/mapbox-gl-native-ios#485

So far I don't see any issues at all after the upgrade.

Developers will need to configure their access token in order to fetch
the mapbox sdk for this an future versions, described here:
https://docs.mapbox.com/ios/maps/guides/install/
n8han added a commit to flutter-mapbox-gl/maps that referenced this issue Jan 28, 2021
The 6.0.0 upgrade had no breaking changes:

> This major release does not include any breaking changes to public
> APIs. We are treating this release as a SEMVER major change because
> our installation instructions have changed.
https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v6.0.0

I did however need to cast the `accessToken` as a `String` to satisfy
the compiler after this upgrade.

Prior to the upgrade I was seeing crashes from this bug, which was fixed
in 6.2: mapbox/mapbox-gl-native-ios#485

So far I don't see any issues at all after the upgrade.

Developers will need to configure their access token in order to fetch
the mapbox sdk for this an future versions, described here:
https://docs.mapbox.com/ios/maps/guides/install/
n8han added a commit to flutter-mapbox-gl/maps that referenced this issue Jan 28, 2021
The 6.0.0 upgrade had no breaking changes:

> This major release does not include any breaking changes to public
> APIs. We are treating this release as a SEMVER major change because
> our installation instructions have changed.
https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v6.0.0

I did however need to cast the `accessToken` as a `String` to satisfy
the compiler after this upgrade.

Prior to the upgrade I was seeing crashes from this bug, which was fixed
in 6.2: mapbox/mapbox-gl-native-ios#485

So far I don't see any issues at all after the upgrade.

Developers will need to configure their access token in order to fetch
the mapbox sdk for this an future versions, described here:
https://docs.mapbox.com/ios/maps/guides/install/
n8han added a commit to flutter-mapbox-gl/maps that referenced this issue Jan 28, 2021
The 6.0.0 upgrade had no breaking changes:

> This major release does not include any breaking changes to public
> APIs. We are treating this release as a SEMVER major change because
> our installation instructions have changed.
https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v6.0.0

I did however need to cast the `accessToken` as a `String` to satisfy
the compiler after this upgrade.

Prior to the upgrade I was seeing crashes from this bug, which was fixed
in 6.2: mapbox/mapbox-gl-native-ios#485

So far I don't see any issues at all after the upgrade.

Developers will need to configure their access token in order to fetch
the mapbox sdk for this an future versions, described here:
https://docs.mapbox.com/ios/maps/guides/install/
tobrun added a commit to flutter-mapbox-gl/maps that referenced this issue Apr 12, 2021
* Update to Mapbox-iOS-SDK 6.3.0

The 6.0.0 upgrade had no breaking changes:

> This major release does not include any breaking changes to public
> APIs. We are treating this release as a SEMVER major change because
> our installation instructions have changed.
https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v6.0.0

I did however need to cast the `accessToken` as a `String` to satisfy
the compiler after this upgrade.

Prior to the upgrade I was seeing crashes from this bug, which was fixed
in 6.2: mapbox/mapbox-gl-native-ios#485

So far I don't see any issues at all after the upgrade.

Developers will need to configure their access token in order to fetch
the mapbox sdk for this an future versions, described here:
https://docs.mapbox.com/ios/maps/guides/install/

* Setup .netrc for iOS mapbox sdk download

Writes a `~/.netrc` file containing the credentials needed to download
the iOS mapbox sdk. I'm not experienced with github workflow so I'm just
hoping that I can write to the home directory of whatever container it
runs in. This should allow curl to find and use the given credentials.

Co-authored-by: tobrun <tobrun.van.nuland@gmail.com>
m0nac0 added a commit to maplibre/flutter-maplibre-gl that referenced this issue Oct 5, 2021
* Change iOS dependencies to Maplibre

* Update MapLibre dependency

* Set iOS deployment target to 9.0

* fix Podfile syntax

* Podfile: comment out platform key

* set MinimumOSVersion: 9.0; uncomment Podfile:platform key

* CI: verbose iOS build

* Update IPHONEOS_DEPLOYMENT_TARGET to 9.0

* [web] Fix Mapbox GL JS CSS embedding (#551)

Fixes #514

* iOS: update Podfile to fix CI (#565)

* Update deprecated patterns to fix CI static analysis  (#568)

* [offline][android] Add setOffline method (#537)

* Add batch mode of screen location (#554)

* Change SDK version of example

* Add toScreenLocationBatch

* Add custom marker example

* Define which annotations consume tap events (Multiple annotations on click area management) (#575)

* AnnotationClickOrder working (not order but activation/desactivation)

* Switch to annotationConsumeTapEvents method

* Remove failed offline pack downloads (#583)

When a download error occurs, the app is informed through the channel so
that it can display an appropriate error. However, on subsequent calls
to list the available downloaded packs it is surprising to see that the
failed region download is present as if it had been downloaded.

There is no way for the app to repair this incomplete pack. Therefore,
it seems much better to clean up the failed download as soon as it's
detected. If any tiles were downloaded they will be at least temporarily
in the cache and available to a future re-download attempt. This follows
the same logic as failures caused by hitting the tile limit.

* [docs] update changelog for v0.11.0 release (#584)

* [release] update pubspec for v0.11.0 (#585)

* add annotationOrder to web (#588)

* emits onTap only for the feature above the others (#589)

* [web] update image dependency to ^3.0.2 (#598)

* [android] bumpn release to v9.6.0 and use SDK registry distribution mechanism (#489)

* [iOS][Android] Batch creation/removal for circles, fills and lines (#576)

* added batch mode

* added circle support

* added remove features

* removed test code

* inital android implementation

* added documentation

* removed unused code

* add batch example

* fix feature mamager on release build (#593)

* Improve description to enable location features (#596)

* Update to Mapbox-iOS-SDK 6.3.0 (#513)

* Update to Mapbox-iOS-SDK 6.3.0

The 6.0.0 upgrade had no breaking changes:

> This major release does not include any breaking changes to public
> APIs. We are treating this release as a SEMVER major change because
> our installation instructions have changed.
https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v6.0.0

I did however need to cast the `accessToken` as a `String` to satisfy
the compiler after this upgrade.

Prior to the upgrade I was seeing crashes from this bug, which was fixed
in 6.2: mapbox/mapbox-gl-native-ios#485

So far I don't see any issues at all after the upgrade.

Developers will need to configure their access token in order to fetch
the mapbox sdk for this an future versions, described here:
https://docs.mapbox.com/ios/maps/guides/install/

* Setup .netrc for iOS mapbox sdk download

Writes a `~/.netrc` file containing the credentials needed to download
the iOS mapbox sdk. I'm not experienced with github workflow so I'm just
hoping that I can write to the home directory of whatever container it
runs in. This should allow curl to find and use the given credentials.

Co-authored-by: tobrun <tobrun.van.nuland@gmail.com>

* [docs] update changeog for v0.12.0 (#602)

* [release] v0.12.0 (#603)

* fix: update MapLibre dependencies and imports.

* fix: update String cast

* Fix maplibre dependency (org.maplibre.gl has migrated to maven central)

* Update iOS MapLibre to 5.12.0

* Bump MapLibreAnnotationExtension to 0.0.1-beta.3

* Update maplibre_gl.podspec

* [iOS] - Fix compilation issue with maplibre 5.12.0

* Update CHANGELOG.md

Co-authored-by: m0nac0 <58807793+m0nac0@users.noreply.github.com>
Co-authored-by: shroff <ashroff6@gmail.com>
Co-authored-by: Yoshikage Ochi <yoshikage.ochi@mapbox.com>
Co-authored-by: Stephane Trepier <stephane.trepier@gmail.com>
Co-authored-by: Nathan <nathan@transit.app>
Co-authored-by: Tobrun <tobrun.van.nuland@gmail.com>
Co-authored-by: Andrea Valenzano <andr3a689@gmail.com>
Co-authored-by: Ahmed <ahm322@hotmail.com>
Co-authored-by: Felix Horvat <felix.horvat@ocell.aero>
Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Co-authored-by: Konrad Koeppe <konrad.koeppe@bareways.com>
Co-authored-by: Vincent Berthet <vincent@web-74.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants