{"id":452,"date":"2008-01-24T14:54:50","date_gmt":"2008-01-24T18:54:50","guid":{"rendered":"http:\/\/www.red-sweater.com\/blog\/452\/nsurlconnection-crashing-epidemic"},"modified":"2008-01-24T14:54:54","modified_gmt":"2008-01-24T18:54:54","slug":"nsurlconnection-crashing-epidemic","status":"publish","type":"post","link":"https:\/\/redsweater.com\/blog\/452\/nsurlconnection-crashing-epidemic","title":{"rendered":"NSURLConnection Crashing Epidemic"},"content":{"rendered":"<p>I&#8217;m proud to say that all of my apps are pretty solid. They rarely crash. At least, I assume they rarely crash, because I <em>very<\/em> rarely receive crash reports from users. When I do, it&#8217;s usually from beta testers before the application has been shared with the general public.<\/p>\n<p>\nBut after Apple released 10.4.11, I started receiving crash reports at an accelerated pace. The log is the same in every instance, and culminates in what appears to be a threaded NSURLConnection caching operation:\n<\/p>\n<p><pre>\n-[NSURLConnection(NSURLConnectionInternal) \n\t_didFinishReturnCachedResponse:]\n-[NSHTTPURLProtocol startLoading]\n-[NSURLConnection(NSURLConnectionInternal)\n\t_performOriginLoad]\n<\/pre>\n<\/p>\n<p>\nNow it so happens that WebKit is the one crashing in many of these cases, but I suspect the problem is more widespread than that. In any case, the problem is definitely more widespread than just MarsEdit. Searching Google reveals <a href=\"http:\/\/www.google.com\/search?hl=en&#038;safe=off&#038;client=safari&#038;rls=en-us&#038;q=_didFinishReturnCachedResponse+crash&#038;btnG=Search\">a number of similar results<\/a>, from a variety of applications, including Apple&#8217;s own.\n<\/p>\n<p>\nIf you&#8217;re a developer and your application uses WebKit or NSURLConnection, chances are you&#8217;ve noticed an increase in crash reports, too. Always on 10.4.11, always involving NSURLConnection. If you&#8217;re a user running 10.4.11, chances are you&#8217;ve noticed that network-enabled applications seem to be a bit more flakey and crash-prone.\n<\/p>\n<p>\nThe fact that the bug seems to be fixed in Leopard makes me think that this is a bug whose source was identified and fixed. Now the question is, will Apple ever ship a 10.4.12 containing a fix? Or will those users be stuck in crash-ville forever?\n<\/p>\n<p>\nApple needs to get this fixed. For these poor 10.4.11 users who got stuck with a buggy URL loader, and for us poor developers who have to gently explain to them that it&#8217;s out of our control. I have to assume there&#8217;s already a bug reported against this, but better safe than sorry, I wrote up another one: Radar #5704773.\n<\/p>\n<p>\nSo why I am I writing this blog entry? Because I want other developers who read my blog or who find it by Google search to know that <em>they&#8217;re not crazy<\/em>. And I want users who run into this crash to please remember to send the crash report to Apple. They need to know that this is a serious issue that is impacting you and the apps you use.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m proud to say that all of my apps are pretty solid. They rarely crash. At least, I assume they rarely crash, because I very rarely receive crash reports from users. When I do, it&#8217;s usually from beta testers before the application has been shared with the general public. But after Apple released 10.4.11, I [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,8,2,40],"tags":[],"class_list":["post-452","post","type-post","status-publish","format-standard","hentry","category-apple","category-applebugfriday","category-debugging","category-marsedit"],"_links":{"self":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/comments?post=452"}],"version-history":[{"count":0,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/452\/revisions"}],"wp:attachment":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/media?parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/categories?post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/tags?post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}