{"id":10083,"date":"2014-11-07T13:49:21","date_gmt":"2014-11-07T18:49:21","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=10083"},"modified":"2014-11-07T13:51:36","modified_gmt":"2014-11-07T18:51:36","slug":"tracking-down-a-webkit-crasher","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2014\/11\/07\/tracking-down-a-webkit-crasher\/","title":{"rendered":"Tracking Down a WebKit Crasher"},"content":{"rendered":"<p><a href=\"http:\/\/indiestack.com\/2014\/11\/burn-after-releasing\/\">Daniel Jalkut<\/a>:<\/p>\n<blockquote cite=\"http:\/\/indiestack.com\/2014\/11\/burn-after-releasing\/\">\n<p>I <em>love it<\/em> when customers take the time to write something about the circumstances surrounding a crash. Often even a little clue can be enough to lead to the unique series of steps that will ultimately reproduce the problem.<\/p>\n<p>[&#8230;]<\/p>\n<p>This is where the open-sourced nature of WebKit is both a blessing and a curse. If this issue had been revealed to exist somewhere deep within AppKit, or any of Apple&rsquo;s other closed-source frameworks, I most certainly would have thrown up my arms, filed a bug, and hoped for the best. But Apple&rsquo;s WebKit framework is something I can download, build, and debug. Sure, it takes nearly all day to build, and there is a steep learning curve to debugging it, but why did I become a software developer if I&rsquo;m not up for a challenge?<\/p>\n<p>[&#8230;]<\/p>\n<p>To make a long, long, long, long, story very short: I used Instruments and its &ldquo;pairing&rdquo; functionality, which lets you hide balanced pairs of retain\/release calls so that you are left with a more manageable subset of calls to examine and scrutinize. After scratching my head over this for hours and not making much headway, I finally came upon a specific call stack that <em>had a very suspicious heritage.<\/em> I confirmed through Instruments and then by direct examination of WebKit source code, that the WebView instance in question was in fact <em>retaining and then autoreleasing itself<\/em> as part of its dealloc method.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Daniel Jalkut: I love it when customers take the time to write something about the circumstances surrounding a crash. Often even a little clue can be enough to lead to the unique series of steps that will ultimately reproduce the problem. [&#8230;] This is where the open-sourced nature of WebKit is both a blessing and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[131,56,571,54,71,328],"class_list":["post-10083","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-bug","tag-debugging","tag-memory-management","tag-objective-c","tag-programming","tag-webkit"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/10083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=10083"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/10083\/revisions"}],"predecessor-version":[{"id":10085,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/10083\/revisions\/10085"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=10083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=10083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=10083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}