stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.67k stars 1.56k forks source link

database disk image is malformed (code: 11) #928

Closed chichaykin closed 3 years ago

chichaykin commented 5 years ago

Hi,

My app has crashes in Crashlytics: Fatal error: 'try!' expression unexpectedly raised an error: database disk image is malformed (code: 11): file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang_Fall2018/swiftlang_Fall2018-1000.11.42/src/swift/stdlib/public/core/ErrorType.swift, line 184

Crashed: com.xx.some-queue 0 libswiftCore.dylib 0x56c6594 $Ss15EmptyCollectionVyxGSTsWa + 2101 1 libswiftCore.dylib 0x56fc4a1 swift_unexpectedError + 278 2 (Missing) 0x6f52646c (Missing)

Build Information

General guidelines

I cannot reproduce it.

Is there a way somehow to handle the database disk image malformed error?

georgbachmann commented 3 years ago

Hey... did you ever figure out the reason for your diskimage to be malformed? I see the same problem in my logs, but can't reproduce it either... :(

georgbachmann commented 3 years ago

Sorry to ping you again @chichaykin . Can you tell me if you figured out the root cause of the problem? And how did you fix it? Also... any idea how our database disk image turned malformed? I can also not reproduce it :(

Ankit-Aggarwal commented 3 years ago

Hey, Any update on the issue. This issue has increased for us on latest silicon mac.

georgbachmann commented 3 years ago

For me the issue was that I did replace the database but only the .db file but did not remove the -shm and -wal files... Maybe that help for you?

nathanfallet commented 3 years ago

Please ask on StackOverflow for this kind of questions (we are tracking bugs on GitHub)