View Single Post
Old 09-15-2017, 07:20 AM   #21
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303826
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
As far as I can work out, it is a size issue. The number of ToC entries and the amount of text in each chapter. It is probably also affected by the code complexity in the book. How many books you have on the device might affect it as well.

What happens when you open a kepub is that the device calculates the word count for all the ToC entries in the book. This is stored in the database and used for the chapter graph in the in book stats. What seems to be happening is that when the word counting takes to long, sickel (the process watcher) thinks it has detected a hung process and restart the device. When you open the book after the restart, it works. This is probably because the word counts for some ToC entries were stored, and only a few need to be calculated.

If this theory is right, then anything that affects the time taken to calculate the word count could affect this. Book size, chapter size, number of ToC entries, complicated code in the book, larger database, other thing running. Even opening the book immediately after a restart might be enough as nothing extra is running and the memory is probably cleaner.

It is an annoying problem to reproduce as it doesn't always happen. I have put a book on the device and had it restart. Then deleted the book and put it back on, and it was OK. And it is inconsistent across my devices. And that makes me think my theory above is good.

One thing I am surprised at is that a preview triggered this. Can you post the link so I can try it?
davidfor is offline   Reply With Quote