-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in readStreamHasBytesAvailable in arc project following set up instruction #33
Comments
Did you build ObjectiveFlickr also with ARC? Or is OF built with retain-release? Another potential issue is that your view is already gone but the OF request is not properly canceled (and it's better to set delegate to nil after canceling). |
I had not turned on ARC for OF. Did so today, but it still crashes at the same place. I have a single view controller and it is not going away as i don't have any view transition. I started using the branch set to use ARC and it is working fine, so i suspect there is something not working in the ARC implementation on the main branch Olivier |
I had not turned on ARC for OF. Did so today, but it still crashes at the I started using the branch set to use ARC and it is working fine, so i Olivier On Tue, May 15, 2012 at 8:44 PM, Lukhnos D. Liu <
|
Hi Olivier... |
try this https://github.com/Angel91/objectiveflickr.git Olivier On Thu, Jul 12, 2012 at 3:43 PM, marsson <
|
I created a brand new projection Xcode 4.3.2
set type to iphone arc project
set project type to single view
in the controller:
in .h file
@Property (nonatomic, strong) OFFlickrAPIContext *context;
in .m file
(void) viewWillAppear:(BOOL)animated
{
// Do any additional setup after loading the view, typically from a nib.
self.context = [[OFFlickrAPIContext alloc] initWithAPIKey:@"6903cd1cb6a4bc92e906b76d60c34f63"
sharedSecret:@"4055df0dfc06e60f"];
OFFlickrAPIRequest *request = [[OFFlickrAPIRequest alloc] initWithAPIContext:_context];
// set the delegate, here we assume it's the controller that's creating the request object
[request setDelegate:self];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity: 5];
[params setObject:@"2000-01-01 00:00:00" forKey:@"max_taken_date"];
[params setObject:@"47.60569" forKey:@"lat"];
[params setObject:@"-122.338561" forKey:@"lon"];
[params setObject:@"date_taken" forKey:@"date_taken"];
[request callAPIMethodWithGET:@"flickr.photos.search"
}
run the app in simulator
=> app crash, in LFHTTPrequest::readStreamHasBytesAvailable on line 215
_delegate is pointing to a dead pointer
The text was updated successfully, but these errors were encountered: