Open ivopintodasilva opened 12 hours ago
After going through the commits in the v1.15.0 release, I was able to pin the issue down to commit 7c6fb2670019d61e9040fab448dfce885b56c7fd
// doesn't crash
.package(
url: "https://github.com/pointfreeco/swift-composable-architecture",
revision: "83ed1230412aa30cd84cbe1b5b8a4f298bce23aa"
),
// crashes
.package(
url: "https://github.com/pointfreeco/swift-composable-architecture",
revision: "7c6fb2670019d61e9040fab448dfce885b56c7fd"
),
Hi @ivopintodasilva, thank you very much for investigating this and providing so much information. The stack trace you provided seems quite similar to the problem described here in which an isolation invariant is broken. Would you have time to cook up a repro for us to investigate more deeply?
Description
A crash is happening in the
CurrentValueRelay.request
function when I have a.publisher
effect that is subscribed to on a background queue:If I remove/comment the
backgroundQueue
subscription, this crash no longer happens.⚠️ Also worth noting that it only started occurring in Xcode 16 and TCA v1.15.0 ⚠️
I also tried to isolate the issue in a sample project by simply having a
.publisher
effect that does some work in a background queue but there the crash was not reproducible either...Will keep investigating and provide a barebones sample project with the crash replication as soon as i can.
Also worth sharing that the
recordingsService.recordings
is a TCA store publisher (store.publisher.recordings.eraseToAnyPublisher()
).Checklist
main
branch of this package.Expected behavior
The effect's inner publisher does some work in the background queue and sends an action back to the reducer (in the main queue) without crashing.
Actual behavior
Here's a stacktrace that i recovered from our crash reporter.
Reproducing project
Will append one as soon as I'm able to reproduce the issue in an isolated project.
The Composable Architecture version information
1.15.0
Destination operating system
iOS 18
Xcode version information
Xcode 16.0
Swift Compiler version information