EXC_BAD_ACCESS in NSURLConnection: how to debug?
<p>I have an iPhone app that downloads URLs. (PDFs to display) Easy:</p>

<pre><code>self.request = [NSURLRequest requestWithURL:self.url];
self.conn = [NSURLConnection connectionWithRequest:self.request delegate:self];
</code></pre>

<p>where self.conn and request are retained properties.</p>

<p>For specific URLs, this throws EXC_BAD_ACCESS. The URL is valid and is constructed in the same way as URLs that do work. (90% of URLs are fine)</p>

<p>These ones work:</p>

<pre><code>http://www.airservicesaustralia.com/publications/current/ersa/FAC_YARG_11-Mar-2010.pdf
http://www.airservicesaustralia.com/publications/current/ersa/FAC_YARK_11-Mar-2010.pdf
</code></pre>

<p>These don't:</p>

<pre><code>http://www.airservicesaustralia.com/publications/current/ersa/FAC_YAMK_11-Mar-2010.pdf
http://www.airservicesaustralia.com/publications/current/ersa/FAC_YATN_11-Mar-2010.pdf
</code></pre>

<p>Spot the difference? Yeah, me neither. Also no difference in response headers from the server for them. To clarify, the ones that work ALWAYS work, the ones that don't NEVER work. So not some random release/retain issue it seems.</p>

<p>For the ones that don't work, none of the methods in my delegate are ever called, it fails hard before that. And with no error message, just EXC_BAD_ACCESS.</p>

<p>Sooo.... Any way to debug what is going on inside NSURLConnection?</p>
