SQLite.swift icon indicating copy to clipboard operation
SQLite.swift copied to clipboard

BAD_ACCESS with iOS 16, release 0.14.1 and table create

Open crudolf opened this issue 3 years ago • 1 comments

After upgrading to 0.14.1 a table creation for an already existing table gives a BAD_ACCESS.

Build Information

SQLite: 0.14.1 iOS: 16.0.1 Build with Carthage on M1 Pro

General guidelines

In general there is an existing project which works perfectly fine with 0.13.3. After upgrading and starting the application on a real device (not reproducable with the simulator). The table.create function gives a BAD_ACCESS:

public static let table = Table("calendar_entry")

public static let dayExp = Expression<String>("day")
public static let servicerIdExp = Expression<Int64>("servicer_id")
public static let lastUpdateExp = Expression<Date>("last_update")
    
public static func getCreateTableIfNotExistsQuery() -> String {
    return table.create(ifNotExists: true) { table1 in
        table1.column(dayExp)
        table1.column(servicerIdExp)
        table1.column(lastUpdateExp)
        table1.primaryKey(dayExp, servicerIdExp)
    }
}

After downgrading to 0.13.3 this exception does not occur. Reproducable on the real device.

crudolf avatar Nov 07 '22 18:11 crudolf

I have the same problem.

When changing to variables without "static", tables are created without error

thiagosan252 avatar Apr 04 '24 10:04 thiagosan252