NSURLConnection and iPad SDK 3.2

I was coding an app that made a series of asynchronous HTTP requests, and stumbled upon a strange bug that I couldn’t quite pin down.

Running under iOS4 in the simulator and device (iPhone4 and 3.1.x), there were no problems writing this:

The connection would initialize and then run without a hitch. As I was hoping to port the app over to the iPad, I decided to test it using the iPad simulator under 3.2. However, once the app hit [c start];, I immediately got a EXC_BAD_ACCESS exception and the app crashed.

On further inspection, it seems as though the app will obey the startImmediately boolean on an iPhone device, but is strangely ignored on an iPad. I gave the documentation a read-through, and I couldn’t find anything of the sort.

A somewhat simple but annoying work around involved starting the NSURLConnection request immediately and removing [c start];:

Hopefully someone will be able to shed light on this one, it really had me stumped.