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.
Crash on -[MGLMapView updateFromDisplayLink] #13824
Copy link
Copy link
Closed
Description
SIGABRT ABORT 0x00000001814382e8
Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x1814382e8 __pthread_kill + 8
1 libsystem_pthread.dylib 0x18154d2f8 pthread_kill$VARIANT$mp + 396
2 libsystem_c.dylib 0x1813a6fbc abort + 140
3 Metal 0x183649a9c MTLGetWarningMode + 270
4 AppleMetalGLRenderer 0x1a0f7af18 GLDTextureRec::allocMetalTexture()
5 AppleMetalGLRenderer 0x1a0f7b010 GLDTextureRec::loadPrivateTexture(unsigned int, unsigned short*)
6 AppleMetalGLRenderer 0x1a0f7917c GLDTextureRec::update(unsigned int, unsigned short*)
7 AppleMetalGLRenderer 0x1a0f75e98 GLDFramebufferRec::load()
8 AppleMetalGLRenderer 0x1a0f76224 gldLoadFramebuffer
9 GLEngine 0x1a1d3e84c gleCheckFramebufferStatus
10 GLEngine 0x1a1cebb44 glCheckFramebufferStatusEXT_Exec
11 GLKit 0x18e72340c -[GLKView _createFramebuffer] + 1368
12 GLKit 0x18e723660 -[GLKView _setFramebuffer:] + 132
13 GLKit 0x18e7238ac -[GLKView _display:] + 88
14 Mapbox 0x10785e77c -[MGLMapView updateFromDisplayLink] (MGLMapView.mm:1169)
15 QuartzCore 0x185853710 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 672
16 IOKit 0x181b91098 IODispatchCalloutFromCFMessage + 392
17 CoreFoundation 0x1818b4290 __CFMachPortPerform + 188
18 CoreFoundation 0x1818cf000 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
19 CoreFoundation 0x1818ce704 __CFRunLoopDoSource1 + 440
20 CoreFoundation 0x1818cc1d8 __CFRunLoopRun + 2196
21 CoreFoundation 0x1817ebe58 CFRunLoopRunSpecific + 436
22 GraphicsServices 0x183698f84 GSEventRunModal + 100
23 UIKit 0x18ae6b67c UIApplicationMain + 236
24 libswiftUIKit.dylib 0x108bb0da0 UIApplicationMain(_:_:_:_:) + 168
25 InstaShopper 0x102a6a708 main (main.swift:5)
26 libdyld.dylib 0x18130856c start + 4
Steps to reproduce
Not sure, reported by crash reporting. 0% in background. Firebase has thoughts about it:
Based on the stack trace displayed here, it looks like new calls triggering OpenGL rendering took place while the app was transitioning to, or from, a background state. If you set up OpenGL drawing in your app delegate's methods, make sure that you only did so in applicationDidBecomeActive:, never in application:willFinishLaunchingWithOptions: or application:didFinishLaunchingWithOptions:. According to some reports, even displaying an FPS indicator for SpriteKit could cause rendering to occur before it is allowed.
Expected behavior
No crash
Actual behavior
Crash
Configuration
Mapbox SDK versions: 4.7.0
iOS/macOS versions: iOS 11 and 12
Device/simulator models: all
Xcode version: 10.1
Activity
julianrex commentedon Jan 30, 2019
See also #13825 - call stack is very similar.
julianrex commentedon Jan 30, 2019
@marcelofabri do you know
Do you have crash reports that list the available memory? Were there any memory warnings? At first glance these appear to be allocation related.
marcelofabri commentedon Jan 30, 2019
There are several different users facing each crash. I imagine that they can overlap, but it doesn't seem to be a single device
Seems very very unlikely given the nature of our app
Yeah, they range from ~25MB free memory to ~300MB in a few samples that I looked for this specific crash.
We have a log for memory warnings on
applicationDidReceiveMemoryWarningand it doesn't seem like we're getting it for the individual logs that I've looked into.hernangonzalez commentedon Feb 19, 2019
I am seeing this crash more often now.
100% of the reports are in background.
My reports are matched by the inclusion of Mapbox 4.8.0
@julianrex @marcelofabri
julianrex commentedon Mar 6, 2019
@hernangonzalez thanks for the confirmation - what version of the SDK were you on before 4.8.0?
hernangonzalez commentedon Mar 6, 2019
@julianrex I was on 4.7.1
stale commentedon Sep 3, 2019
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
julianrex commentedon Sep 3, 2019
This is not stale, improving backgrounding is still in the queue, but slipped because of some refactoring elsewhere.
stale commentedon Mar 1, 2020
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.