Skip to content
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

Raise the minimum supported version of Observable to iOS 17.0.1 #64

Conversation

ollieatkinson
Copy link
Contributor

@ollieatkinson ollieatkinson commented Apr 26, 2024

Some users on iOS 17.0.0 are unable to use Composable Architecture due to a EXC_BAD_ACCESS crash when casting subject to any Observable .

@stephencelis: Early versions of observation used a @_marker protocol for Observable, and so that might account for the crash

This raises the minimum version to iOS 17.0.1 where the crash does not occur.

(lldb) po subject is Observable
true
(lldb) po subject as? any Observable
error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x0).
The process has been returned to the state before expression evaluation.
EXC_BAD_ACCESS (KERN_INVALID_ADDRESS)
0  libswiftCore.dylib             0x39be20 tryCast(swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*&, swift::TargetMetadata<swift::InProcess> const*&, bool, bool) + 84
1  libswiftCore.dylib             0x39bc58 swift_dynamicCast + 208
2  Perception                     0x9764 PerceptionRegistrar.access<A, B>(_:keyPath:file:line:) + 103 (PerceptionRegistrar.swift:103)
3  ComposableArchitecture         0x38d44 Store<>.state.getter + 18 (Store+Observation.swift:18)

Slack Thread: https://pointfreecommunity.slack.com/archives/C04KQQ7NXHV/p1712927043813189

@ollieatkinson ollieatkinson force-pushed the oliver/raise-minimum-version-to-ios-17.0.1 branch from 71edfdc to 29e2d44 Compare April 26, 2024 16:47
Comment on lines 16 to 18
@available(macOS, deprecated: 14, renamed: "Observable")
@available(tvOS, deprecated: 17, renamed: "Observable")
@available(watchOS, deprecated: 10, renamed: "Observable")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll want the same fix for other platforms. Wanna apply the following?

Suggested change
@available(macOS, deprecated: 14, renamed: "Observable")
@available(tvOS, deprecated: 17, renamed: "Observable")
@available(watchOS, deprecated: 10, renamed: "Observable")
@available(macOS, deprecated: 14.0.1, renamed: "Observable")
@available(tvOS, deprecated: 17.0.1, renamed: "Observable")
@available(watchOS, deprecated: 10.0.1, renamed: "Observable")

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd want to check whether the macOS one is necessary, as macOS 14 came out after iOS 17.0.1 (technically), so the bug may not exist there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I raised the tvOS and watchOS as you described, I have not modified macOS - please let me know if you would prefer that @stephencelis

@ollieatkinson ollieatkinson force-pushed the oliver/raise-minimum-version-to-ios-17.0.1 branch from 0a52a8d to cffa3d3 Compare April 27, 2024 11:43
@ollieatkinson ollieatkinson force-pushed the oliver/raise-minimum-version-to-ios-17.0.1 branch from cffa3d3 to 7b3133a Compare April 27, 2024 11:43
Copy link
Member

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@stephencelis stephencelis changed the title Raise the minimum supported version of Obvervable to iOS 17.0.1 Raise the minimum supported version of Observable to iOS 17.0.1 Apr 29, 2024
@stephencelis stephencelis merged commit 03d51ee into pointfreeco:main Apr 29, 2024
2 checks passed
stephencelis added a commit that referenced this pull request Apr 30, 2024
@stephencelis stephencelis mentioned this pull request Apr 30, 2024
stephencelis added a commit that referenced this pull request Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants