I'm trying to understand why this unit test (often) produces EXC_BAD_ACCESS errors. Is the code doing something unsafe? Take a look at CombineTests.swift.
- Open BadAccessPlayground.xcodeproj in Xcode 15
- Run the testBadAccess() test in CombineTests.swift repeatedly until failure. Recommended 10000+ max iterations.
- Repeat until you witness a EXC_BAD_ACCESS error
- See the simplified test case testBadAccessSimplified(), which removes the usage of the Store class and managing cancellable handlers.
- See testBadAccess() in OpenCombineTests.swift, which uses OpenCombine instead of Apple's Combine. A EXC_BAD_ACCESS error can also be observed.
- See testNoBadAccess() in PromisesTests.swift, which uses Promises to implement a similar test case. This test does not seem to exhibit a EXC_BAD_ACCESS error.