-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Crash in background — glFinish_Exec, gpus_ReturnNotPermittedKillClient, libGPUSupportMercury #1460
Comments
It looks like Here is effectively the same crash on VLC's iOS app. It appears they fixed it by checking for a broader range of background notifications. |
I don't think we need to hit We are still seeing this crash internally, though not in a way that looks like a crash to anyone (because of the state-saving nature of backgrounding). Currently trying to work out what exactly the repro is. |
http://stackoverflow.com/a/15814933/977220
|
According to Crashlytics, the app was not in background. But perhaps it's just a reporting/timing glitch? |
Hmm, @picciano, any way you could share some of the log around that, or explain how you know? |
See screen shot image pasted in above message. Crashlytics is reporting 100% of the 8 crashes were with "app in focus". |
Does Crashlytics rely on the same |
We just can't seem to repro this internally. We are "seeing" the crash in Hockey, but no one is reporting any crash problems and we can't repro in Xcode. Maybe we can punt on this? |
wouldn't worry about it for beta 1 at least, but am seeing it from two different users/phones |
Yeah, same here.
|
Ok, moving this to b2, but we can move back if we see it concretely and/or get more details. Marking as "ignored" for now in Hockey. |
Yeah, couldn't find any docs on this, so it's hard to tell what they mean. App state? No modals? Has been gestured-on since foregrounding? etc. |
I did find a way to recreate this reliably. Launch app, put app into background, make a change in the app's settings. (In my case, changing permission to access Contacts.) Boom goes the crash. |
Thanks @picciano, I'll check this out. Could be related to metrics in the |
Not seeing this in my own app settings testing, neither for metrics nor location services. To clarify, @picciano you are seeing a GL-related crash when changing Contacts access permissions? Do you respond to that change in any way in your app? Particularly in a GUI way? I know this would be odd in the background, but I'm trying to figure out what about settings would affect the GL view, or the view drawing at all. |
This is still mysterious...I am as confused as you.
The only good thing about this is that it crashes while in the Settings app, so the average user doesn't even really notice. (okay, still bad) |
As an experiment, I rigged the iOS demo app to ask for access to contacts. I ran the app in the debugger and granted access. As soon as I went into Settings and switched off that access, the app was sent SIGKILL.
|
This might be by design? |
Yes, it's definitely by design, to prevent apps from hanging onto contact information longer than the user allows. If this also happens when not running in the debugger, then it's unlikely to be the case that the crash happens when toggling the setting via Settings, with the app in the background. |
So we've proven a link between merely changing the contact settings and the app getting killed, which alludes to @picciano's problem but isn't necessarily the direct cause. I wonder @picciano, are you doing anything else related to app lifecycle such as hiding or snapshotting views that would be triggered by this? |
No. It's a pretty typical navigation controller-style app. I am using the same instance of map view on a couple different views, but nothing weird. And to be clear, I started seeing this crash pop up in Crashlytics from our testers before I was able to reproduce it myself. In fact, I was seeing in Crashlytics before the Contact permission request was even in the app. The only other app setting is the permissions to access the user location at all times, not just when the app is foreground and the metrics privacy settings. |
I am still seeing this in the latest build. The speculative fix did not work. |
@iec5 i'll drop that into tonight's build and let you know |
After bringing in the changes from #1821 I saw this in Crashlytics.
|
Looks like we're getting somewhere, being able to detect background launches now. Should be easy to fix the crash above: there's no need to unregister for KVO registrations before the registrations take place (registration is deferred in this case). @picciano, let's continue the conversation in #1821, since that looks promising. |
Sorry, meant #1821 (not 1812) |
@1ec5 is heading this up. |
Defer the creation of EAGLEContext and GLKView and the loading of OpenGL ES extensions. It is GLKView that drives the background crash, and Apple documentation specifically warns not to initialize an EAGLContext in the background. All the while, it should be safe for client code to avail itself of any public methods on MGLMapView. Fixes #1460.
I started seeing these that past two days. This was from Crashlytics, so not exactly sure what user was doing at the time.
The text was updated successfully, but these errors were encountered: