Bug 35090 - Mono.Data.Sqlite.SqliteException The database disk image is malformed
Summary: Mono.Data.Sqlite.SqliteException The database disk image is malformed
Alias: None
Product: iOS
Classification: Xamarin
Component: BCL Class Libraries ()
Version: XI 9.2
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2015-10-20 09:31 UTC by John Miller [MSFT]
Modified: 2016-04-12 15:15 UTC (History)
6 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description John Miller [MSFT] 2015-10-20 09:31:28 UTC

   A customer is experiencing intermittent SQLite errors in their app. 

**Steps to Reproduce:**

   Unclear, need a sample. 

**Actual Results:**

Mono.Data.Sqlite.SqliteException: The database disk image is malformed
database disk image is malformed
at Mono.Data.Sqlite.SQLite3.Reset (Mono.Data.Sqlite.SqliteStatement stmt) [0x00000] in <filename unknown>:0
at Mono.Data.Sqlite.SQLite3.Step (Mono.Data.Sqlite.SqliteStatement stmt) [0x00000] in <filename unknown>:0
at Mono.Data.Sqlite.SqliteDataReader.NextResult () [0x00000] in <filename unknown>:0
at Mono.Data.Sqlite.SqliteDataReader..ctor (Mono.Data.Sqlite.SqliteCommand cmd, CommandBehavior behave) [0x00000] in <filename unknown>:0
at Mono.Data.Sqlite.SqliteCommand.ExecuteReader (CommandBehavior behavior) [0x00000] in <filename unknown>:0
at Mono.Data.Sqlite.SqliteCommand.ExecuteDbDataReader (CommandBehavior behavior) [0x00000] in <filename unknown>:0
at System.Data.Common.DbCommand.ExecuteReader () [0x00000] in <filename unknown>:0
at System.Data.Common.DbCommand.ExecuteReaderAsync (CancellationToken cancellationToken) [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter`1[System.Data.Common.DbDataReader].GetResult () [0x00000] in <filename unknown>:0
at projectname.DBHandler+<LoadQueryLazyDataTableAsync>c__async0.MoveNext () [0x00000] in <filename unknown>:0 (1)

**Expected Results:**

   No exceptions.

**Build Date & Platform:**

Xamarin Studio
Version 5.9.7 (build 22)
Installation UUID: f32e4a39-680d-45ad-ab60-d4de233e22c6
Mono 4.0.3 ((detached/d6946b4)
GTK+ 2.24.23 (Raleigh theme)

Package version: 400030020

Apple Developer Tools
Xcode 6.4 (7720)
Build 6E35b

Version: (Enterprise Edition)
Hash: 2c66d2f
Branch: master
Build date: 2015-08-04 13:52:25-0400

**Additional Information:**

   The database is in Serialized mode.
   Looking for some ideas on how to debug this.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2015-10-21 11:05:06 UTC
This sounds like a file got corrupted on the device (sudden device reboot maybe?)

Is this something they've only seen from their customers, or have they been seeing this during their own testing?
Comment 3 Sebastien Pouliot 2016-04-12 15:15:22 UTC
We have not received further information and will assume this is not an issue anymore. If you can still affected by this please re-open the bug and include the requested information. Thanks.