I\'m getting a lot of crash reports on iOS 8 with this stack trace:
Date/Time: 2014-09-17T20:26:15Z
OS Version: iPhone OS 8.0 (12A365)
Report Vers
I am seeing this on an app which includes a mapKit view on one of the tabs. The error is reportedly tied to updates being performed on the map while the app is backgrounded, and I realized that the only thing that could be getting updated was the user location "blinky" blue dot. So I added code to set
self.mapview.showsUserLocation = NO;
whenever the app gets backgrounded, and sets it to YES when it becomes active. This seems to have stopped the error in my alpha testing. I will update this once I get back results from beta testing.
There is a discussion on the Apple developer forums about this very behavior, where an Apple employee acknowledges this to be a bug:
https://devforums.apple.com/thread/246744?start=0&tstart=0
iOS 8.3 was released just a few days ago, and if our crash monitoring is accurate, there's a very good chance that 8.3 has fixed this issue. I will update this answer once we have more than a few days' worth of data under our belts.
Edit: after a week's worth of crash reports from Fabric/Crashlytics, it looks like 8.3 has resolved two sources of this crash: one from MapKit where it tries to render vector map tiles and/or map overlay raster tiles with OpenGL ES in the background, and another one from UIKit where it tries to render a UITabBar's tab images in the background (again, using OpenGL ES in the background). Would love to hear from others what you're seeing in production.
Setting background image for navigationBar
may also cause the crash on iOS8 when the app is lunched:
[self.navigationBar setBackgroundImage:[UIImage imageNamed:imgName] forBarMetrics:UIBarMetricsDefault];
According to Apple documents, may be i should customize the navigationBar
in
- (void)applicationDidBecomeActive:(UIApplication *)application {
// customize the navigationBar only once
...
}
But i think it is poor.
I don't have enough reputation to comment and ask for details, however I am experiencing the same issue, mostly on iPhone 5 but also 5c, 4s, iPad 3 and iPod 5G, and I believe that what I'm going to say will be helpful even if it doesn't answer the question.
First of all, this is the crash that happens when you try to draw something with OpenGL or resize or move a MKMapView in the background. It might not be obvious in your crash logs, but every single one of the crash reports I got was when the application started in the background. It seems like it's the same for you, considering the UIViewController is called InitialSlidingViewController. It was with "Significant Location Update" most of the time in my case, however it could be "Background Fetch" or "Visits" update or "Silent Remote Notification" in your case.
One thing I noticed in my app was that it was setting up the navigation bar when it crashed, more specifically trying to render an image, I have tinted images in my navigation bar. For you it's something else but something that requires OpenGL, maybe a motion effect like parallax, I see _UIAccessibilityReduceMotion in the stack trace?
Regardless of what you are, or I am, doing, the fact that it happens more on some devices and never on some devices means that it's most probably an iOS bug. I also see "CI::can_use_gpu()" in my stack trace, it crashes because it uses gpu while checking if it can use gpu.
So how do we prevent it from crashing?
You can try disabling the feature you are using, for me I'll replace the image with the correctly colored one, instead of using a tint color.
Or you can try loading another view controller, maybe just an empty view controller, when the app starts in the background, then when it comes foreground swap the view controller with the one you are using right now.