On Fri, Aug 14, 2015 at 8:38 AM, Simon Slavin <slavins at bigfraud.org> 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 App is meant to react to the notification and shut down in less 
> than (IIRC) 6 seconds, without depending on network connections and without 
> using unusual amounts of power.

And just to add to this:  This is is reasonably good conditions.

I've dealt with a bug (unrelated to SQLite) that a tester of mine
could create data corruption on an iOS device.  The tester's device
had a bad battery, so by the time the device thought it had minutes of
power, it had seconds of life left, at best.  The tester was quite
adept at getting their device in a specific state that would cause our
app to destroy a data file.  I could never reproduce the condition on
my device, and indeed this tester couldn't either.  It had to be this
specific device with it's battery.

This is a lot of words to say:  All sorts of bad things are possible
when these devices start to lose power.  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
was indeed doing things to "help" me out.

Reply via email to