Description
Our macOS app crashes at runtime while initializing SQLiteData.SyncEngine.
The project builds successfully, but the app crashes during SyncEngine.init, before startup completes. Cleaning DerivedData and doing a clean build does not change the behavior. I would greatly appreciate any suggestions!
The crash appears to occur in SyncEngine.swift while de-duping synchronized tables:
let allTables = OrderedSet((tables + privateTables).map(HashableSynchronizedTable.init))
.map(\.type)
The app does not reach the log immediately after SyncEngine initialization.
Possibly relevant Tuist package product typing:
let packageSettings = PackageSettings(
productTypes: [
"SQLiteData": .staticFramework,
]
)
Dependency:
.package(url: "https://github.com/pointfreeco/sqlite-data", from: "1.6.3")
Checklist
Expected behavior
SyncEngine initializes successfully for the configured synchronized tables, and app startup continues.
Actual behavior
The macOS app crashes during SyncEngine.init.
Xcode reports:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)
Tables passed to SyncEngine:
try SyncEngine(
for: database,
tables: RewriteMode.self, RewriteModeSeedDeletion.self, Snippet.self,
privateTables: RewriteHistoryEntry.self,
containerIdentifier: containerIdentifier,
startImmediately: startImmediately,
logger: logger
)
Table shape:
RewriteMode: @Table("rewriteModes"), primary key String
RewriteModeSeedDeletion: @Table("rewriteModeSeedDeletions"), primary key String
Snippet: @Table("snippets"), primary key String
RewriteHistoryEntry: @Table, primary key UUID
Stack:
Thread 0 Crashed:
swift::TargetMetadata<swift::InProcess>::getTypeContextDescriptor() const
swift::SubstGenericParametersFromMetadata::SubstGenericParametersFromMetadata(...)
swift_getAssociatedTypeWitnessSlowImpl(...)
Collection.map<A, B>(_:)
SyncEngine.init(container:defaultZone:defaultSyncEngines:userDatabase:logger:delegate:tables:privateTables:)
SyncEngine.__allocating_init(container:defaultZone:defaultSyncEngines:userDatabase:logger:delegate:tables:privateTables:)
SyncEngine.__allocating_init<each A, B>(for:tables:privateTables:containerIdentifier:defaultZone:startImmediately:delegate:logger:)
CloudKitSyncService.init(database:containerIdentifier:startImmediately:)
PersistenceBootstrap.makePersistenceClients()
AppServices.makeLive()
ReforgeApp.init()
static App.main()
Reproducing project
I do not yet have a standalone reproducing project. The current reproduction is in a Tuist-generated macOS app project using the SyncEngine initialization shown above.
SQLiteData version information
1.6.3
Sharing version information
2.8.0
GRDB version information
7.10.0
Destination operating system
macOS 26.5.1
Xcode version information
Xcode 26.4.1
Swift Compiler version information
swift-driver version: 1.148.6 Apple Swift version 6.3.1 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
Target: arm64-apple-macosx26.0
Description
Our macOS app crashes at runtime while initializing
SQLiteData.SyncEngine.The project builds successfully, but the app crashes during
SyncEngine.init, before startup completes. Cleaning DerivedData and doing a clean build does not change the behavior. I would greatly appreciate any suggestions!The crash appears to occur in
SyncEngine.swiftwhile de-duping synchronized tables:The app does not reach the log immediately after
SyncEngineinitialization.Possibly relevant Tuist package product typing:
Dependency:
Checklist
mainbranch of this package.Expected behavior
SyncEngineinitializes successfully for the configured synchronized tables, and app startup continues.Actual behavior
The macOS app crashes during
SyncEngine.init.Xcode reports:
Tables passed to
SyncEngine:Table shape:
RewriteMode:@Table("rewriteModes"), primary keyStringRewriteModeSeedDeletion:@Table("rewriteModeSeedDeletions"), primary keyStringSnippet:@Table("snippets"), primary keyStringRewriteHistoryEntry:@Table, primary keyUUIDStack:
Reproducing project
I do not yet have a standalone reproducing project. The current reproduction is in a Tuist-generated macOS app project using the
SyncEngineinitialization shown above.SQLiteData version information
1.6.3Sharing version information
2.8.0GRDB version information
7.10.0Destination operating system
macOS
26.5.1Xcode version information
Xcode
26.4.1Swift Compiler version information