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,469
Karma: 5432724
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,582
Karma: 22735033
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,607
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,607
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,607
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
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 12:46 AM.


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