Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS crash when device is locked while animation (zoom/pan) is ongoing #70

Closed
juhieta opened this issue Apr 20, 2021 · 2 comments
Closed

Comments

@juhieta
Copy link
Contributor

juhieta commented Apr 20, 2021

When panning/zooming map and locking device, iOS app with MapLibre SDK crashes occasionally. Likely same issue as this one with Mapbox iOS SDK.

Crash log:

Hardware Model:      iPhone13,3
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]

Date/Time:           2021-04-20 15:14:10.9909 +0300
Launch Time:         2021-04-20 15:11:46.5801 +0300
OS Version:          iPhone OS 14.5 (18E5154f)
Release Type:        Beta
Baseband Version:    1.60.01-2
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [6125]
Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   libsystem_platform.dylib      	0x00000001ded94684 _platform_memmove + 132
1   AGXMetalA14                   	0x00000001dff7d07c AGX::Texture<(AGXTextureMemoryLayout)3, AGX::G13::Encoders, AGX::G13::Classes>::readRegion(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned... + 632 (agxa_texture_template.hpp:2122)
2   AGXMetalA14                   	0x00000001dff7cdf8 -[AGXA14FamilyTexture getBytes:bytesPerRow:bytesPerImage:fromRegion:mipmapLevel:slice:] + 88 (agxa_texture_objc.mm:654)
3   AppleMetalGLRenderer          	0x00000001df2c19a0 gldReadFramebufferData + 1260 (glr_framebuffer.mm:552)
4   GLEngine                      	0x00000001c7178620 glReadPixels_Exec + 924 (gl_read_pixels.c:329)
5   GLKit                         	0x00000001c5e074ec -[GLKView snapshot] + 252 (GLKView.m:728)
6   Mapbox                        	0x00000001038a6bd4 0x1034bc000 + 4107220
7   CoreFoundation                	0x0000000192dac9e4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 (CFNotificationCenter.c:706)
8   CoreFoundation                	0x0000000192dac98c ___CFXRegistrationPost_block_invoke + 52 (CFNotificationCenter.c:173)
9   CoreFoundation                	0x0000000192dabef8 _CFXRegistrationPost + 440 (CFNotificationCenter.c:198)
10  CoreFoundation                	0x0000000192dab8b8 _CFXNotificationPost + 716 (CFNotificationCenter.c:1071)
11  Foundation                    	0x00000001940a3a3c -[NSNotificationCenter postNotificationName:object:userInfo:] + 64 (NSNotification.m:575)
12  UIKitCore                     	0x000000019582b808 -[UIApplication _deactivateForReason:notify:] + 1412 (UIApplication.m:1822)
13  UIKitCore                     	0x0000000194e8af38 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 988 (_UISceneLifecycleMultiplexer.m:686)
14  UIKitCore                     	0x00000001953f2978 _UIScenePerformActionsWithLifecycleActionMask + 104 (_UISceneLifecycleState.m:109)
15  UIKitCore                     	0x0000000194e8aac0 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 224 (_UISceneLifecycleMultiplexer.m:549)
16  UIKitCore                     	0x0000000194e8a580 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 484 (_UISceneLifecycleMultiplexer.m:501)
17  UIKitCore                     	0x0000000194e8a8d0 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 768 (_UISceneLifecycleMultiplexer.m:548)
18  UIKitCore                     	0x0000000194e8a10c -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340 (_UISceneLifecycleMultiplexer.m:454)
19  UIKitCore                     	0x0000000194e92650 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block... + 196 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:72)
20  UIKitCore                     	0x00000001953006e0 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 892 (BSAnimationSettings+UIKit.m:50)
21  UIKitCore                     	0x000000019540b788 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 276 (_UISceneSettingsDiffAction.m:23)
22  UIKitCore                     	0x0000000194e92348 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 384 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:57)
23  UIKitCore                     	0x0000000194cba1cc __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 776 (UIScene.m:1419)
24  UIKitCore                     	0x0000000194cb8b4c -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256 (UIScene.m:1140)
25  UIKitCore                     	0x0000000194cb9df4 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 248 (UIScene.m:1386)
26  UIKitCore                     	0x000000019532a1f0 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 492 (UIApplicationSceneClientAgent.m:80)
27  FrontBoardServices            	0x00000001a284e004 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 484 (FBSScene.m:547)
28  FrontBoardServices            	0x00000001a287a740 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 152 (FBSWorkspaceScenesClient.m:533)
29  FrontBoardServices            	0x00000001a285c7f0 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:355)
30  FrontBoardServices            	0x00000001a287a66c __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 396 (FBSWorkspaceScenesClient.m:532)
31  libdispatch.dylib             	0x0000000192a3e878 _dispatch_client_callout + 20 (object.m:559)
32  libdispatch.dylib             	0x0000000192a42368 _dispatch_block_invoke_direct + 268 (queue.c:468)
33  FrontBoardServices            	0x00000001a28a13e4 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:184)
34  FrontBoardServices            	0x00000001a28a1074 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 448 (FBSSerialQueue.m:227)
35  FrontBoardServices            	0x00000001a28a15c8 -[FBSSerialQueue _performNextFromRunLoopSource] + 32 (FBSSerialQueue.m:258)
36  CoreFoundation                	0x0000000192dcbc98 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1967)
37  CoreFoundation                	0x0000000192dcbb94 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2011)
38  CoreFoundation                	0x0000000192dcaf04 __CFRunLoopDoSources0 + 376 (CFRunLoop.c:2056)
39  CoreFoundation                	0x0000000192dc4e78 __CFRunLoopRun + 820 (CFRunLoop.c:2925)
40  CoreFoundation                	0x0000000192dc4610 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)
41  GraphicsServices              	0x00000001aa8f2734 GSEventRunModal + 164 (GSEvent.c:2259)
42  UIKitCore                     	0x000000019583111c -[UIApplication _run] + 1072 (UIApplication.m:3270)
43  UIKitCore                     	0x000000019583698c UIApplicationMain + 168 (UIApplication.m:4741)

Steps to reproduce

  1. Pan map
  2. While panning, lock device
  3. SDK crashes when unlocked (not every time though)

Expected behavior

No crashes

Actual behavior

App crashes occasionally when opening after described steps

Configuration
Maplibre iOS SDK version: ios-v5.11.0
iOS/macOS versions: iOS 14.5 Beta (18E5154f)
Device/simulator models: iPhone 12 Pro
Xcode version: 12.4

@juhieta
Copy link
Contributor Author

juhieta commented Apr 21, 2021

It seems this crash also happens occasionally if SDK is in progress of downloading and rendering new raster tiles when device is locked.

@juhieta
Copy link
Contributor Author

juhieta commented May 10, 2021

This was fixed with #68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant