Sqlite.swift: BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation

Created on 9 Apr 2018  路  6Comments  路  Source: stephencelis/SQLite.swift

Hi, I'm new to SQLite, it's very good and easy to use. But i'm getting a very trick issue, below is the log:

2018-04-09 20:58:56.729955+0800 Sudoku[406:17869] [logging] BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation: vnode linked while in use: /private/var/mobile/Containers/Data/Application/A3091E4F-37BB-40B2-8384-1FA3339DD032/Documents/mysqldb.sqlite

2018-04-09 20:58:58.556336+0800 Sudoku[406:17857] [logging] BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation: vnode unlinked while in use:

This log pops out around the database initiation, after getting this log all the database actions was failed due to the disc I/O error(code: 10)

I'm using SQLite.swift (0.11.4) by CocoaPods, Xcode 9.3, iOS 11.3, this issue doesn't comes out everytime, everytime I launch my app I got around 30% chance to get this error, then I have to relaunch the app again to get rid off it. Now I'm planning to release my app very soon, but cannot with this, I've tried to search the cause but no help.

Below is my initiate code:

        dbPath = "mysqldb.sqlite"
        let docsPath = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true)[0]
        let databaseStr = "mysqldb.sqlite"
        dbPath = docsPath.stringByAppendingPathComponent(databaseStr)
        do {
            BBDB = try Connection(dbPath)
        } catch let error{
            BBDB = nil
        }

Could you please help me on this? Thanks

Most helpful comment

May i know Why this issue closed without response?

All 6 comments

May i know Why this issue closed without response?

Hi,

We facing issue while deleted database file.

BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation: vnode unlinked while in use: /private/var/mobile/Containers/Data/Application/

Hello Team,

We are also facing this issue, how to resolve this one? Any suggestions

Thank you

has any update of this issue?

Seeing the same problem which kills app

has any update of this issue?

Was this page helpful?
0 / 5 - 0 ratings