MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Book crashing Sigil on Mac (https://www.mobileread.com/forums/showthread.php?t=335278)

Magess 12-01-2020 11:42 AM

Book crashing Sigil on Mac
 
Hello. I have Sigil 1.4.2 installed on MacOS 10.15.7.

I'm trying to edit this book for work. Initially, it got an error that a file was not present (an iTunes playlist) and would beachball after I clicked close.

I used calibre to open the file and remove the playlist file and save it again, but Sigil still won't open it. I was trying to confirm that it is indeed fixed layout, which is apparently stored as a piece of metadata, but not one that calibre seems to show me.

So I wanted to both report the issue and see if anyone would know how I might check the format. It seems FXL because when I open it in Books and resize the window the ratio stays the same?

KevinH 12-01-2020 12:07 PM

Is this work under copyright? If so, it is illegal to post this book here.

To be safe I have removed the file. If this is your epub or public domain, then you may repost it.

I did look at the book and it is not FXL but it does use a fixed viewport size and javascript.

Since it appears to be an epub2 book that uses javascript, the book is technically broken as epub2 does not support any javascript.

I will look into why this book will not load in Sigil. I was able to unzip the epub and use PageEdit to open the file and once in Preview mode, actually read the story and move to the correct pages.

KevinH 12-01-2020 12:56 PM

Okay, this epub seems to be very broken and does not meet spec in many ways:

- it is an epub2 which does not support javascript at all but it uses javascript
- it is missing the required scripted and manifest properties required buy epub3
- its content.opf incorrectly sets the mime type of a css file to "Text/css" and not "text/css"
- it META-INF encryption.xml file for the fonts is also very broken. Its URI entries are supposed to be absolute URIs from the root of the epub and not relative to META-INF (similar to how the container.xml works).

This last bit is what causes the fonts to be constantly reloaded again and again which causes Sigil to hang.

I will see if I can make Sigil more robust to bad or broken encryption.xml files.


If you paid for this, I would ask for my money back. It is in really sad shape and will probably only work in iBooks.

KevinH 12-01-2020 01:30 PM

I have now found a way to detect the broken encryption.xml font uris and fix them to prevent Sigil from hanging on load. This fix has been committed to master.

It will appear in the next release of Sigil.

So thank you for your bug report!

Kevin

ps: If you want to fix this in your epub, unzip it and hand edit the META-INF/encryption.xml file with a decent text editor and for each font URI that begins with "../" remove the "../" and save the file. Then rezip and it, rename it to epub and then load it in Sigil.

ps. Even with all of its bugs and issues, it appears to "work".

Magess 12-01-2020 02:33 PM

Ah sorry. I thought it was important to make the file available for someone to look at.

It was given to me as an example of "what they wanted". Given what you found in looking at it, I will need to ask our vendor to provide a quote on doing this but properly to provide us something that's "like" that file but meets standards.

Thank you for taking a look!

KevinH 12-01-2020 03:47 PM

FWIW, I think it could be a legal epub3 book that would meet spec if properly done as an epub3 and the spec errors fixed.

In the future, you can pm me here on mobileread with a link to your problem epub and I can use it to diagnose any bugs and delete it afterwards. Posting it in a public forum is just not allowed here.


All times are GMT -4. The time now is 10:34 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.