01-09-2019, 12:09 PM | #1 |
Zealot
Posts: 132
Karma: 10
Join Date: Oct 2015
Device: Sony Reader, Tolino Shine, Samsung Galaxy S3
|
Editor keeps crashing when trying to update TOC
I like using calibre's ebook editor to create ebooks because it's far easier than other software. But for the past few months, I've had this recurring problem:
When I add some text to my ebook, and therefore want to update the TOC, I prefer to just delete the current TOC and then choose "Generate TOC from major headings". But the minute I do so, the editor crashes and shuts down. (Thankfully I'm not stupid enough to not have saved my progress until then.) Sometimes, it crashes and shuts down after I delete the current TOC without waiting for me to try to generate TOC. It's been happening for a few months now, and I keep waiting it out thinking the next calibre version will get probably get rid of that bug, but calibre has had one or two updates in the meantime, so either it's something that hasn't been reported by someone else yet or it's happening only to me - in which case: bwuh?? Any idea what's going on here? Thank you kindly |
01-09-2019, 01:01 PM | #2 |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Generate from Major headings always worked for me.
First of all. The TOC tool generates a NCX, just to be clear. From that, you can (optionally) generate an inline (HTML) TOC If one of those exists (properly flagged), it will be replaced. If it does not exist (or not flagged) , One will be created and that operation WILL make the proper flags. (a dup TOC is an indication that it was not marked correctly) Instead of deleting the NCX, Use the TOC tool to remove the current entries (recycle icon), then Generate from... |
Advert | |
|
01-09-2019, 01:02 PM | #3 |
Bibliophagist
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
No idea what is going on here. Some information such as what operating system you are using and a debug log for the calibre editor would help a lot.
Note: I have only run the calibre editor in debug mode from a command line. I'm not certain running the calibre GUI in debug mode and then launching the editor would generate the debug file. Note2: I tried deleting all TOC entries and recreating them for a relatively simply epub and did not get a crash. Are you deleting a file (NCX or nav.xhtml?) or the TOC entries? |
01-09-2019, 03:56 PM | #4 |
Zealot
Posts: 132
Karma: 10
Join Date: Oct 2015
Device: Sony Reader, Tolino Shine, Samsung Galaxy S3
|
I'm so sorry. Apparently not only was I not specific enough, but rather misleading too with what little info I gave.
I wasn't talking about the inline TOC, but the normal epub TOC. As in, "Tools --> Table of Contents --> Edit Table of Contents --> Select all --> Remove all selected entries (recycle icon) --> Generate TOC from major headings" That's the steps. I don't need an inline TOC, and don't mess around with the NCX and similar files. Starting the main calibre in debug mode and then opening the editor does not work. And I don't think there's a debug mode option in the gui of the editor itself (or at least I haven't ever seen it), so that's why I didn't think of adding a debug log to my post. My bad. Starting command line debug mode using this: Code:
[calibre-debug --edit-book Code:
Segmentation fault (core dumped) But here's the whole of it if you'd rather: Spoiler:
The operating system I use is Ubuntu Mate 16.04.5 LTS 64-bit by the way. |
01-09-2019, 06:05 PM | #5 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That set of steps does not cause a crash on my linux system. Can you geenrate a backtrace for the crash, a bit of googling should show you how to generate backtraces on your system. Or alternatively, attach a book for which the crash happens.
|
Advert | |
|
01-09-2019, 06:06 PM | #6 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Also make sure you are using the official calibre release not the distro package of calibre.
|
01-10-2019, 03:25 AM | #7 | |
Zealot
Posts: 132
Karma: 10
Join Date: Oct 2015
Device: Sony Reader, Tolino Shine, Samsung Galaxy S3
|
Quote:
https://workupload.com/file/TTTH8rkD I'll get on that crash backtracing and post it later. I'm always using the latest calibre, not from distro, but from calibre's own download page with the download command provided there for the terminal. Thank you kindly for the help! |
|
01-10-2019, 07:56 PM | #8 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Thanks, but sadly did not crash on my linux system with that book either.
|
01-11-2019, 09:34 AM | #9 |
Zealot
Posts: 132
Karma: 10
Join Date: Oct 2015
Device: Sony Reader, Tolino Shine, Samsung Galaxy S3
|
Okay, here are two textfiles: https://workupload.com/archive/s5UA56r
Running the editor with gdb made it clear the problem is somehow in trying to use the program as normal user. When I run it as superuser, then there is no problems. In the link above, I have attached two files: gdb-ebook-edit2.txt This is the log for the edit-ebook programm started independent from gdb and then attached to it. In this way, the steps I took before the program froze up on me: Open book -->Tools --> Table of Contents --> Edit Table of Contents --> Select all --> Deleted them all --> Freeze up, but no crash-shutdown. Had to forcequit program. & gdb-ebook-edit3.txt: This is when I started the program directly from gdb. Interestingly, in this case there was no freeze up or crash. And yet, when I start the very same book (which is basically *any* epub I have) without it being attached to gdb, it crashes pretty quickly when I delete the toc. The difference, apparently, lies running it as user and as superuser. How do I solve this? Is some sort of permission missing when I'm running it as normal user or something? As mentioned, I only ever update calibre via command line with the command provided on calibre's own download page. How and where could I have even messed it up? Thank you kindly for your help! |
01-12-2019, 03:48 AM | #10 |
Zealot
Posts: 132
Karma: 10
Join Date: Oct 2015
Device: Sony Reader, Tolino Shine, Samsung Galaxy S3
|
I forgot to add:
When I start the editor as superuser, it does not freeze or crash, yes. But it also doesn't create a correct toc. As in, when I click on "generate toc from all headings", it ignores some of those headings. I thought it was because they had no id, but that's not the case. When all headings have no id, it will take the first heading in each of the html files in the ebook, and ignore the rest. I'm not sure how to get a better idea on that front. However, when I start the editor from the terminal as superuser, there's also this message that pops up before the editor starts up despite this error: Spoiler:
I have no idea what to do with this information, because I *do* have libdbus-1-3 installed. |
01-12-2019, 11:38 PM | #11 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
when you run as normal user, you wil conect to an existing dbus session, so dbus-launch is not used When you run as a different user, there is no session,s hence the error.
It's likely some permissions problem somwehere, but it is deep inside Qt code, not calibre code, so I have no way of guessing what it might be. Your next steps if you want to debug further would be to generate the stack trace with debug symbols for Qt. Which means using the system Qt or building it on yor own and then using the system calibre or building calibre on your own from source. |
01-13-2019, 01:46 AM | #12 |
Zealot
Posts: 132
Karma: 10
Join Date: Oct 2015
Device: Sony Reader, Tolino Shine, Samsung Galaxy S3
|
Thank you kindly for that explanation!
So let me see if I understand correctly: The reason for the TOC problems I'm having is this dbus error and nothing else? |
01-13-2019, 08:23 AM | #13 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It could be the dbus error, but we have no way of knowing for sure, without building Qt with defbug sybols.
|
01-15-2019, 04:19 PM | #14 |
Book E d i t o r
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
Have you tried deleting the Calibre cache folders?
I don't have time at the moment to find the link for you, but deleting all the Calibre cache folders fixed a Calibre crashing problem for me over a year ago. Mine is set to: C:\Users\username\AppData\Local\Temp |
01-16-2019, 12:04 PM | #15 | ||
Zealot
Posts: 132
Karma: 10
Join Date: Oct 2015
Device: Sony Reader, Tolino Shine, Samsung Galaxy S3
|
Quote:
But thank you kindly for that tip anyway. I agree with you that sometimes it really is something that small and simple that gets overlooked. God knows it tends to be often enough the case when I have problems with a program. Quote:
In any case, thank you very kindly for all your efforts! Much appreciated! everyone! |
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New update repeatedly crashing | scarlettruin | Calibre Companion | 6 | 09-02-2014 04:09 AM |
Editor: ToC Editor: Start entry | macnab69 | Editor | 2 | 06-25-2014 11:15 AM |
Book Editor TOC Editor Isue? | weberr | Editor | 2 | 04-17-2014 11:13 AM |
TOC-Editor: TOC according to file names? | samy2 | Calibre | 6 | 02-08-2014 12:12 PM |
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working | Magitek | LRF | 0 | 05-06-2009 01:25 PM |