[sqlite] SQLite database becomes corrupt on iOS

2015-08-20 Thread Simon Slavin
On 20 Aug 2015, at 6:22am, Scott Perry wrote: > That said, it's possible to corrupt a database by forcing the device to power > off (by holding the power and home buttons) while SQLite's writes are in > flight. This is equivalent to the conditions of a kernel panic. This is true only if your

[sqlite] SQLite database becomes corrupt on iOS

2015-08-20 Thread Scott Perry
On Aug 19, 2015, at 11:34 PM, Simon Slavin wrote: > > > On 20 Aug 2015, at 6:22am, Scott Perry wrote: > >> That said, it's possible to corrupt a database by forcing the device to >> power off (by holding the power and home buttons) while SQLite's writes are >> in flight. This is equivalent t

[sqlite] SQLite database becomes corrupt on iOS

2015-08-19 Thread Scott Perry
On Aug 14, 2015, at 10:13 AM, Simon Slavin wrote: > On 14 Aug 2015, at 5:16pm, Random Coder wrote: >> I've run into other issues >> that lead me to believe the OS is caching file writes until the app >> exits in some situations regardless of various sync calls, but I never >> did have time to tra

[sqlite] SQLite database becomes corrupt on iOS

2015-08-14 Thread Rob Willett
Simon, Thanks very much for this information. Rob. > On 14 Aug 2015, at 17:38, Simon Slavin wrote: > > > On 14 Aug 2015, at 4:17pm, skywind mailing lists > wrote: > >> this is the problem. I could never reproduce it by myself and even my >> customers have normally no problems. But it happ

[sqlite] SQLite database becomes corrupt on iOS

2015-08-14 Thread Simon Slavin
On 14 Aug 2015, at 5:16pm, Random Coder wrote: > I've run into other issues > that lead me to believe the OS is caching file writes until the app > exits in some situations regardless of various sync calls, but I never > did have time to track down if I was just fooling myself, or if the OS > wa

[sqlite] SQLite database becomes corrupt on iOS

2015-08-14 Thread skywind mailing lists
Hi, this is the problem. I could never reproduce it by myself and even my customers have normally no problems. But it happens once a year or so to one of my customers. Still this is very annoying as it results in data loss. Regards, Hartwig > Am 14.08.2015 um 17:15 schrieb Simon Slavin : > >

[sqlite] SQLite database becomes corrupt on iOS

2015-08-14 Thread skywind mailing lists
Hi, I think that I can exclude for 99.99% that there are two SQLite version because I should get linker errors. Anyway, what is definitely guaranteed that these two versions know anything from each other and that they are working on the same database. Regards, Hartwig > Am 13.08.2015 um 21:42

[sqlite] SQLite database becomes corrupt on iOS

2015-08-14 Thread skywind mailing lists
Hi, I do not get any error message from SQLite. And the database only gets corrupted when the iDevice has to shut down due to battery issues. I have never had a customer complaining about a corrupt database during normal operation. Regards, Hartwig > Am 13.08.2015 um 21:04 schrieb Simon Slavin

[sqlite] SQLite database becomes corrupt on iOS

2015-08-14 Thread Simon Slavin
On 14 Aug 2015, at 4:17pm, skywind mailing lists wrote: > this is the problem. I could never reproduce it by myself and even my > customers have normally no problems. But it happens once a year or so to one > of my customers. > Still this is very annoying as it results in data loss. I have s

[sqlite] SQLite database becomes corrupt on iOS

2015-08-14 Thread Simon Slavin
On 14 Aug 2015, at 4:10pm, skywind mailing lists wrote: > I do not get any error message from SQLite. And the database only gets > corrupted when the iDevice has to shut down due to battery issues. I have > never had a customer complaining about a corrupt database during normal > operation.

[sqlite] SQLite database becomes corrupt on iOS

2015-08-14 Thread Rousselot, Richard A
-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of skywind mailing lists Sent: Friday, August 14, 2015 10:18 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] SQLite database becomes corrupt on iOS Hi, this is the problem. I

[sqlite] SQLite database becomes corrupt on iOS

2015-08-14 Thread Richard Hipp
On 8/14/15, skywind mailing lists wrote: > I think that I can exclude for 99.99% that there are two SQLite version > because I should get linker errors. Sadly, no. But on the bright side, even if you do have two or more copies of SQLite linked into your binary, everything will still work fine a

[sqlite] SQLite database becomes corrupt on iOS

2015-08-14 Thread Random Coder
On Fri, Aug 14, 2015 at 8:38 AM, Simon Slavin wrote: > I have seen a problem like this only in one context, and it had nothing to do > with SQLite. When an iDevice's power starts running low, it sends out > notifications to all running Apps and expects their cooperation in shutting > down. An

[sqlite] SQLite database becomes corrupt on iOS

2015-08-13 Thread Simon Slavin
On 13 Aug 2015, at 6:32pm, skywind mailing lists wrote: > Before my app closes I close the database explicitly. Though I do not know if > this happens always when the iDevice shuts down due to battery issues. iDevices shut down quite a time before they'd actually run out of power. Before yo

[sqlite] SQLite database becomes corrupt on iOS

2015-08-13 Thread skywind mailing lists
Hi, does anybody have any similar experience that an SQLite database becomes corrupt on iOS? It seems to be that when the iDevice is running out of battery it can happen that the SQLite becomes corrupt. I have currently not found a possibility to reproduce it but once a while my customers exper

[sqlite] SQLite database becomes corrupt on iOS

2015-08-13 Thread Eric Sink
https://www.sqlite.org/howtocorrupt.html I know you said you already checked this, so just ignore the following remark: iOS is one of the easiest platforms to accidentally end up with "Multiple copies of SQLite linked into the same application". Just sayin'. -- E On Thu, Aug 13, 2015 at 2:04