Crash when navigating back from navigationlink in sheet/fullscreenCover (iPhone 12 pro max) #1417
Replies: 2 comments 21 replies
-
I wasn't able to reproduce the crash with just simulators, and I don't have a device on exactly 16.0.2, but I feel pretty certain this is a SwiftUI bug and not a problem with the library (especially since it seems to be SDK/device specific). I would recommend recreating the app in vanilla SwiftUI and see if it behaves the same, and file a feedback if it does. The warning you are seeing is just a warning, and does not cause crashes. There are still all types of crashes lurking in SwiftUI's navigation APIs. For example, if you have a navigation stack with A->B->C on the stack, and B has state for a sheet, then popping back C->B causes a crash. So, I wouldn't be surprised if dismissing a sheet with a drilled down navigation causes problems. I'm going to convert this to a discussion until we can pinpoint that this is definitely an issue with the library. |
Beta Was this translation helpful? Give feedback.
-
@Nicolaidam Have the same issue, when trying to dismiss sheet with navigation stack (2 screens) by setting sheet state to nil. Reproducible only on device (sim fine) and probably on iOS 16.0+. How to reproduce:
The crash is not consistent. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I'm experiencing a weird crash when navigating back programmatically from a navigationlink flow inside a sheet/fullscreenCover.
I have only been able to reproduce the crash using iPhone 12 pro max with iOS 16.0.2. On other devices such as iPhone 13 pro, iPhone 11 and iPhone 8 plus i have not been able to reproduce, even when using 16.0.2. I don't know it is just an iOS 16 thing or if other versions of iOS are also affected. (or if it a bug in the actual device or whatever)
This line is printed before the crashes and points that an action is called from a nil state. But as i understand it is this hard to prevent since the Binding set method is called after the view is set to nil. This message is just a warning and should not crash the app, right?
I can't guarantee that my implementation is correct, so please let me know if there is something I'm missing.
Checklist
main
branch of this package.Expected behavior
I expect that I'm not crashing when navigating back from navigationLink flow in sheet/fullscreenCover using iPhone 12 pro max.
Actual behavior
Crash: Thread 1: EXC_BREAKPOINT (code=1, subcode=0x1d13a4208)
Steps to reproduce
video.MP4
NavigationCrash.zip
The Composable Architecture version information
0.40.2
Destination operating system
iOS 16.0.2
Xcode version information
Version 14.0.1 (14A400), also tried 14.1 beta
Swift Compiler version information
No response
Beta Was this translation helpful? Give feedback.
All reactions