Closed artemkrachulov closed 1 year ago
@artemkrachulov Without a project to work with I'm not sure there's much we can do here, so I'm going to convert to a discussion till it can be determined that this is a library bug.
I will note that I notice a couple strange things in the code above:
NSAttributedString
a @BindingState
? I'm not aware of a SwiftUI control that takes a binding to an NSAttributedString
.NSAttributedString
is safe to hold in app state in general. TCA state is meant to hold value types, but NSAttributedString
is a class.Does the crash go away entirely if you remove NSAttributedString
from state and use a plain String
(or AttributedString
) instead?
Description
In our project we have to use the bindable
NSAttributedString
property:I've added it. Two or three times I could navigate to the specific screen where this state was. Then crash appears:
When I remove
@BindingState
property wrapper I have another crash:8 of 10 times it crashes. So the crash is not 100% permanent. Also, I couldn't reproduce it in the clear project, this is very strange.
Checklist
main
branch of this package.Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
The Composable Architecture version information
0.55.0
Destination operating system
16.5.1
Xcode version information
Version 14.3.1 (14E300c)
Swift Compiler version information