GRDB crash (iOS18 only)

The GRDBInternal private framework that ships with iOS 18 might well create conflicts for apps that use the regular GRDB.

The symptom is a hard crash whenever one performs a database access through a DatabaseWriter or DatabaseReader existential - an action that almost all GRDB-powered apps have been doing, for many years.

I'm not sure how to write an efficient feedback about this concerning issue.

https://github.com/groue/GRDB.swift/issues/1619

I'm aware of one existing feedback for this issue: FB14907330

Is this an iOS problem? Or an Xcode problem?

I had a quick look at FB14907330 and that indicates an Xcode issue. It also claims that it doesn’t reproduce in the current Xcode 16.1 beta (16.1b1).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hello,

I'm quite confused, actually. People report the crash with Xcode 16 RC when running on iOS 18. Some people report that the crash only happens when the minimum target is set it 18 - but not all.

Since it's a crash when opening a Swift existential, I initially suspected a linker error. Hence my mention of GRDBInternal.

Later on, another user mentioned https://github.com/swiftlang/swift/issues/75155, which is also a runtime crash when opening an existential. It wasn't a linker error but a compiler bug, in a very specific context: pre-built GRDB & ABI resilience. None of my users have reported that their crash happen in such a specific context - it looks like they are using the regular SPM integration.

It's clear I have to come up with a clear repro.

It's clear I have to come up with a clear repro.

Yeah, I think so )-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for your messages. Here is a repository that reproduces the crash. Run https://github.com/groue/GRDBIssue1619 in a simulator (Xcode 16 RC)

The README of the repository explains different steps for reproducing, or solving the crash, inspired from this post by Mike Ash: https://mastodon.sdf.org/@mikeash/113124733046738455

I also submitted FB15110709 (with my poor understanding of the issue)

GRDB crash (iOS18 only)
 
 
Q