My app's top crash is a mysterious one and I can't seem to figure it out. It always crashes on
_objc_fatalv(unsigned long long, unsigned long long, char const*, char*)
But the stack traces include a few different possible culprits like
NavigationBridge_PhoneTV.pushTarget(isDetail:)
UIKitNavigationBridge.update(environment:)
ViewRendererHost.updateGraph()
UIScrollView(SwiftUI) _swiftui_adjustsContentInsetWhenScrollDisabled
Crash reports here:
Hopefully someone here can shed some light. For context we use a lot of UIHostingController's to bridge our SwiftUI views.
Thanks for the crash reports.
Your app is crashing because of a trap deep within the Objective-C runtime:
Thread 0 Crashed:
0 libsystem_kernel.dylib … __terminate_with_payload + 8
1 libsystem_kernel.dylib … abort_with_payload_wrapper_internal + 136 (terminate_with_reason.c:106)
2 libsystem_kernel.dylib … abort_with_reason + 32 (terminate_with_reason.c:116)
3 libobjc.A.dylib … _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 116 (objc-errors.mm:216)
4 libobjc.A.dylib … _objc_fatal(char const*, ...) + 32 (objc-errors.mm:232)
5 libobjc.A.dylib … weak_register_no_lock + 396 (objc-weak.mm:423)
6 libobjc.A.dylib … objc_initWeak + 440 (NSObject.mm:455)
7 libswiftCore.dylib … swift_unknownObjectWeakInit + 92 (SwiftObject.mm:1133)
8 SwiftUI … NavigationBridge_PhoneTV.pushTarget(isDetail:) + 376 (NavigationBridge_PhoneTV.swift:79)
The trap is coming from frame 5. You can actually see the source code for this in the Darwin open source. The message associated with the trap is Cannot form weak reference to instance (%p) of class %s. It is possible that this object was over-released, or is in the process of deallocation.
Sadly, that doesn’t tell us anything actionable. What we’d like to know is the class involved (the %s
in the above message), but that’s not captured in a crash report.
Have you seen this crash report locally? If so, you might have captured the log message and hence the class.
Do you have a JSON crash report (.ips
) for this? If so, please post it here (in a reply, there’s no need to start a new thread) because that might let me learn more about the issue.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"