Crash at launch Xcode 16 iOS 18 - EXC_BAD_ACCESS 0x100b63934 (0x100b638e0 + 84) specialized withCheckedContinuation<A>(isolation:function:_:)
joaopdcgarcia opened this issue · 44 comments
- I have updated Purchases SDK to the latest version
- I have read the Contribution Guidelines
- I have searched the Community
- I have read docs.revenuecat.com
- I have searched for existing Github issues
Describe the bug
Crashes at launch with a not so useful stacktrace.
RevenueCat 4.43.2 Xcode 16 beta 5 + iOS 18 crash
- Environment
- Platform: iOS
- SDK version: 4.43.2.
- StoreKit version:
- StoreKit 1
- StoreKit 2 (enabled with
usesStoreKit2IfAvailable(true)
)
- OS version: 18
- Xcode version: 16 beta 5
- Device and/or simulator:
- Device
- Simulator
- Environment:
- Sandbox
- TestFlight
- Production
- How widespread is the issue. Percentage of devices affected.
100%
- Debug logs that reproduce the issue.
No logs, just this stacktrace.
- Steps to reproduce, with a description of expected vs. actual behavior
Launch the app.
- Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
<compiler-generated>
specialized withCheckedContinuation<A>(isolation:function:_:)
- Additional context
Add any other context about the problem here.
We want to keep supporting iOS 12. Is the v.4.x of RevenueCat going to be deprecated?
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Hello @joaopdcgarcia,
Is the issue only reproducing for you in TestFlight? do you have any more complete stacktrace? With just the one you posted we cannot be sure the crash happens within this SDK's code.
I've not been able to reproduce the issue you describe using Xcode 16.1 beta 2, a simulator running iOS 18.1, a device running iOS 18 beta 6, and version 4.32.2 of the SDK, while compiling in release mode.
Hello @joaopdcgarcia,
Is the issue only reproducing for you in TestFlight? do you have any more complete stacktrace? With just the one you posted we cannot be sure the crash happens within this SDK's code.
I've not been able to reproduce the issue you describe using Xcode 16.1 beta 2, a simulator running iOS 18.1, a device running iOS 18 beta 6, and version 4.32.2 of the SDK, while compiling in release mode.
One of our QA tester was the only one to reproduce this on TF (he has a lot of transactions not sure if that matters), consistently. If I comment out RevenueCat, it crashes again and that call seems to be done inside RC.
I'm trying to gather logs by upgrading another device to iOS 18. EDIT: Not able to crash on this one either.
I've updated with the full stacktrace
We've built with xcode 16 beta 5.
I am suffering from a similar issue.
It happens when I try to build with Xcode on my own Mac as iOS app adapted to Mac. Other builds in simulators and real devices work fine
RevenueCat 5.2.3
XCode 16 beta 5 and XCode 16.1 beta
MacOS Sonoma 14.5
Edit: Found out some users are having a crash in my Tesflight build, too, running iOS18.1
Tried commenting all my methods to check if I was doing something wrong, but simply calling Purchases.shared.offerings() also crashes the app
running xcode 16.1, swift package 5.2.3, issue occuring for me as well. This is line in debugger where dies after: DEBUG: ℹ️ Warming up intro eligibility cache for 2 products.
Where error throws:
static func call<Value, Error: Swift.Error>(
method: (@escaping @sendable (Result<Value, Error>) -> Void) -> Void
) async throws -> Value {
return try await withCheckedThrowingContinuation { continuation in
@sendable
func complete(_ result: Result<Value, Error>) {
continuation.resume(with: result)
}
method(complete)
}
}
Thank you for the additional information @timothygremp @rosday @joaopdcgarcia
I have been able to reproduce the issue, but only in a very limited scenario.
The following snippet is enough to force the crash:
_ = await withCheckedContinuation { continuation in
continuation.resume(returning: true)
}
I can reproduce on Xcode 16 beta 5 and Xcode 16.1 beta 1, but ONLY when running the app as "Designed for iPhone/iPad" on macOS Sonoma, and ONLY in debug mode (crash goes away in release mode).
I cannot reproduce by running on iOS 17 or 18 neither device nor simulator, and cannot reproduce either when running on macOS Sequoia beta.
I have not been able to test the scenario where it crashes when installed via TestFlight, but I'm confident it's triggered by the same bug.
Has any of you been able to reproduce the issue locally in a scenario that does not involve running as "Designed for iPhone/iPad"?
Has any of you been able to reproduce the issue locally in a scenario that does not involve running as "Designed for iPhone/iPad"?
@MarkVillacampa, I’ve been facing a similar issue and can reproduce it on my iPhone running iOS 18 beta 4. The crash only occurs in Xcode 16.0 Beta 5.
I'm also seeing a crash on withCheckedThrowingContinuation
. I didn't experience this crash personally, but a member of my team is crashing on launch in Test Flight (They are on iOS 18 - beta 3).
I am running version 5.2.3 of the RevenueCat SDK. The minimum deployment target for my project is iOS 18.
Here's the stack trace and code snippet from the Test Flight crash report (again, I have not been able to recreate myself):
It is fixed in Xcode 16 Beta 6!
It is fixed in Xcode 16 Beta 6!
It still crashes for me
@rudrankriyam Unfortunately, I can still reproduce in Xcode 16 beta 6 by running the app in a Sonoma host as "Designed for iPhone/iPad". Can you confirm if it crashes for you in that scenario?
@SAllen0400 @kristofferbv you're both right, it also crashes in withCheckedThrowingContinuation
. I will update issue report.
Hey @MarkVillacampa and @rosday, I updated my phone to iOS 18 Beta 7 too, and it is not crashing on it. Unfortunately, as you mentioned, it is crashing on other OSes, or previous betas. :/
@rudrankriyam thanks for the clarification!
I have not been able to reproduce the crash on device by running from Xcode (I have not been able to test via TestFlight tho). If you're able to repro on device, could you describe the combination of Xcode and iOS versions?
@MarkVillacampa I was using Xcode 16 Beta 5 + iOS 18 Beta 6 where the crash was happening. I realised it when it started crashing on TestFlight where Xcode Cloud was using Beta 5. After updating to iOS 18 Beta 7 and Xcode 16 Beta 5, I am not seeing any withCheckedThrowingContinuation
both for my code and RC's SDK