Releasing Autopool crashes on iOS 4.0 (and only on 4.0)

Posted by samsam on Stack Overflow See other posts from Stack Overflow or by samsam
Published on 2010-12-17T10:32:02Z Indexed on 2011/01/06 16:54 UTC
Read the original article Hit count: 214

Hi there.

I'm wondering what could cause this. I have several methods in my code that i call using performSelectorInBackground. Within each of these methods i have an Autoreleasepool that is being alloced/initialized at the beginning and released at the end of the method.

this perfectly works on iOS 3.1.3 / 3.2 / 4.2 / 4.2.1 but it fataly crashes on iOS 4.0 with a EXC_BAD_ACCESS Exception that happens after calling [myPool release].

After I noticed this strange behaviour I was thinking about rewriting portions of my code and to make my app "less parallel" in case that the client os is 4.0.

After I did that, the next point where the app crashed was within the ReachabilityCallback-Method from Apples Reachability "Framework".

well, now I'm not quite sure what to do.

The things i do within my threaded methods is pretty simple xml parsing (no cocoa calls or stuff that would affect the UI). After each method finishes it posts a notification which the coordinating-thread listens to and once all the parallelized methods have finished, the coordinating thread calls viewcontrollers etc...

I have absolutely no clue what could cause this weird behaviour. Especially because Apples Code fails as well.

any help is greatly appreciated!

thanks, sam

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c