firebase-ios-sdk: Incorrect line number information in crash reports for a Swift runtime failure
Description
I’ve noticed that crash reports resulting from a force-unwrap of an Optional with a nil value do not have correct line number information, at least for our app. Here’s an example: Firebase Crashlytics logs:
Crashed: com.apple.main-thread
0 UltimaPayments 0x66f30 tryLogin + 4306546480 (ReauthorizationViewController.swift:4306546480)
1 UltimaPayments 0x66754 @objc ReauthorizationViewController.loginButtonTapped(_:) + 4306544468
2 UIKitCore 0x4c8a98 -[UIApplication sendAction:to:from:forEvent:] + 100
3 UIKitCore 0x5f4db8 -[UIControl sendAction:to:forEvent:] + 128
4 UIKitCore 0x36ff90 -[UIControl _sendActionsForEvents:withEvent:] + 352
Crashed: com.apple.main-thread
0 UltimaPayments 0x60f8c viewWillAppear + 4368338828 (TransactionsListViewController.swift:4368338828)
1 UltimaPayments 0x60fcc viewWillAppear + 4368338892 (<compiler-generated>:4368338892)
2 UIKitCore 0x1ab288 -[UIViewController _setViewAppearState:isAnimating:] + 664
3 UIKitCore 0x2d952c -[UIViewController __viewWillAppear:] + 120
Same crashes in Xcode Organizer
Thread 0 name:
Thread 0 Crashed:
0 UltimaPayments 0x00000001049e2f30 Swift runtime failure: Unexpectedly found nil while implicitly unwrapping an Optional value + 0 (ReauthorizationViewController.swift:0)
1 UltimaPayments 0x00000001049e2f30 ReauthorizationViewController.tryLogin() + 1968 (ReauthorizationViewController.swift:129)
2 UltimaPayments 0x00000001049e28e8 ReauthorizationViewController.tryLogin() + 360 (ReauthorizationViewController.swift:0)
3 UltimaPayments 0x00000001049e2754 @objc ReauthorizationViewController.loginButtonTapped(_:) + 60
4 UIKitCore 0x00000001834c5a98 -[UIApplication sendAction:to:from:forEvent:] + 100 (UIApplication.m:53
Thread 0 name:
Thread 0 Crashed:
0 UltimaPayments 0x000000010500cf8c Swift runtime failure: Unexpectedly found nil while implicitly unwrapping an Optional value + 0 (TransactionsListViewController.swift:0)
1 UltimaPayments 0x000000010500cf8c TransactionsListViewController.viewWillAppear(_:) + 1420 (TransactionsListViewController.swift:46)
2 UltimaPayments 0x000000010500cb00 selectedAccountView.get + 16 (TransactionsListViewController.swift:0)
3 UltimaPayments 0x000000010500cb00 TransactionsListViewController.viewWillAppear(_:) + 256
4 UltimaPayments 0x000000010500cfcc @objc TransactionsListViewController.viewWillAppear(_:) + 40 (<compiler-
This bug is same problem as was here: https://github.com/firebase/firebase-ios-sdk/issues/8594
Reproducing the issue
No response
Firebase SDK Version
9.4.1
Xcode Version
13.4.1
Installation Method
Swift Package Manager
Firebase Product(s)
Crashlytics
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project’s Package.resolved
Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.
If using CocoaPods, the project’s Podfile.lock
Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 19 (7 by maintainers)
@themiswang I still experienced this with a crash that happened yesterday:
Crashed: com.apple.main-thread 0 HerdBoss 0x143cf4 SemenManagerLocationDetailListViewController.viewDidLoad() + 4365761780 (<compiler-generated>:4365761780) 1 HerdBoss 0x143d18 @objc SemenManagerLocationDetailListViewController.viewDidLoad() + 4365761816 (<compiler-generated>:4365761816) 2 UIKitCore 0x37e088 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 84
I’m not sure if this helps you find the issue to be able to investigate, but here is the url when I view the issue.
Hey folks,
We have recently launched the new feature for Swift compiler-generated frame symbolication improvement. We now more accurately convert
compiler-generatedSwift frames to a file and line number so that it’s easier to understand stack traces and debug issues.Any update on this? This is a really critical issue leaving us unable to properly debug apps.
Any updates on this? we are experiencing the same issue and need to know where the crash is originating from