lukhnos/objectiveflickr — Issue #24: EXC_BAD_ACCESS caused with quick deallocations
Author: dmakarenko
Created: 2011-11-02 16:38:46+00:00
State: open

Hi,

There was a question in the year 2010th with no responses: http://code.google.com/p/objectiveflickr/issues/detail?id=9
I've came to the same issue using ObjectvieFlickr inside of UIPopoverController.

The problem's roots are in the CFReadStream's callback (LFHRReadStreamClientCallBack) calling, when LFHTTPRequest object is already destroyed.

Firstly I've noticed, that there is no delegate nulling in the OFFlickrAPIRequest dealloc method, so I've added it and the crash moved a bit further. Then I've checked LFHTTPRequest.m searching the stream events callback cancelation, but no results.
So, I've added 2 calls of CFReadStreamSetClient(_readStream, kCFStreamEventNone, NULL, NULL) function:
one into cleanUp method, another to _performMethod:onURL:withData:orWithInputStream: knownContentSize:
Unfortunately, it didn't help, and callback is still called.

I should say, that now I'm in deadlock. Could you please help me with this issue.

P.S. I hope I helped you too.