Reputation: 614
I created a single view application with story boards. All I had in my view was MKMapView, thats it. It compiles without errors or warning but when I run it, I get this error in my console window:
<Error>: ImageIO: CGImageReadSessionGetCachedImageBlockData *** CGImageReadSessionGetCachedImageBlockData: readSession [0x8ab5750] has bad readRef [0x14b79c70]
I'm using Xcode 4.3 and iPhone Simulator 5.1. Any thoughts?
.h File
#import UIKit/UIKit.h
#import CoreLocation/CoreLocation.h
#import MapKit/MapKit.h
@interface WhereamiViewController : UIViewController <CLLocationManagerDelegate, MKMapViewDelegate>
{
IBOutlet MKMapView *worldView;
IBOutlet UIActivityIndicatorView *activityIndicator;
IBOutlet UITextField *locationTitleField;
}
@end
.m file
#import "WhereamiViewController.h"
@interface WhereamiViewController ()
@end
@implementation WhereamiViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
Upvotes: 4
Views: 3674
Reputation:
Correct ur codes as below, and create the outlet of map view.
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>
Upvotes: 0
Reputation: 128
Just ran into this:
Simple Fix: Make sure to check the box for "shows user location" for the MapView in interface builder.
Upvotes: 5
Reputation: 23
I also ran into the same problem. I solved it by commenting out all the code and compile the program. Then I uncommented each method one by one compiling after each time. For some reason that seemed to get rid of the error for me.
Upvotes: 0
Reputation: 623
Probably i should not answer a question of almost a year, but i was having the same issue and the cause was that i was calling CLLocationManager *startUpdateLocation* on viewDidLoad method, when i change it to viewWillAppear the issue dissapeared.
Upvotes: 3
Reputation:
My PNG's contained some transparent parts and I think this caused the problem, because after removing these parts the error disappeared. Maybe I had some error in my PNG files, because transparency should be supported.
Upvotes: 0
Reputation: 7
Well I'm doing a much simpler project so I'm not sure if it will help you. But I'll show you my code anyway. You may want to just start with this and then see if you can build from there.
So for the ViewController.h it should read......
#import <UIKit/UIKit.h>
#import <MapKit
Upvotes: -1
Reputation: 113747
That looks to me like a bug in the framework. Report it using the Apple Bug Reporter and see if it's a known issue.
Upvotes: 2