Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 01-09-2019, 01:09 PM   #1
edeniz
Zealot
edeniz began at the beginning.
 
Posts: 123
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
edeniz is offline   Reply With Quote
Old 01-09-2019, 02:01 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 22,489
Karma: 22514864
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A, Kobo Aura2
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...
theducks is offline   Reply With Quote
Advert
Old 01-09-2019, 02:02 PM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 5,346
Karma: 24282234
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura One, Aura H2O, Aura HD, Nexus 7 HD, iPad Air, Tolino epos
Quote:
Originally Posted by edeniz View Post
Any idea what's going on here?

Thank you kindly
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?
DNSB is offline   Reply With Quote
Old 01-09-2019, 04:56 PM   #4
edeniz
Zealot
edeniz began at the beginning.
 
Posts: 123
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
got me:

Code:
Segmentation fault (core dumped)
That's really all in terms of error message I get in the debug.

But here's the whole of it if you'd rather:

Spoiler:
Code:
~$ calibre-debug --edit-book
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 120.0 x 120.0
physicalDpi: 106.387434555 x 106.325581395
Using calibre Qt style: True
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Key u'Ctrl+Alt+Shift+E' for shortcut Run EpubCheck is already used by Edit Spans & Divs, ignoring
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Segmentation fault (core dumped)
~$


The operating system I use is Ubuntu Mate 16.04.5 LTS 64-bit by the way.
edeniz is offline   Reply With Quote
Old 01-09-2019, 07:05 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,915
Karma: 10254168
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.
kovidgoyal is offline   Reply With Quote
Advert
Old 01-09-2019, 07:06 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,915
Karma: 10254168
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.
kovidgoyal is offline   Reply With Quote
Old 01-10-2019, 04:25 AM   #7
edeniz
Zealot
edeniz began at the beginning.
 
Posts: 123
Karma: 10
Join Date: Oct 2015
Device: Sony Reader, Tolino Shine, Samsung Galaxy S3
Quote:
Originally Posted by kovidgoyal View Post
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.
Actually the crash happens to basically all books, even ones I didn't create myself. But still. Here in this link is an example book for one that doesn't have a lot of content but still crashes after deleting current toc:

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!
edeniz is offline   Reply With Quote
Old 01-10-2019, 08:56 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,915
Karma: 10254168
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Thanks, but sadly did not crash on my linux system with that book either.
kovidgoyal is offline   Reply With Quote
Old 01-11-2019, 10:34 AM   #9
edeniz
Zealot
edeniz began at the beginning.
 
Posts: 123
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!
edeniz is offline   Reply With Quote
Old 01-12-2019, 04:48 AM   #10
edeniz
Zealot
edeniz began at the beginning.
 
Posts: 123
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:
Code:
root@# ebook-edit
DBusExport: Failed to connect to DBUS session bus, with error: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: dbus-launch: /opt/calibre/lib/libdbus-1.so.3: version `LIBDBUS_PRIVATE_1.10.6' not found (required by dbus-launch)


I have no idea what to do with this information, because I *do* have libdbus-1-3 installed.
edeniz is offline   Reply With Quote
Old 01-13-2019, 12:38 AM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,915
Karma: 10254168
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.
kovidgoyal is offline   Reply With Quote
Old 01-13-2019, 02:46 AM   #12
edeniz
Zealot
edeniz began at the beginning.
 
Posts: 123
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?
edeniz is offline   Reply With Quote
Old 01-13-2019, 09:23 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,915
Karma: 10254168
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.
kovidgoyal is offline   Reply With Quote
Old 01-15-2019, 05:19 PM   #14
deback
Book E d i t o r
deback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the end
 
Posts: 287
Karma: 31930
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
deback is offline   Reply With Quote
Old Yesterday, 01:04 PM   #15
edeniz
Zealot
edeniz began at the beginning.
 
Posts: 123
Karma: 10
Join Date: Oct 2015
Device: Sony Reader, Tolino Shine, Samsung Galaxy S3
Quote:
Originally Posted by deback View Post
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
I have a separate partition for temporary files that deletes with each shutdown, and I don't keep what few cache folders that don't empty automatically after a program is closed.

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:
Originally Posted by kovidgoyal View Post
It could be the dbus error, but we have no way of knowing for sure, without building Qt with defbug sybols.
I see. So basically it sounds like the problem is not with calibre but with my system. In that case I'm inclined to wait a few days until next week or so when I can update my OS to a newer ubuntu version. Maybe this will get rid of any debris that might be interfering. And a completely new installation of QT might help too. Let's see what happens afterwards.

In any case, thank you very kindly for all your efforts! Much appreciated!


everyone!
edeniz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New update repeatedly crashing scarlettruin Calibre Companion 6 09-02-2014 05:09 AM
Editor: ToC Editor: Start entry macnab69 Editor 2 06-25-2014 12:15 PM
Book Editor TOC Editor Isue? weberr Editor 2 04-17-2014 12:13 PM
TOC-Editor: TOC according to file names? samy2 Calibre 6 02-08-2014 01:12 PM
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working Magitek LRF 0 05-06-2009 02:25 PM


All times are GMT -4. The time now is 04:43 AM.


MobileRead.com is a privately owned, operated and funded community.