{"id":909,"date":"2020-10-05T09:28:00","date_gmt":"2020-10-05T15:28:00","guid":{"rendered":"https:\/\/www.great-white-software.com\/blog\/?p=909"},"modified":"2020-09-24T09:39:49","modified_gmt":"2020-09-24T15:39:49","slug":"how-crash-logs-lie-to-you","status":"publish","type":"post","link":"https:\/\/www.great-white-software.com\/blog\/2020\/10\/05\/how-crash-logs-lie-to-you\/","title":{"rendered":"How crash logs lie to you"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Sometimes you get a crash log and start digging through the call stack assuming that what it shows you is The Truth.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But, it may not be.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you strip symbols from your apps then the crash logs you get can be horribly misleading.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For instance a crash that looks like<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><br>Thread 0 Crashed:<br>0  libsystem_kernel.dylib              0x00007fff6597bfce __pthread_kill + 10<br>1  libsystem_c.dylib                   0x00007fff658d830a abort + 127<br>2  libsystem_c.dylib                   0x00007fff658a0360 basename_r + 0<br>3  XojoFramework                       0x000000010ca2fa79 _Z29ShowDebuggerConnectionFailurev + 0<br>4  SpawnCompiler.dylib                 0x000000011262b260 REALPluginMain + 934808<br>5  SpawnCompiler.dylib                 0x0000000112694dfb REALPluginMain + 1367859<br>6  Xojo                                0x0000000107a430cb DebuggerMap.LookupLineAddress%b%o&lt;DebuggerMap&gt;si8&amp;i8 + 107<br>7  Xojo                                0x000000010a207ac5 StudioDebuggerUI.StudioDebuggerUI.LookupBreakpointAddress%i8%o&lt;StudioDebuggerUI.StudioDebuggerUI&gt;si8 + 421<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Where the offset from REALPluginMain is an enormous value is VERY likely NOT correct that the call site was in REALPluginMain<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So why does this happen ?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The system component that records the stack trace simply looks for symbols that are before the call site and reports those. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If symbols have been stripped then you see the problem. That crash logger cannot find the &#8220;correct&#8221; symbol and so may simply walk back a long long way to find one that hasnt been stripped. It reports that + a really large offset.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Exceptions in Xojo however ARE quite accurate.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you get a crash log and start digging through the call stack assuming that what it shows you is The Truth. But, it may not be. If you strip symbols from your apps then the crash logs you get can be horribly misleading. For instance a crash that looks like Thread 0 Crashed:0 libsystem_kernel.dylib &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.great-white-software.com\/blog\/2020\/10\/05\/how-crash-logs-lie-to-you\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How crash logs lie to you&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-909","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/909","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/comments?post=909"}],"version-history":[{"count":1,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/909\/revisions"}],"predecessor-version":[{"id":910,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/909\/revisions\/910"}],"wp:attachment":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/media?parent=909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/categories?post=909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/tags?post=909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}