Skip to content

Weird crash on iOS 15 #986

Answered by tgrapperon
buscarini asked this question in Q&A
Jan 27, 2022 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

In my experience, these weird crashes (that are happening where they shouldn't) are caused by a stack overflow. It can happen easily when using TCA, as the State can end up being a huge struct value that lives almost entirely on the stack.
Maybe you can try to box a few of your child states (you can convert them as a computed property to the first value of a one-value array (which stores its values on the heap) to quickly check if it helps, or use a proper boxing property wrapper). You may find more information here and here for example.

It may be something else, but that's what I'd try first in this case. Deleting DerivedData may also be an option if you have doubts about your compiler-g…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@tgrapperon
Comment options

Answer selected by buscarini
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants