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)
Post
Replies
Boosts
Views
Activity
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.
I'm aware of one existing feedback for this issue: FB14907330
I'm afraid it's impossible to guarantee database integrity (I mean foreign keys and other relational invariants) with CloudKit and CKRecord.
I recommend reading this article: https://useyourloaf.com/blog/wwdc22-core-data-lab-notes/ It is about Core Data, but many points apply to GRDB just as well.
In particular, it contains this interesting sentence:
Cloud-enabled stores have a number of restrictions. Relationships are optional. Usually we recommend having another store that is not CloudKit enabled. Copy the data from the CloudKit store to the local store where you can perform validation. Serve clients from the local store where you know the graph is valid.
Adding my voice here as well to report that Xcode 15 makes debugging sessions slow and painful, and that I wish a future release makes the debugging experience good and snappy.
On top of that, unplugging the device while a debugging session was on has triggered the nastiest iOS bug I've ever seen (twice):
The UI of the debugged app is unresponsive.
I can't go back to the Home Screen (the gesture does not work).
I can swipe down the notification panel, but can't switch to any other app from there.
I can swipe down the control center, but can't switch to any other app from there.
I can take a screenshot, but can't switch to any other app from there.
The standard shutdown (click buttons on both sides) does not work.
Basically I'm completely stuck on a unresponsive app, without any possibility to do switch to any other app.
The only solution was the very-little-known reboot gesture (short press on the sound up button, short press on the sound down button, long press on the button on the other side). This means that I had to find a computer until I could google for the solution and bring my phone back to life. And you know how phones are important nowadays.
Really not a pleasing experience, Xcode 15 :-/
The issue is solved in beta 2 :-)