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

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 11-22-2023, 09:28 AM   #496
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,746
Karma: 5446592
Join Date: Nov 2009
Device: many
Typically, the plugin itself downloads the java epubcheck jar file. Perhaps it is attempting to do that and failing. Possibly due to permissions?

Last edited by KevinH; 11-22-2023 at 09:59 AM.
KevinH is offline   Reply With Quote
Old 11-22-2023, 09:59 AM   #497
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,611
Karma: 23187563
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by roger64 View Post
I may have something wrong with python.
Most likely, you've made a mistake when editing the .json file. For example, you might have missed a comma at the end of the first line or added one at the end of the last line.
(In .json files, the last line mustn't be terminated with a comma, but all other lines must be terminated with a comma.)

As work-around, paste the following code into the .json file and save it:
Code:
{
  "locale": "fr",
  "update_check": false,
  "github": false
}
This'll disable future update checks. Once you're again in a location with better Internet access, simply delete the .json file.
Doitsu is offline   Reply With Quote
Old 11-22-2023, 09:43 PM   #498
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
There was no mistake in my previous json file. I used your reduced text above for the json file to no avail. Same results as before: It's working with the empty Sigil epub, not working for all others epubs with the same error message.
roger64 is offline   Reply With Quote
Old 11-23-2023, 07:21 PM   #499
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Checking with Doitsu's help, it's clear that the plugin must be working on my Linux install.

Some other signs pinpoint that something still unidentified is corrupt. I shall follow on this search and inform here later on as soon as the culprit will be found and summarily shot.
roger64 is offline   Reply With Quote
Old 12-05-2023, 08:10 AM   #500
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
After a thorough inquiry, Doitsu managed to ascertain that these failures were due to a kind of incompatibility between several Archlinux java installs and epubcheck.jar due to some addtionnal and exclusive Arch features.

It's nevertheless possible to use the plugin with Archlinux-and derivatives- using java jdk8-openjdk which is for this reason warmly recommended.
roger64 is offline   Reply With Quote
Old 01-10-2024, 08:57 AM   #501
sjallard
Junior Member
sjallard began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2024
Device: sigil, calibre, thorium reader, dolphin reader
java.lang.StackOverflowError

Hello, and thank you Doistu for your plugins !

I've self-solved my problem, but I'll leave my question below in case it helps someone else get his answer quicker

I did read you post, but I hadn't caught the link between the "is32bit" flag and the JVM StackOverflow error. I just assumed a 32bit flag doesn't concern my configuration and could even bring other problems/limitations if I had used it, and so I went to modify your code instead, to implement exactly your logic about the overflow prevention .

If that flag doesn't change anything important about 32/64 architecture but is more (or only?) targeted at the JVM overflow problem, could it be maybe renamed to reflect this in a future release ?

My original question :

I'm all good with every requirements (java, python, sigil) and the epubcheck update, but I got the following java.lang.StackOverflowError error :

Spoiler:
Statut : failed

EPUBCheck 5.1.0 en cours d'exécution ... veuillez patienter.
Erreur de java.
java.lang.StackOverflowError
at com.thaiopensource.relaxng.pattern.ChoiceNameClass .contains(ChoiceNameClass.java:16)
at com.thaiopensource.relaxng.pattern.AnyNameExceptNa meClass.contains(AnyNameExceptNameClass.java:14)
at com.thaiopensource.relaxng.pattern.OverlapDetector .checkOverlap(OverlapDetector.java:68)
at com.thaiopensource.relaxng.pattern.DuplicateAttrib uteDetector.checkAttributeOverlap(DuplicateAttribu teDetector.java:35)
at com.thaiopensource.relaxng.pattern.DuplicateAttrib uteDetector.addAttribute(DuplicateAttributeDetecto r.java:30)
etc. etc.


I found the following advice to augment the JVM stack size with phind.com :
Spoiler:
The java.lang.StackOverflowError you're encountering is due to the Java Virtual Machine (JVM) running out of stack space. This typically happens when there is a recursive call that goes too deep. In your case, it appears to be happening during the execution of the EPUBCheck tool within the Sigil plugin.

According to the EPUBCheck troubleshooting documentation, if EPUBCheck crashes with a StackOverflowError, you can adjust the thread stack size of your JVM by using the -Xss option of the java command. For instance, you could increase the stack size to 1024 kilobytes with the command java -Xss1024k -jar epubcheck.jar.

However, in your case, you're running EPUBCheck via a Python script, specifically the jar_wrapper function in your script. You might need to modify this function to include the -Xss1024k option when calling the java command.

Please note that increasing the stack size might not always solve the problem, especially if the underlying issue is a deeply nested recursion or a large amount of local variables. Also, be aware that increasing the stack size might lead to excessive memory usage if the stack size is set too high 2.

Lastly, remember that the -Xss option needs to be passed to the JVM before it starts, so it can't be set via Java code 2.


So I've tried the following mod of your plugin (line 447) :
Code:
    #----------------------------------------------------------------------
    # define epubcheck command line parameters
    #----------------------------------------------------------------------
    if is32bit:
        args = [java_path, '-Dfile.encoding=UTF8', '-Xss1024k', '-jar', epc_path, epub_path, '-q', '--json', '-']
    else:
        # !!! debug java.lang.StackOverflowError with -Xss1024k flag...
        # args = [java_path, '-Dfile.encoding=UTF8', '-jar', epc_path, epub_path, '-q', '--json', '-'] 
        args = [java_path, '-Dfile.encoding=UTF8', '-Xss1024k', '-jar', epc_path, epub_path, '-q', '--json', '-']
And it did work.

Is there anything else I could have done ? If no, maybe that could be an option to add via gui or via the json file ?
... Oh, I see : it is already implemented, through the "is32bit": true flag

Last edited by sjallard; 01-10-2024 at 08:59 AM. Reason: clarification
sjallard is offline   Reply With Quote
Old 02-20-2024, 06:27 AM   #502
WimStijnman
Junior Member
WimStijnman began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2022
Device: none
EpubCheck 0.4.6.3

I tried to update to the latest version of the plugin, though it did work fine.
Starting EpubCheck from within Sigil it loads EpubCheck 5.1.0 and falls to pieces with a stack overflow.
I reverted to 0.4.6.2 which was still present on my old laptop and now it works fine.
My lesson: If it ain't broke, don't fix it.
WimStijnman is offline   Reply With Quote
Old 02-20-2024, 06:58 AM   #503
WimStijnman
Junior Member
WimStijnman began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2022
Device: none
After installing 0.4.6.2 I reinstalled 0.4.6.3 and it is working OK. Don't know why.
WimStijnman is offline   Reply With Quote
Old 05-21-2024, 05:39 AM   #504
Chang
Connoisseur
Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 90
Karma: 50000
Join Date: Oct 2009
Device: none
I'm using EpubCheck 0.4.6.3 plugin with epubcheck 5.1.0 on Sigil 2.1.0.

When I run the plugin on Sigil, I don't receive any error messages. When I check the same ebook with epubcheck 5.1.0 on command prompt, I receive the following error:
Code:
Validating using EPUB version 2.0.1 rules.
INFO(RSC-004): ebook.epub/OEBPS/font/NotoEmoji-Regular.ttf(-1,-1): File "OEBPS/font/NotoEmoji-Regular.ttf" is encrypted, its content will not be checked.
ERROR(PKG-026): ebook.epub/META-INF/encryption.xml(6,68): Obfuscated resource must be a Font Core Media Type (was declared as "application/x-font-ttf" in "OEBPS/content.opf").
I know how to fix this problem but why the plugin doesn't show this same error on Sigil?
Chang is offline   Reply With Quote
Old 05-21-2024, 08:03 AM   #505
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,746
Karma: 5446592
Join Date: Nov 2009
Device: many
FWIW, inside Sigil all fonts are unobfuscated so that they can actually be used (ie. you are not looking at garbage in Preview). Only when saved are the fonts obfuscated and the encryption.xml added.

So the epbcheck plugin run on the epub when open in Sigil would not see any encryption.xml but epubcheck should have still warned you about the out of date mimetypes being used on your fonts (ie. non core media type). I guess epubcheck does not bother to run that check if you are not obfuscating that font.
KevinH is offline   Reply With Quote
Old 05-21-2024, 12:35 PM   #506
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,611
Karma: 23187563
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Chang View Post
I know how to fix this problem but why the plugin doesn't show this same error on Sigil?
I'll investigate this and update the plugin, if necessary. In order to reproduce the problem I need to know which encryption method you used: Adobe or IDPF and whether this was an epub2 or epub3 book.

Last edited by Doitsu; 05-21-2024 at 12:37 PM.
Doitsu is offline   Reply With Quote
Old 05-21-2024, 09:21 PM   #507
Chang
Connoisseur
Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 90
Karma: 50000
Join Date: Oct 2009
Device: none
Quote:
Originally Posted by Doitsu View Post
I'll investigate this and update the plugin, if necessary. In order to reproduce the problem I need to know which encryption method you used: Adobe or IDPF and whether this was an epub2 or epub3 book.
This EPUB 2 ebook was exported from InDesign 19.4 and here's the encryption.xml of the ebook:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<encryption xmlns="urn:oasis:names:tc:opendocument:xmlns:container" xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://www.idpf.org/2008/embedding"/>
    <enc:CipherData>
      <enc:CipherReference URI="OEBPS/font/NotoEmoji-Regular.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
</encryption>
Chang is offline   Reply With Quote
Old 05-22-2024, 01:49 PM   #508
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,611
Karma: 23187563
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Chang View Post
This EPUB 2 ebook was exported from InDesign 19.4 and here's the encryption.xml of the ebook:
Thanks for the file. I was able to reproduce the problem and I've found out the root cause of the problem.
Doitsu is offline   Reply With Quote
Old 05-26-2024, 12:05 PM   #509
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,611
Karma: 23187563
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Chang View Post
I'm using EpubCheck 0.4.6.3 plugin with epubcheck 5.1.0 on Sigil 2.1.0.

When I run the plugin on Sigil, I don't receive any error messages. When I check the same ebook with epubcheck 5.1.0 on command prompt, I receive the following error:
I know how to fix this problem but why the plugin doesn't show this same error on Sigil?
I've added support for obfuscated fonts to the lastest plugin version. If other Sigil users want to test this, they can download the official IDPF/W3C Wasteland sample file.
Doitsu is offline   Reply With Quote
Old 05-26-2024, 02:59 PM   #510
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,611
Karma: 23187563
Join Date: Dec 2010
Device: Kindle PW2
I've updated the plugin again and attached the latest version.

Last edited by Doitsu; 05-27-2024 at 03:38 PM.
Doitsu 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
[Plugin] PunctuationSmarten Sigil plugin DiapDealer Plugins 138 07-11-2023 11:22 AM
[Plugin] KindleImport Sigil plugin DiapDealer Plugins 187 07-04-2022 10:11 AM
Sigil Plugin Index Thasaidon Plugins 0 10-04-2014 07:41 AM
FC and Sigil 0.5.3 ePUBcheck failure Hitch Sigil 32 04-17-2012 02:56 AM
Web-based epubcheck upgraded to epubcheck 1.0.5 kjk ePub 4 02-09-2010 09:53 PM


All times are GMT -4. The time now is 02:56 AM.


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