![]() |
#1 |
Banned
![]() Posts: 20
Karma: 10
Join Date: Feb 2020
Device: tolino epos
|
New Feature Font Preview is causing problems
Hi,
i'm still inbestigating in this, but i guess Sigil has a problem with the font preview. If a font is obfucated and the bookid in the identfier element is changed sigil is not able to load the file after it has been saved. This was possible before the fonts could be previewed in sigil, so i guess sigil is checking now something, cant do that anymore terminates itself. Can anyone confirm this? Steps: Epub file with obfuscated fonts open change bookid in identifier element (conten.opf) save close sigil open sigil with ebook => crash |
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
We'll certainly look into eliminating the crash, but just know that changing items that are potentially used in the encryption key for obfuscated fonts is not a good idea. Best practice would be to de-obfuscate (right click on font files in Book Browser and toggle the obfuscation off), change the ID, and then re-obfuscate (if necessary). If for your own use, obfuscation is typically unnecessary. If for submission, it's generally best to let the upstream retailer apply the obfuscation. |
|
![]() |
![]() |
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I also can't get Sigil to crash using your steps (on Windows). For either obfuscation scheme. Can you give a more precise example of what you're changing the dc:identifier from, and what you're changing it to?
For what it's worth, changing the dc:identifier is definitely a no-no where Adobe's font obfuscation scheme is concerned. Not without reapplying the obfuscation afterward, anyway. It will render the fonts unusable in the epub. But it shouldn't crash Sigil. |
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
The first thing Sigil does when opening a file with obfuscated fonts is de-obfuscate the fonts so that Preview has a chance of actually working. So with broken fonts, Sigil could crash on startup.
A crash could be caused by anything the does not handle obfuscation/deobfuscation properly as fonts are binary data. The key depends on obfuscation version Adobe vs IDPF. In order to try to test things we need to know which obfuscation technique you are using (Adobe or IDPF, and both the opf bookid and any dc:identifiers that are type uuid in the opf, both before and after your changes. This has nothing to do with font preview changes as once loaded in Sigil, all fonts are de-obfuscated. |
![]() |
![]() |
![]() |
#5 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
I can not recreate this crash either. So we need more details in order to track this down.
Specifically, how *exactly* are you changing the bookid ... what to what. Is the bookid a dc:identifier that has a uuid scheme? Are you using IDPF or Adobe? How exactly are you saving the file after the change to the bookid? Is it a "Save", "Save-As" or via an output plugin. Please note that deobfuscation always happens on load (assuming the right xml exists) and any obfuscation if enabled, only happens on Save of the epub to the version in the file. Not the fersion stored in Sigil's working directory. |
![]() |
![]() |
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
We definitely want to track down the crash if possible, but I probably wouldn't edit any epub (with any epub editor) with obfuscated fonts, myself. I would work with all fonts unobfuscated (meaning Sigil doesn't have to do the de-obfuscating/obfuscating on Open/Save). Only after all epub editing was done would I make sure any fonts that needed to be obfuscated, were.
|
![]() |
![]() |
![]() |
#7 |
Banned
![]() Posts: 20
Karma: 10
Join Date: Feb 2020
Device: tolino epos
|
Ok, it was only an assumption as i had this issue only in the new version with font-preview. Another thing that led me to this assumption: if i delete the fonts before saving the epub can be opened without problem. Its this Libertine dejavu crap which is just wasting space on my e-reader.
New bookid is just psrt of my clean up script (get rid of html elements in the description, separate a list of authors into single authors meta info, grab some informatuon fram amazon and so on...) |
![]() |
![]() |
![]() |
#8 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
But if you use Adobe font obfuscation and your bookid is a uuid scheme and then change it to something not uuid based (ie: made up of groupings of valid base-16 hex chars) you would intentionally be breaking the obfuscation.
If I change it to something that is a valid uuid identifier, then font obfuscation should work with the new id just fine. Similarly, if your use IDPF obfuscation and change the id to something non-valid (say a null string) it can break IDPF obfuscation (the bookid need not be uuid for IDPF). So that is why we asked which obfuscation method was being used (see the encryption.xml in the META-INF) and exactly what it was and what you changed it to. Please provide that info so we can try to recreate the crash and get it fixed. |
![]() |
![]() |
![]() |
#9 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,611
Karma: 168431235
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Edit: I managed to crash Sigil when I modified the urn:uuid dc:identifier line. Code:
Error info: Cannot load file C:\Users\David\Desktop\Starlight - James Thatcher.epub: C:/Users/David/AppData/Local/Temp/Sigil-xhdWEU/OEBPS/Fonts/font00247.ttf: http://ns.adobe.com/pdf/enc#RC: Sigil version: 1.3.0 Runtime Qt: 5.12.9 Compiled Qt: 5.12.9 System: Windows 10 (10.0) Architecture: x86_64 Last edited by DNSB; 09-06-2020 at 04:36 PM. |
|
![]() |
![]() |
![]() |
#10 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
That is not actually a crash report. It is a Sigil exception report. Sigil is detecting that the font can not be loaded and halting before any real crash happens. DNSB is right in that if your script is running outside of Sigil and not a plugin, there really is no way for Sigil to react properly here.
Last edited by KevinH; 09-06-2020 at 08:12 PM. |
![]() |
![]() |
![]() |
#11 |
Banned
![]() Posts: 20
Karma: 10
Join Date: Feb 2020
Device: tolino epos
|
|
![]() |
![]() |
![]() |
#12 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
|
![]() |
![]() |
![]() |
#13 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,611
Karma: 168431235
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
A couple of questions:
What operating system and version of Sigil are you using? Linux, Windows, MacOSX? The current version or an older version of Sigl? Version of your OS? How are you running your script inside Sigil? A homebrew plugin? Other technique such as using the Open with functionality from the context menu for individual files? Generally, the more information you can give, the easier it is to reproduce and fix an issue. The difference between taking your vehicle in and saying "it makes a funny noise now and then" and "when I am driving over 40 kilometres per hour and tap the brakes, the ABS always kicks in even when I am braking gently". |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Feature Request - Font Preview | Vanguard3000 | Sigil | 34 | 03-05-2020 01:00 AM |
PRS-T1 Font causing crash | booklover6 | Sony Reader | 23 | 09-15-2013 05:36 PM |
Image causing problems with book view | corroonb | Sigil | 2 | 05-13-2013 07:32 PM |
Different Adobe ID causing download problems? | dandelioncottage | Reading and Management | 0 | 08-29-2012 06:46 PM |
h3 causing nav problems in epub to mobi | BKh | Conversion | 15 | 11-03-2011 11:15 PM |