Replies: 2 comments 5 replies
-
Whilst the TCA navigation tools should mitigate stack size problems relating to state (as the state is stored in a reference type internally), it does not mitigate the issue of large action enums blowing the stack - does making some of your path's action enums |
Beta Was this translation helpful? Give feedback.
-
Hi @chwo, there are a few reasons this can happen (@lukeredpath mentioned some), but in order for anyone to help you would need to provide more context. Ideally you would even be able to reproduce the problem in a sample project that can be shared. Here are some things to keep in mind:
Either way, this is not an issue with the library, and so I am going to convert it to a discussion. Please feel free to continue the conversation over there. |
Beta Was this translation helpful? Give feedback.
-
Description
After migrating our app to ObservableState and WithPerceptionTracking the app crashes directly at the app start:
Thread 1: EXC_BAD_ACCESS (code=2, address=0x16ef03ff8)
The crash can't be resolved by a full clean and rebuild.
Without the ObservableState changes the crash doesn't occur and the app runs fine.
I thought using ObservableState would bring a performance gain by reducing the number of TCA internal scopings. So I am surprised that it seems to be increasing the stack size usage leading to this crash.
Checklist
main
branch of this package.Expected behavior
The app doesn't crash after migrating to ObservableState.
Actual behavior
The app crashes after migrating to ObservableState.
Steps to reproduce
Unfortunately, I wasn't able to isolate this in a reproducible sample project yet.
We use Stack-based navigation with 15 paths but this isn't a high number compared to this issue: #3162.
However when commenting-out some features in our navigation stack the crash doesn't occur anymore. But this doesn't seem to be specific to particular features and rather concerns the overall number of features. That's why I'm afraid it that it could have something to do with stack size (like in other EXC_BAD_ACCESS issues in this repo).
For reference how we use the Stack-based navigation:
Do you have an idea or any tips how I can further narrow down the issue?
The Composable Architecture version information
1.13.0
Destination operating system
iOS 16
Xcode version information
Xcode 15.4 (15F31d)
Swift Compiler version information
Beta Was this translation helpful? Give feedback.
All reactions