[swift-users] Crash with swift_weakLoadStrong in the stack

Jon Shier jon at jonshier.com
Mon Feb 13 14:18:23 CST 2017


Swift Users:
	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.

#0. Crashed: com.apple.main-thread
0  App                        0x665ac Controller.handleOtherNotification(Notification) -> () (Controller.swift:92)
1  libswiftCore.dylib         0x131854f swift_unknownWeakLoadStrong + 10
2  App                        0x65cfc Controller.handleFinish(Notification) -> () (Controller.swift)
3  App                        0x65dd8 @objc Controller.handleNotification(Notification) -> () + 437720

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.

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.



Jon


More information about the swift-users mailing list