New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crash in PreferenceKey.reduce(value:nextValue:) in conformance PositionPreferenceKey #6
Comments
Forgot to mention that we've seen this so far on iOS 14.7.1 & 14.8.0. So far only on iPhone 12 Pro. I'm seeing that for iOS 15 it's already switching to the new |
Hi, glad you're happy with the library! TL;DR - the issue is unfixable. It comes from SwiftUI internals and is beyond control. Longer version: I just tested this on an iPhone 7 with 14.7.1 and an SE with 14.8 and haven't seen any crashes (and I have the component used in a production app, although I have no clue how many 12 Pro users on 14.8 do we have :)). Additionally, I can't try this on a simulator since there aren't any simulator components between 14.5 and 15.0. Based on the stack trace, the issue isn't really with PreferenceKeys (which are just the expected way of propagating state changes triggered by other state changes). Normally, there'd be two possible causes for the issues you're seeing:
Since you're only seeing this on a single phone , I'd say it's the latter. Regardless, the issue is (most likely) unfixable as it's a faulty implementation on SwiftUI side (and apparently just for 12 Pro). This is what generally makes SwiftUI not suitable for production yet - it's plagued with internal bugs that are tied to OS version, and you have no choice but to wait for Apple to fix them in a coming version. iOS 13.* was incredibly unstable, 14.* fixed that for the most part, 15.* betas seem even more stable as it seems. As far as as iOS 15 goes, the component doesn't use |
Thanks for your quick and detailed response! Resonates with my assessment as well. In this instance there aren't any other GeometryReaders involved, so I'll just file it as a #wontfix for us and wait until it resolves itself by people upgrading to iOS 15. |
Hey,
thanks for creating this library! Super useful.
We've been seeing a couple crashes with it since recently, and not a real clue what could be causing this. From the app usage logs we can see in our Crashlytics, we don't see a clear pattern yet. There's nothing from our own code directly involved in the crashes, all we can find so far is that its in
PreferenceKey.reduce(value:nextValue:)
fromPositionPreferenceKey
.Tapping in the dark here, so hoping you might have a clue. I'm myself not familiar enough yet with how
PreferenceKey
s are supposed to work.Cheers
The text was updated successfully, but these errors were encountered: