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

Assert failure when app is in the background #15037

Closed
jmkiley opened this issue Jul 1, 2019 · 4 comments · Fixed by #15083
Closed

Assert failure when app is in the background #15037

jmkiley opened this issue Jul 1, 2019 · 4 comments · Fixed by #15083
Assignees
Labels
bug Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS

Comments

@jmkiley
Copy link
Contributor

jmkiley commented Jul 1, 2019

Steps to reproduce

  1. Run iosapp.
  2. Send the app to the background.
  3. Reopen iosapp

Expected behavior

The app should reopen.

Actual behavior

The app displays a white screen, with the following console output.

Assertion failed: (gfx::BackendScope::exists()), function reduceMemoryUse, file /Users/Kiley/Desktop/repos/mapbox-gl-native/src/mbgl/renderer/renderer_impl.cpp, line 226.

backtrace
 thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001ad4f6f04 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x00000001ad6cec20 libsystem_pthread.dylib`pthread_kill + 224
    frame #2: 0x00000001ad576af4 libsystem_c.dylib`abort + 104
    frame #3: 0x00000001ad575e48 libsystem_c.dylib`__assert_rtn + 292
  * frame #4: 0x0000000105a10080 Mapbox`mbgl::Renderer::Impl::reduceMemoryUse(this=0x0000000113909980) at renderer_impl.cpp:226:5
    frame #5: 0x0000000105a09fbc Mapbox`mbgl::Renderer::reduceMemoryUse(this=0x00000002825977c0) at renderer.cpp:119:11
    frame #6: 0x000000010545deec Mapbox`MGLRenderFrontend::reduceMemoryUse(this=0x0000000283208900) at MGLRendererFrontend.h:66:19
    frame #7: 0x0000000105464538 Mapbox`::-[MGLMapView willResignActive:](self=0x000000011600da00, _cmd="willResignActive:", notification="UIApplicationWillResignActiveNotification") at MGLMapView.mm:1378:28
    frame #8: 0x00000001aca9b0dc Foundation`__57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_2 + 28
    frame #9: 0x00000001ace014b0 CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28
    frame #10: 0x00000001ace01500 CoreFoundation`___CFXRegistrationPost1_block_invoke + 68
    frame #11: 0x00000001ace007e4 CoreFoundation`_CFXRegistrationPost1 + 436
    frame #12: 0x00000001ace00468 CoreFoundation`___CFXNotificationPost_block_invoke + 108
    frame #13: 0x00000001acd79dc8 CoreFoundation`-[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1424
    frame #14: 0x00000001acdffd64 CoreFoundation`_CFXNotificationPost + 1268
    frame #15: 0x00000001ac98afec Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 64
    frame #16: 0x00000001b4cf8844 UIKitCore`-[UIApplication _deactivateForReason:notify:] + 848
    frame #17: 0x00000001b44c4de0 UIKitCore`-[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 268
    frame #18: 0x00000001b44c51e8 UIKitCore`-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 744
    frame #19: 0x00000001b44c4a74 UIKitCore`-[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340
    frame #20: 0x00000001b44c8ee4 UIKitCore`__186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 168
    frame #21: 0x00000001b4977494 UIKitCore`___UISceneSettingsDiffActionPerformChangesWithTransitionContext_block_invoke + 28
    frame #22: 0x00000001b488d490 UIKitCore`+[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 868
    frame #23: 0x00000001b497744c UIKitCore`_UISceneSettingsDiffActionPerformChangesWithTransitionContext + 260
    frame #24: 0x00000001b44c8b54 UIKitCore`__186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 176
    frame #25: 0x00000001b4977334 UIKitCore`_UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 108
    frame #26: 0x00000001b44c8998 UIKitCore`-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 392
    frame #27: 0x00000001b4345c68 UIKitCore`__64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 640
    frame #28: 0x00000001b4344a64 UIKitCore`-[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 372
    frame #29: 0x00000001b4345998 UIKitCore`-[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 236
    frame #30: 0x00000001b48b00b8 UIKitCore`-[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 480
    frame #31: 0x00000001af5ba630 FrontBoardServices`-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:] + 560
    frame #32: 0x00000001af5e2ce4 FrontBoardServices`__88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke_2 + 136
    frame #33: 0x00000001af5c4fbc FrontBoardServices`-[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240
    frame #34: 0x00000001af5e2c00 FrontBoardServices`__88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke + 200
    frame #35: 0x000000011031b7d8 libdispatch.dylib`_dispatch_client_callout + 20
    frame #36: 0x000000011031ec04 libdispatch.dylib`_dispatch_block_invoke_direct + 356
    frame #37: 0x00000001af60a1b8 FrontBoardServices`__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48
    frame #38: 0x00000001af609e64 FrontBoardServices`-[FBSSerialQueue _performNext] + 420
    frame #39: 0x00000001af60a3e4 FrontBoardServices`-[FBSSerialQueue _performNextFromRunLoopSource] + 52
    frame #40: 0x00000001ace241f4 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
    frame #41: 0x00000001ace2417c CoreFoundation`__CFRunLoopDoSource0 + 92
    frame #42: 0x00000001ace238dc CoreFoundation`__CFRunLoopDoSources0 + 184
    frame #43: 0x00000001ace1e7d0 CoreFoundation`__CFRunLoopRun + 1068
    frame #44: 0x00000001ace1e07c CoreFoundation`CFRunLoopRunSpecific + 480
    frame #45: 0x00000001abfee37c GraphicsServices`GSEventRunModal + 108
    frame #46: 0x00000001b4d0374c UIKitCore`UIApplicationMain + 1940
    frame #47: 0x0000000104b65e88 Mapbox GL`main(argc=1, argv=0x000000016b29f7c0) at main.m:8:16
    frame #48: 0x00000001ad388964 libdyld.dylib`start + 4

Configuration

Mapbox SDK versions: master
iOS/macOS versions: iOS 12.2 and iOS 13b1
Device/simulator models: iPhone X and iPhone XR
Xcode version: 11.0-beta.1

cc @julianrex

@jmkiley jmkiley added the bug label Jul 1, 2019
@jmkiley jmkiley changed the title Asserting failure when app is in the background Assert failure when app is in the background Jul 1, 2019
@jmkiley
Copy link
Contributor Author

jmkiley commented Jul 1, 2019

cc @tmpsantos @chloekraw

@chloekraw chloekraw added the Core The cross-platform C++ core, aka mbgl label Jul 2, 2019
@tmpsantos
Copy link
Contributor

@jmkiley is this happening 100% of the time?

@friedbunny
Copy link
Contributor

friedbunny commented Jul 8, 2019

@tmpsantos Yes, I see this every time iosapp is backgrounded. (Or, presumably, any time an app integrating a debug build of the maps SDK is sent to the background.)

@friedbunny friedbunny added the iOS Mapbox Maps SDK for iOS label Jul 8, 2019
@pozdnyakov pozdnyakov self-assigned this Jul 9, 2019
@pozdnyakov
Copy link
Contributor

Leftover from 658d68e

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants