getsentry/sentry-cocoa

Crash when initializing a UITableViewController from IB

gabriellanata opened this issue · 2 comments

Platform

iOS

Environment

Production, Develop, TestFlight

Installed

Manually

Version

8.26.0

Xcode Version

15.4

Did it work on previous versions?

Unknown, but probably not

Steps to Reproduce

  1. Create a UITableViewController subclass that uses a XIB file
  2. Add a view to the xib file and connect it using an @IBOutlet
  3. Add some code in the viewDidLoad method that checks if the @IBOutlet is nil or not
  4. Ensure enableSwizzling and enableUIViewControllerTracing are enabled as options in Sentry
  5. Run the app and navigate to that screen

Expected Result

@IBOutlet is not nil and everything worked as expected

Actual Result

@IBOutlet is nil and it caused a crash if the IBOutlet uses force unwrap

Are you willing to submit a PR?

#4069

Hello @gabriellanata, thanks for bringing this up.
We will provide a fix soon.

Thanks @brustolin, verified the crash is fixed on our side after updating the library