<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="">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 &nbsp;App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x665ac Controller.handleSomeNotification(SomeNotification) -&gt; () (Controller.swift:92)</div><div class="">1 &nbsp;libswiftCore.dylib<span class="Apple-tab-span" style="white-space:pre">                        </span>0x131854f swift_unknownWeakLoadStrong + 10</div><div class="">2 &nbsp;App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x65cfc Controller.handleFinishSomeNotification(Notification) -&gt; () (Controller.swift)</div><div class="">3 &nbsp;App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x65dd8 @objc Controller.handleSomeOtherNotification(Notification) -&gt; () + 437720</div><div class="">4 &nbsp;CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1bafa761 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 10</div><div class="">5 &nbsp;CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1bafa09d _CFXRegistrationPost + 386</div><div class="">6 &nbsp;CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1baf9e81 ___CFXNotificationPost_block_invoke + 40</div><div class="">7 &nbsp;CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1bb5581d -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1188</div><div class="">8 &nbsp;CoreFoundation<span class="Apple-tab-span" style="white-space:pre">                        </span>0x1ba5a09d _CFXNotificationPost + 540</div><div class="">9 &nbsp;App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x15b004 specialized specialized NotificationCenter.post&lt;A&gt; (A, forName : NSNotification.Name) -&gt; () (Notifications.swift)</div><div class="">10 App<span class="Apple-tab-span" style="white-space:pre">                                        </span>0x8d6f4 SomeListener.(post(SomeNotification : SomeNotification) -&gt; ()).(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) -&gt; ()).(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><blockquote type="cite" class=""><div class="">On Feb 13, 2017, at 6:52 PM, Greg Parker &lt;<a href="mailto:gparker@apple.com" class="">gparker@apple.com</a>&gt; 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 &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; 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 &nbsp;App &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x665ac Controller.handleOtherNotification(Notification) -&gt; () (Controller.swift:92)<br class="">1 &nbsp;libswiftCore.dylib &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x131854f swift_unknownWeakLoadStrong + 10<br class="">2 &nbsp;App &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x65cfc Controller.handleFinish(Notification) -&gt; () (Controller.swift)<br class="">3 &nbsp;App &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x65dd8 @objc Controller.handleNotification(Notification) -&gt; () + 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&nbsp;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;">--&nbsp;</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 &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span><a href="mailto:gparker@apple.com" class="">gparker@apple.com</a>&nbsp; &nbsp; &nbsp;Runtime Wrangler</div></div></blockquote></div><br class=""></div></body></html>