iOS8 MKMapView Framebuffer error during rotation when autoresize is applied
Asked Answered
S

2

8
#import "AppDelegate.h"
#import <MapKit/MapKit.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:   (NSDictionary *)launchOptions
{
    [self setWindow:[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]];
    [self.window makeKeyAndVisible];

    UIViewController *vc = [[UIViewController alloc] init];
    self.window.rootViewController = vc;
    vc.view.autoresizingMask = UIViewAutoresizingFlexibleWidth |    UIViewAutoresizingFlexibleHeight;

    MKMapView *map = [[MKMapView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    map.autoresizingMask = UIViewAutoresizingFlexibleHeight;
    [vc.view addSubview:map];

    return YES;
}

@end

To see the problem, run the above code and just rotate the device. You will experience a significant delay for the rotation animation to take place.

If you connect an iOS8 iPad and run the simulator, you will receive these warnings:

Crash! 0x15dd7980
ERROR /SourceCache/VectorKit/VectorKit-992.16/GeoGL/GeoGL/GLCoreContext.cpp 1237: Framebuffer incomplete, incomplete attachment

Anyone know how to fix this problem?

Stefaniestefano answered 29/9, 2014 at 7:59 Comment(2)
I had the same exact problem and error. Convert to use AutoLayout in order to resolve it. would be nice if someone submit bug to Apple about this.Inexertion
@Inexertion You can submit a bug report to Apple here: developer.apple.com/bug-reporting Also, duplicate your bug report here, so the rest of the developer community can see it: openradar.appspot.comKetch
K
6

I am also experiencing this, and have found that it only seems to occur with the resizing options selected (i.e. resize height and width with as view resizes). I'm not using Auto Layout.

If I just add a MKMapView to a view, it's no problem, but if I select the resizing, it generates the same messages as shown above.

(Sorry that this is a comment not an answer, but I can't add comments on 1 vote, and I thought this may help diagnose the issue)

UPDATE - I have installed 8.1 Beta on one of my test devices, and I am NOT experiencing this issue. There is a good chance this is an issue that's being swept under the 8.1 carpet :)

Kink answered 30/9, 2014 at 8:11 Comment(2)
UPDATE - I have installed 8.1 Beta on one of my test devices, and I am NOT experiencing this issue. There is a good chance this is an issue that's being swept under the 8.1 carpet :)Kink
I'm seeing this on 8.2 so the issue still exists.Charlean
V
1

I had this issue recently and adding the constraints in code worked until I updated the app to be iPhone 6/ 6+ optimized, in that case I could still see the errors in the console log and it was in a bright pink color.

The best solution was to add the MKMapView directly on the storyboard, all messages and weird color behaviors were solved

Varien answered 15/5, 2015 at 15:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.