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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 08:06 AM   #1
philja
Evangelist
philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!
 
Posts: 460
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Bug in validation results display in 2.8.6

I had a strange error appear when running a check with EpubCheck plugin on a previously 'perfect' epub3 file. In my linux machimne using AppImage 2.8.6.

A rapid check shows that it happens as well on Windows 11, Sigil 2.8.6 and on my MacBook, also at 2.8.6.

What I had done was change a back-matter file by deleting the old and inserting the new in the form of an updated file used in a series of books. I have done this dozens of times without problems. After inserting the new file, there are always some internal links to update because the new file's anchor id's are not always the same as the fragments in the older files which link to the new.

I habitually run EpubCheck and geta load of pink errors in the Validation pane and these are about missing fragments. A click on the line in the validation pane takes me to the file and line concerned where the edit needed can immediately be made.

Yesterday, the first time with the new linux, I ran EpubCheck and it seemed to indicate success in the plugin runner but then a pop-up dialog appeared : see attached screenshot.

When I deleted the little pop-up, the expected error messages appeared in the plugin runner window but not in the validation window.

This seems to indicate a problem in Sigil rather than in the plugin, I would guess.

I have today managed to replicate this problem by a simple edit to break the link fragments. If there are 6 or fewer of these fragment errors, the results display correctly in the validation pane. But with 7 or more 'corrupted' fragments, the little pop-up appears to complain about 'expecting ';' but got ''''.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20261115_212913.png
Views:	21
Size:	77.5 KB
ID:	227422  

Last edited by philja; Yesterday at 08:17 AM. Reason: Confirm on W11 and Mac
philja is offline   Reply With Quote
Old Yesterday, 08:31 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,957
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
In almost all cases, that error is a problem with the plugin. The plugin is failing before its results have successfully been reported to Sigil. I won't rule out a problem with Sigil, but it's more likely your plugin updated and behavior changed. Remember when others were having problems with epubcheck when it was trying to update to a mystery version, yet you were reporting no issues?

The epub errors being reported in the plugin runner window are that which were provided by python as a result of the plugin run. The "Success" message is simply that the plugin returned no error code. That does not mean the errors to report back to Sigil were not malformed in some way.

Last edited by DiapDealer; Yesterday at 08:35 AM.
DiapDealer is offline   Reply With Quote
Advert
Old Yesterday, 08:46 AM   #3
philja
Evangelist
philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!
 
Posts: 460
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
OK. You're better placed than me to judge where the likely problem lies.

I do remember that I didn't get a problem with that funny name. But as soon as Doitsu posted the update, to 0.4.8, I applied it to all my machines. I have made several of those file exchange updates since, without trouble until this week.

Should this thread be transferred to the plugin forum?
philja is offline   Reply With Quote
Old Yesterday, 08:51 AM   #4
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: 10,243
Karma: 7640012
Join Date: Nov 2009
Device: many
That means that after 6 error messages, the seventh seems to trigger unexpected output from actual epubcheck that is confusing the plugin so much that it is failing in an unexpected way.

The easiest way to track down what output epupcheck is generating that its plugin can not handle is to run epubcheck from the command line with the exact same options theplugin uses and show the output.

That way we can figure out how to adapt the plugin's code to handle that case.

Or if it is easier, it would help if you could post the simplest test case epub that illustrates this problem and I would be happy to take a look. Just in case it is a Sigil problem.
KevinH is offline   Reply With Quote
Old Yesterday, 03:32 PM   #5
philja
Evangelist
philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!
 
Posts: 460
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Quote:
Originally Posted by KevinH View Post
Or if it is easier, it would help if you could post the simplest test case epub that illustrates this problem and I would be happy to take a look. Just in case it is a Sigil problem.
I've had several attempts at making a bare bones epub3 which would reproduce the problem, but with no success. I tried stripping down a copy of the problem epub, but at some point the problem disappeared. So there must be another condition(s) other than the number of bad links that affect the problem.

I have replicated my steps with another copy of the original file (which checked out ok using epubcheck plugin) - swapped the template file without correcting any internal links. The problem is there.

I don't want to post the file in the forum but would be happy to PM you a link to pick it up. What do you think?
philja is offline   Reply With Quote
Advert
Old Yesterday, 03:35 PM   #6
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: 10,243
Karma: 7640012
Join Date: Nov 2009
Device: many
Happy to debug what is going on. You can pm me KevinH here or you could try running the borkify plugin to prevent any copyright loss and post that version.

Either way I am happy to help.
KevinH is offline   Reply With Quote
Old Yesterday, 03:45 PM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,957
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It's possible all of the recent changes to epubcheck have introduced some new errors/warnings that are rare enough that they hasn't tripped up Doitu's plugin until now.
DiapDealer is offline   Reply With Quote
Old Yesterday, 04:38 PM   #8
philja
Evangelist
philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!
 
Posts: 460
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Quote:
Originally Posted by KevinH View Post
Happy to debug what is going on. You can pm me KevinH here or you could try running the borkify plugin to prevent any copyright loss and post that version.

Either way I am happy to help.
PM with link on its way. Thanks.
philja is offline   Reply With Quote
Old Yesterday, 05:52 PM   #9
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: 10,243
Karma: 7640012
Join Date: Nov 2009
Device: many
FWIW,
I am seeing the exact same errors/messages you are. Something is killing the epubcheck plugin subprocess before it gets a chance to actually send it results.

No idea what is going on yet. Debug print statements all print but something is killing the plugin process just instants early.

I will try to run this inside lldb to see if it detects anything funny.

Very very strange!
KevinH is offline   Reply With Quote
Old Yesterday, 06:22 PM   #10
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: 10,243
Karma: 7640012
Join Date: Nov 2009
Device: many
@philja

An & in a file name is freaking out the parsing of the epubcheck results. Please try removing that & in your file name.

I think since these are urls, the proper way to handle that & in a file name being returned from epubcheck is to have it % encoded.

I think it should be %26 to replace the & just like it is shown in the OPF manifest.

But this is a grey area in that it is a url and technically also a file path.

Last edited by KevinH; Yesterday at 06:26 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 06:24 PM   #11
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,957
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
And yet not all epubs are failing in this way, right?
DiapDealer is offline   Reply With Quote
Old Yesterday, 06:53 PM   #12
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: 10,243
Karma: 7640012
Join Date: Nov 2009
Device: many
No, it was just that the error happened in that specific file (it used a fragment that did not exist) plus the fact it has the & in the filename.

The result xml passed back from the wrapper to the launcher did not encode or escape that bookpath. That freaked out the plugin runner's QXmlStreamReader badly.

I have decided to handle that for all validation plugins from Sigil's end to prevent issues.

I have a fix for this already. After I test it a bunch, I will push it to master probably tonight.

Last edited by KevinH; Yesterday at 06:55 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 07:03 PM   #13
BeckyEbook
Wizard
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 1,093
Karma: 4000129
Join Date: Jan 2017
Location: Poland
Device: Various
I have a simple test for this issue:
1. Create an empty EPUB3 file (by default, it will contain <title></title>, which is enough to cause an error in EpubCheck).
2. Rename Section0001.xhtml to Section&0001.xhtml
3. Run the EpubCheck plugin
BeckyEbook is offline   Reply With Quote
Old Yesterday, 07:22 PM   #14
philja
Evangelist
philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!
 
Posts: 460
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Quote:
Originally Posted by KevinH View Post
@philja

An & in a file name is freaking out the parsing of the epubcheck results. Please try removing that & in your file name.

I think since these are urls, the proper way to handle that & in a file name being returned from epubcheck is to have it % encoded.

I think it should be %26 to replace the & just like it is shown in the OPF manifest.

But this is a grey area in that it is a url and technically also a file path.
Thanks Kevin. You're quite right about the '&' in the filename. I removed that and the problem went away.

Substituting %26 in the file name (as you found in the OPF manifest) causes other errors (and the manifest entry adds %25 to the %26).

This is not the first time I've run epubccheck on this epub with that filename. But it could be the first time I swapped out the backmatter chapter in that book since renaming all the files from the generic Section000n.xhtml names they had for many years. And hence, the first time epubcheck encountered the combination of a file name having an '&' together with the file having a fragment error.

Dumping the '&' from the filename is easy and won't cause any consequential problem.

I can't check that this evening, but I'll get back on it in the morning when I get back to my linux box.

Last edited by philja; Yesterday at 07:25 PM. Reason: Decided to dump thje '&' from the filename
philja is offline   Reply With Quote
Old Yesterday, 07:59 PM   #15
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: 10,243
Karma: 7640012
Join Date: Nov 2009
Device: many
I have just pushed a fix for this to Sigil master. Sigil now handles urlencoding validation bookpaths in the plugin launcher and urldecoding them inside the PluginRunner code.

This fix will be in the next release of Sigil.
KevinH 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
Can I display only search results? gvantass Library Management 5 08-08-2026 08:59 PM
Request: Change to Validation Results window title mrprobert Sigil 5 08-18-2024 06:21 AM
What order does FTS display results in? ownedbycats Library Management 1 10-26-2022 12:28 AM
[Likebook Mimas and Muses] Notes app BUG that results in a loss of page data MustardOrMayo Boyue 4 04-04-2019 10:02 AM
Validation Results. So Many Errors!! mont555 Sigil 12 01-18-2013 08:04 PM


All times are GMT -4. The time now is 12:14 AM.


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