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.
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().
(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.)
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.
Where did this backtrace come from? Do you have a crash log as generated by the OS?
···
On Feb 13, 2017, at 12:18 PM, Jon Shier via swift-users <swift-users@swift.org> wrote:
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.
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.
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).
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?
Jon
···
On Feb 13, 2017, at 6:52 PM, Greg Parker <gparker@apple.com> wrote:
On Feb 13, 2017, at 12:18 PM, Jon Shier via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
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.
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.
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().
(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.)
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.
Where did this backtrace come from? Do you have a crash log as generated by the OS?
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.
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.
You may get better answers from Crashlytics about this. It looks suspiciously like an incorrect backtrace and/or incorrect symbolication of the backtrace.
···
On Feb 13, 2017, at 4:25 PM, Jon Shier <jon@jonshier.com> wrote:
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).
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?
Jon
On Feb 13, 2017, at 6:52 PM, Greg Parker <gparker@apple.com <mailto:gparker@apple.com>> wrote:
On Feb 13, 2017, at 12:18 PM, Jon Shier via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
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.
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.
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().
(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.)
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.
Where did this backtrace come from? Do you have a crash log as generated by the OS?