<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="" applecontenteditable="true"><div class="">Ah, it's 32-bit iOS. (I assumed i386 or x86_64 from the unaligned instruction addresses, but forgot that 32-bit ARM can have those too.) The small-looking addresses are okay, then.</div><div class=""><br class=""></div><div class="">That +437720 is still bogus. Ordinarily a symbol with a large offset means that the code was actually in some other function, but there was no symbol available for that other function. In such cases the symbolicator picks the closest symbol available; the large offset means that other symbol was far away. In this case that offset is larger than the address itself, which is impossible. Something in that frame was calculated incorrectly.</div><div class=""><br class=""></div><div class="">You may get better answers from Crashlytics about this. It looks suspiciously like an incorrect backtrace and/or incorrect symbolication of the backtrace.</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 13, 2017, at 4:25 PM, Jon Shier <<a href="mailto:jon@jonshier.com" class="">jon@jonshier.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">These crashes are uploaded from device, namely an iPad 4 (running the app in compatibility mode) uploaded through Crashlytics and then downloaded from there. I haven’t been able to reproduce the crash and so I haven’t seen a raw dump. Here’s the full crash stack, redacted, from an iPad 4 running iOS 10.1.1 (this is an iOS 10+ app).<div class=""><br class=""></div><div class=""><div class="">#0. Crashed: com.apple.main-thread</div><div class="">0 App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x665ac Controller.handleSomeNotification(SomeNotification) -> () (Controller.swift:92)</div><div class="">1 libswiftCore.dylib<span class="Apple-tab-span" style="white-space:pre">                        </span>0x131854f swift_unknownWeakLoadStrong + 10</div><div class="">2 App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x65cfc Controller.handleFinishSomeNotification(Notification) -> () (Controller.swift)</div><div class="">3 App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x65dd8 @objc Controller.handleSomeOtherNotification(Notification) -> () + 437720</div><div class="">4 CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1bafa761 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 10</div><div class="">5 CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1bafa09d _CFXRegistrationPost + 386</div><div class="">6 CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1baf9e81 ___CFXNotificationPost_block_invoke + 40</div><div class="">7 CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1bb5581d -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1188</div><div class="">8 CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1ba5a09d _CFXNotificationPost + 540</div><div class="">9 App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x15b004 specialized specialized NotificationCenter.post<A> (A, forName : NSNotification.Name) -> () (Notifications.swift)</div><div class="">10 App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x8d6f4 SomeListener.(post(SomeNotification : SomeNotification) -> ()).(closure #1) (SomeNotificationHandler.swift)</div><div class="">11 App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x96318 partial apply for SomeListener.(post(SomeNotification : SomeNotification) -> ()).(closure #1) (SomeNotificationHandler.swift)</div><div class="">12 libdispatch.dylib<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1b1f5097 _dispatch_call_block_and_release + 10</div><div class="">13 libdispatch.dylib<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1b1f5083 _dispatch_client_callout + 22</div><div class="">14 libdispatch.dylib<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1b1f95fd _dispatch_main_queue_callback_4CF + 890</div><div class="">15 CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1bb0aa17 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8</div><div class="">16 CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1bb08cff __CFRunLoopRun + 1422</div><div class="">17 CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1ba58073 CFRunLoopRunSpecific + 486</div><div class="">18 CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1ba57e81 CFRunLoopRunInMode + 104</div><div class="">19 GraphicsServices<span class="Apple-tab-span" style="white-space:pre">                </span>0x1d204bfd GSEventRunModal + 156</div><div class="">20 UIKit<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x20c0c82f -[UIApplication _run] + 574</div><div class="">21 UIKit<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x20c06f61 UIApplicationMain + 150</div><div class="">22 App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x4bc38 main (AppDelegate.swift:12)</div><div class="">23 libdispatch.dylib<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1b22250b (Missing)</div><div class=""><br class=""></div><div class="">Essentially I have a listener waiting on a background queue for a push notification to come in, which then repackages the payload into a Notification using a generic convenience method I wrote, and posted onto the main queue. Controller is listening for this two separate notifications, one of which is the SomeNotification. But the @objc method in there is the selector for the other notification, SomeOther. There should be no path between 3 and 2 in the stack, and there are no weak references I can see, except perhaps the implicit ones from NotificationCenter. Badly resymbolicated log? Is that even possible?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Jon</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">On Feb 13, 2017, at 6:52 PM, Greg Parker <<a href="mailto:gparker@apple.com" class="">gparker@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On Feb 13, 2017, at 12:18 PM, Jon Shier via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Swift Users:<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>I’m currently seeing a crash in my iOS app that has no apparent cause, but a bit of Swift runtime machinery in the stack has me confused.<br class=""><br class="">#0. Crashed: com.apple.main-thread<br class="">0 App 0x665ac Controller.handleOtherNotification(Notification) -> () (Controller.swift:92)<br class="">1 libswiftCore.dylib 0x131854f swift_unknownWeakLoadStrong + 10<br class="">2 App 0x65cfc Controller.handleFinish(Notification) -> () (Controller.swift)<br class="">3 App 0x65dd8 @objc Controller.handleNotification(Notification) -> () + 437720<br class=""><br class="">Controller.swift: 92 is a call to a custom UIView subclass method that takes an optional date contained extracted from the notification. Any idea what the core callout would be due to? There are no weak or unknown values being used here. Once the notification observers are called it’s all internal to Controller.<br class=""><br class="">One thing I just noticed is that the line at 3 is the selector for a different notification, which should lead down the path see from 2 onward. It’s redacted and so not easy to see, but in Controller, there’s no path that leads from handleNotification to handleFinish.</div></div></blockquote><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">That backtrace does look strange. Even if there were some surprising call to swift_unknownWeakLoadStrong() in handleFinish(), there's no way that swift_unknownWeakLoadStrong() would call handleOtherNotification().</div><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">(swift_unknownWeakLoadStrong + 10 is the instruction after a call, assuming you're on 64-bit iOS simulator, but that call is to swift::isNativeSwiftWeakReference() which itself doesn't call anything.)</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Also, in frame 3, the byte offset from the start of handleNotification() is larger than the address itself. And all of these addresses look too small if you're on 64-bit.</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Where did this backtrace come from? Do you have a crash log as generated by the OS?</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">-- </div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Greg Parker <span class="Apple-converted-space"> </span><a href="mailto:gparker@apple.com" class="">gparker@apple.com</a> Runtime Wrangler</div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></body></html>