View Single Post
Old 07-17-2021, 08:10 PM   #22
Cootey
Absentminded Reader
Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.
 
Cootey's Avatar
 
Posts: 1,345
Karma: 7442365
Join Date: Apr 2017
Device: Kobo Mini, Libra Colour & Elipsa; Kindle Paperwhite 3 & 4; iOS apps
Quote:
Originally Posted by davidfor View Post
The problem is knowing when the database became corrupted. The error is at the start of the loop reading the database. It is probably happening on the first record, but, might be happening after reading some of the book records. And that probably means the database is already corrupted when calibre sees it.

Can you test the database before using calibre? Any SQLite database manager should be able to do it. They might have an option to do the check. But, there isn't, then run "PRAGMA integrity_check". You can try DB Browser for SQLite as that has a MAC version.
I had DB Browser for SQLite already installed, so I copied the Elipsa KoboReader.sqlite and ran the "PRAGMA integrity_check" on it.

Code:
Execution finished without errors.
Result: 1 rows returned in 3144ms
At line 1:
PRAGMA integrity_check;
Because I backed up to an earlier version before things went kablooie, my database is fine.

Quote:
Originally Posted by davidfor View Post
If the database is fine, run calibre in debug mode. That will let us see if it is breaking when the database is first opened, or after reading some records. You will need to start calibre with the command "calibre-debug -g" to do this.
You could also check the database before ejecting the device. This is to confirm that calibre did not do anything bad.
Running in debug mode now. Thanks.

I used Calibre to copy one book over and checked the database before ejecting. Everything is A-OK.

Quote:
Originally Posted by davidfor View Post
Other thoughts are:

Could it be the MAC? If you have another computer to try, it would be good to do soo.

Are you ever powering off?

Are there any log files being produced in the .kobo directory? I'm mainly wondering about stack dumps which will have the name "stack_xx.log" where xx is two numbers. If these exist, they are a sign of a crash happening somewhere.

Does the partition show as being dirty when you connect? I don't know if the MAC will show this. Windows would offer to check the partition if it is dirty.
1) I don't have problems like this with either of our Kobo Clara HDs, or either Kobo Aura One in the past. I wasn't exactly paying attention to what I was doing just prior to getting the database error in Calibre, but IIRC, the error popped up when I plugged the Elipsa in after an evening of setup. That might indicate the problem happened on the Elipsa. I'll watch for it.
2) Powering off my Mac while the Elipsa is plugged in? No. I keep my Mac on at all times. I don't even let it sleep.
3) No log files as you described.
4) From what I've read, Mac tools for dealing with ExFat dirty drives is minimal. I'll have to see if that is the case if the corruption should occur again.

Thanks!

Last edited by Cootey; 07-17-2021 at 08:26 PM.
Cootey is offline   Reply With Quote