<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"><br class=""><div><blockquote type="cite" class=""><div class="">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>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=""><div class="">(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=""><br class=""></div><div class="">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=""><br class=""></div><div class="">Where did this backtrace come from? Do you have a crash log as generated by the OS?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">--&nbsp;</div><div class="">Greg Parker &nbsp; &nbsp; <a href="mailto:gparker@apple.com" class="">gparker@apple.com</a>&nbsp; &nbsp; &nbsp;Runtime Wrangler</div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>