SQL Lite Disk Error

We have had our app on mac for over a year. Uses SQL Lite into files.

Today my assistant got a Disk I/O Error.

It’s particular nasty because even a Force Quit on the mac would not kill the app. EAch time she went into force quit the app was still in memory. She had to restart her computer.

What causes this?
Is it a common problem with SQL Lite?
Is there a way to force the quit so they don’t have to restart?
How do I debug if it is a real problem vs. some glitch on her computer?

No one else using our program has had the problem.

I’ve never seen this particular issue with an app not quitting. I would chalk that up to random cosmic rays and the OS just getting into a weird state.

I’ve had a few issues with SQLite databases over the years but most of the time I’ve been able to use vacuum which seems to have cleared the issue. I had one instance in a really, really big SQLite database where I had to create a utility to copy the data out because none my SQLite utilities could open it (but a Xojo app could).

If no one else is reporting this issue I’d monitor it and see if it happens again. Repeatability is always the name of the game with bugs. Ask Norman how many times he gets a bug reported that isn’t reproducible in the IDE. :slight_smile:

Disk I/O sound like Hard Drive (Bad sector)

Of course, it’s always possible your disk is going bad. Run Disk Utility on it and make sure it’s backed up.

Thanks Bob as always… that’s what I thought because we do have many people using the app and no one has had this problem.

But at the same time anything that freezes and app and makes a user lose data is pretty much a “worst case bug”… we had one a long time ago that took me almost 2 years to ferret out. It was real bad.

This crash was on my assistant’s computer at her house which I don’t have access to… will Run Disk tell her if there is a problem or will it just automatically correct the issue?

If it is on a ssd drive then disk utility won’t help much. I had a SQLite app crashing randomly and it turned out to be a bad ssd. Disk diagnostics did not report any error.

My Xojo app called ‘On Site Backup’ on the MAS and web site can backup SQLite files to pretty much anything, including an SQLite database! I’m not sure how it would cope with bad sectors, but you’re welcome to give it a try — maybe it’ll help recover your database. It reads and writes the records by SQL rather than CopyFile. I know the directory copy works with faulty files, but I never tested it with a faulty SQLite database. It’s free until the end of November.

I never saw that.

Usually, Force Quit is nearly instant quit the application.

Next time, run “Activity Monitor” (I hope this is the US name, if not, must be something near), choose the application name in the % Process tab and click in the x button (top left, at the left of the i button) to kill the application and see what happens (if it quit… fast).

I read somewhere that you shouldn’t put SQL lite files on shared cloud storage and use them directly.
Is that true? Original plan was to let people share files using Dropbox, icloud, etc.

[quote=217484:@Tim Turner]I read somewhere that you shouldn’t put SQL lite files on shared cloud storage and use them directly.
Is that true? Original plan was to let people share files using Dropbox, icloud, etc.[/quote]
SQLite is particular prone to corruption that way.

[quote=217484:@Tim Turner]I read somewhere that you shouldn’t put SQL lite files on shared cloud storage and use them directly.
Is that true? Original plan was to let people share files using Dropbox, icloud, etc.[/quote]

This is true, unless you want to fill up your storage with conflicting copies. Also, the most recent copy which gets ‘released’ may not be the most recent copy, and likely won’t contain changes that other people made. So yes, stay away from cloud storage when using a SQLite file…