performSegue is ok with iOS 12.4 but crashes with iOS 16

I rebuild my app that still uses storyboard with XCode 14 and iOS 16 but all unwind perfomSegue crash.

On emulator with iOS 12.4 it works On emulator or iPhone 14 Pro with iOS 16.0 it crashes with error EXC_BAD_ACCESS

I am having the exact same issue while debugging, if I compile the app for distribution and install the IPA file manually then it's working fine on device.

Hopefully this gets resolved soon as it's affecting troubleshooting issues greatly.

In an app that has a lot of unwind, no issue in Xcode 14 and iOS 16.0, both on simulators or device..

Xcode Version 14.0 (14A309), iOS 16.

Which precise version of Xcode ?

Have you checked that the action in the Triggered segue (that initiates the unwind) matches exactly the IBAction in the returning controller ?

Could you test to remove one of the unwind segue and recreate ?

Same version of Xcode as the one you mentioned (14A309) from the App Store. I did not change this portion of the code and even went back to a previous version of my code using Time Machine before making any changes at all and same results. The issue seems to be when programmatically using: [self performSegueWithIdentifier:@"unwindView" sender:self]; And again only when debugging the same code but compiled for distribution will not crash and will unwind fine.

I also just tried Xcode 14.0.1 RC but same issue, I might try 14.1 beta 2 and check with that version of Xcode.

Is it objC code ?

I tested with an action in a UIButton:

    @IBAction func testUnwind(_ sender: UIButton) {
        performSegue(withIdentifier: "UnwindToItem1", sender: self) 
    }

It works without any issue in Xcode 14.

Could you show some code ?

It is Objective C code, there really isn't much more code to share. This one line of code triggers an unwind segue.

Xcode 14.0 (14A309) - iOS 16.01 (just updated)

I tried to delete and recreate unwind segue, i tried to compile and put it on device but it crashes the same, i tried to put sender:self instead nil, always the same result:

@Citzo, @YannLG would you have a small sample project to share ?

How did you create the segue ? In my case, I created in IB, by connecting another button to the exit icon or connection the exiting VC itself to its own exit button.

The code in receiving VC is simply:

    @IBAction func unwindToItem1ViewController(_ sender: UIStoryboardSegue) {
        print("returned from UnwindToItem1 in Item1View")
    }

Any progress on this issue? I'm getting the same error on all my unwind segues on a project where everything worked fine previously. I've made no changes at all, just opened and built for simulator in Xcode 14 and getting this EXC_BAD_ACCESS crash on unwind segues.

Same issue. Everything worked fine in my project in Xcode 13.x. I run it in Xcode 14 and all the unwind segues crash. Removing and re-adding them does not fix it.

Did anyone find a fix for this issue? I'm having the same issue here! Every user on iOS 16+ is suffering from crashes on all unwind segues.

Your @IBAction which unwind segues can have only UIStoryboardSegue as an argument. Try removing sender: Any? from your @IBAction

The below code crashes with EXC_BAD_ACCESS error:

@IBAction func unwindToRoot(_ segue: UIStoryboardSegue, sender: Any?) {
}

I resolved it by removing sender argument from IBAction. The below code worked fine for me

@IBAction func unwindToRoot(_ segue: UIStoryboardSegue) {
}
performSegue is ok with iOS 12.4 but crashes with iOS 16
 
 
Q