Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-13-2026, 10:27 PM   #181
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: 9,346
Karma: 6686152
Join Date: Nov 2009
Device: many
Your debug log shows the location being set properly and used once but then somehow the location (tag name and child number info) is lost. And exactly as you said, there are no javascript console errors.

Very strange. I will have to try and run a Windows build done by CI tomorrow on my old Linux box to see if I can see where the location is being lost.
KevinH is offline   Reply With Quote
Old 02-13-2026, 10:35 PM   #182
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 50,294
Karma: 178402650
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Recompiled and still get the preview moving to the top of the file when I open the stylesheet. However, I did notice that if I click on the CodeView tab for the HTML file and then click in the code, preview moves back to that position.
DNSB is offline   Reply With Quote
Old 02-13-2026, 10:50 PM   #183
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,512
Karma: 62503986
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I did not run the RED test.
But I did run my normal Adjust the CSS sequence with the preview about mid point (where I want the adjustment). The adjustments took, I saw the preview refresh the screen AND STAY where I left it.
Previously, it would revert to the top.
W10 x64

BTW it was EPUB2 if that matters

Last edited by theducks; 02-13-2026 at 10:51 PM. Reason: BTW
theducks is offline   Reply With Quote
Old 02-13-2026, 10:52 PM   #184
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: 9,346
Karma: 6686152
Join Date: Nov 2009
Device: many
Arrgghhh! Thanks for checking. We are back to square one. For some reason the location is getting stepped on.

I will try adding some key debug in places and trying a Windows CI build in a vm on my old Linux box.

Something unexpected is going on. Not sure what.
KevinH is offline   Reply With Quote
Old 02-13-2026, 10:57 PM   #185
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: 9,346
Karma: 6686152
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by theducks View Post
I did not run the RED test.
But I did run my normal Adjust the CSS sequence with the preview about mid point (where I want the adjustment). The adjustments took, I saw the preview refresh the screen AND STAY where I left it.
Previously, it would revert to the top.
W10 x64

BTW it was EPUB2 if that matters
Great thanks for testing and reporting back. You are seeing exactly what I hoped for but DNSB is showing it doesn't work. Epub2 vs Epub3 should not matter here.

So it sounds like a race between 2 events, when one wins, everything works but when the other wins, it fails.

I thought this was going to be an easy fix but it is going to take some digging.
KevinH is offline   Reply With Quote
Old 02-13-2026, 11:41 PM   #186
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,084
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Remember you can manually run just the Windows CI action and it will build an installer you can use. I should also be around this weekend to help do some Windows debugging.
DiapDealer is offline   Reply With Quote
Old Yesterday, 01:03 AM   #187
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 50,294
Karma: 178402650
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Before I installed the new compile of Sigil, I ran the previous one and noticed that I got two error messages at the end.
Code:
Debug: Caching:  "OEBPS/Chapter-07.xhtml"
Debug: Caching:  "OEBPS/Chapter-07.xhtml"
Critical: Request Autofill.enable failed. {"code":-32601,"message":"'Autofill.enable' wasn't found"}
Critical: Request Autofill.setAddresses failed. {"code":-32601,"message":"'Autofill.setAddresses' wasn't found"}
DNSB is offline   Reply With Quote
Old Yesterday, 01:15 AM   #188
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 50,294
Karma: 178402650
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Installed a compile of Sigil from a download from when the debug was first enabled. No issues with moving around in preview when shifting to the stylesheet though preview did refresh each time. I added color: blue to the p tag and it applied immediately.

OTOH, I put the same executable on an old laptop. The location in preview bobbed around.

I suspect a race conditions and those tend to be so much fun...
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2026-02-13 210601.png
Views:	12
Size:	399.5 KB
ID:	220963   Click image for larger version

Name:	Screenshot 2026-02-13 210630.png
Views:	14
Size:	391.1 KB
ID:	220964   Click image for larger version

Name:	Screenshot 2026-02-13 210709.png
Views:	9
Size:	394.3 KB
ID:	220965  
DNSB is offline   Reply With Quote
Old Yesterday, 09:50 AM   #189
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: 9,346
Karma: 6686152
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DiapDealer View Post
Remember you can manually run just the Windows CI action and it will build an installer you can use. I should also be around this weekend to help do some Windows debugging.
Great! As I do think it is a event race for some unknown reason.

Last night, I pushed to Sigil master some selected extra debug info.

And yes I should have done the CI deploy manually on just Windows and forgot I could do that so I did a full deploy.

If you get a chance using the very last deploy build of Sigil on Windows, I would love to see the debug log from running the Alice epub test described earlier, I have the same output from my Mac (and Linux) to compare against.

Thanks!
KevinH is offline   Reply With Quote
Old Yesterday, 11:11 AM   #190
BeckyEbook
Guru
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: 940
Karma: 3501230
Join Date: Jan 2017
Location: Poland
Device: Various
Last deploy.

Sample from @RnbJrg – works [image]

Alice – Unfortunately, after opening the CSS file, the preview jumps to the top of the XHTML file [debug].
Attached Thumbnails
Click image for larger version

Name:	rbnjrg-blue-ok.png
Views:	5
Size:	186.0 KB
ID:	220973  
Attached Files
File Type: txt sigil275-debug.txt (5.2 KB, 1 views)
BeckyEbook is offline   Reply With Quote
Old Yesterday, 11:25 AM   #191
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: 9,346
Karma: 6686152
Join Date: Nov 2009
Device: many
@BeckyEbook
Thank you that really helped. Here is the critical snippet:

Code:
Debug: MW: UpdatePreview()
Debug: MW: UpdatePreview requested from CSS or SVG - saving tab content
Debug: MW: UpdatePreview to non-html resource, using Previous
Debug: ViewPreview GetCaretLocation:  ""
Debug: MW: UpdatePreview using current PreviewWindow location
Debug: Caching:  "OEBPS/Chapter-07.xhtml"
Debug: MW: Invoking UpdatePage with:  "OEBPS/Chapter-07.xhtml"
Debug: clearing Preview's httpcache
Debug: ViewPreview Cache Cleared
Debug: Javascript error:  QWebEnginePage::ErrorMessageLevel "Uncaught TypeError: Cannot read properties of null (reading 'scrollWidth') on line:7 Source:sigil:///C:/Users/Becky/AppData/Local/sigil-ebook/sigil/workspace/Sigil-RPNDuX/OEBPS/Chapter-07.xhtml"
Debug: MW: UpdatePreview()
Debug: MW: UpdatePreview to non-html resource, using Previous
Debug: MW: UpdatePreview()
Debug: MW: UpdatePreview to non-html resource, using Previous
Debug: ViewPreview GetCaretLocation:  ""
Debug: MW: UpdatePreview using current PreviewWindow location
There are two things of note. You are still getting that weird javascript error but at least it is not causing problems this time:

Debug: Javascript error: QWebEnginePage::ErrorMessageLevel "Uncaught TypeError: Cannot read properties of null (reading 'scrollWidth') on line:7 Source:sigil:///C:/Users/Becky/AppData/Local/sigil-ebook/sigil/workspace/Sigil-RPNDuX/OEBPS/Chapter-07.xhtml"

But even earlier that that a javascript call to get the current location of the cursor in Preview failed:

Debug: ViewPreview GetCaretLocation: ""

This javascript routine should never return an empty string. It should at least have the html and body tags in the path if the file is correctly loaded.

So either that file is not loading from the cache properly, or the timing of when we run the javascript to get the current location is broken somehow.


I was finally able to get my Windows 11 VM to fire up and was able to take the latest Windows build and run the same tests and in every case, eventually the GetCaretLocation javascript is failing.

This results in Preview losing its stored last location and from there on out it will default to the top of the file.

I will try to now track down what is happening that causes the javascript routine to fail.

All of that said, in no place am I seeing any javascript log error messages.

Last edited by KevinH; Yesterday at 12:32 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 12:10 PM   #192
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,084
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Running on Windows 10 (Sigil built on Windows 11). I'm not sure where everyone got their Alice in Wonderland so I hope I'm not comparing apples to oranges....

With the latest master, Sigil is behaving the way I would expect with the test. Chapter 7 in Preview stays synced after opening the css file, and after editing the css file (Preview flashes and then resyncs).

No javascript errors in the debug output.

I've not yet tested the svg issue or the injected custom files from the user preference folder.
Attached Files
File Type: txt sigil_debuglog.txt (4.1 KB, 1 views)
DiapDealer is offline   Reply With Quote
Old Yesterday, 12:22 PM   #193
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: 9,346
Karma: 6686152
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DiapDealer View Post
Running on Windows 10 (Sigil built on Windows 11). I'm not sure where everyone got their Alice in Wonderland so I hope I'm not comparing apples to oranges....

With the latest master, Sigil is behaving the way I would expect with the test. Chapter 7 in Preview stays synced after opening the css file, and after editing the css file (Preview flashes and then resyncs).

No javascript errors in the debug output.

I've not yet tested the svg issue or the injected custom files from the user preference folder.
Yes, your debug log shows that the dreaded "ViewPreview GetCaretLocation" in your log always returns a proper location value ("html 1,body 57,p -1") inside Preview and not a "".

Is your test machine fast/hefty? My VM Windows 11 is horrendously slow and it always triggers the bug.

I have just pushed a potential fix to master. I will try to manully force the ci build.

If you have a slower Windows box around, would you please test it.

Last edited by KevinH; Yesterday at 12:32 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 12:29 PM   #194
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,084
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Both of my current test machines are VMs. The Windows 10 is Virtualbox, and the Windows 11 is a qemu kvm. The qemu kvm is actually quite snappy, but I wouldn't expect the Virtualbox machine to be very fast. I'll make sure to grab my tired old Windows 10 laptop to test on as well.

EDIT: both VMs are very likely using software rendering for WebEngine. My laptop is configured that way too. Perhaps that's the missing variable here?

On your Windows VM, set the QSG_RHI_BACKEND environment variable to "opengl"

QSG_RHI_BACKEND=opengl

in your en-vars.txt file should suffice.

Everything works right for me when I have that set. It skips a lot of Vulkan and hardware nonsense and uses opengl (which strangely enough is often faster on Windows), so I set it a lot.

If I unset that variable, syncing stops and I get the javascript errors. When I reset it, all is well.

This is somehow down to webengine's software/hardware rendering engine choices. Ticking our preference box in Sigil to disable GPU hardware acceleration doesn't seem to be enough to get it working in this case.

Last edited by DiapDealer; Yesterday at 12:47 PM.
DiapDealer is offline   Reply With Quote
Old Yesterday, 12:46 PM   #195
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: 9,346
Karma: 6686152
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DiapDealer View Post
Both of my current test machines are VMs. The Windows 10 is Virtualbox, and the Windows 11 is a qemu kvm. The qemu kvm is actually quite snappy, but I wouldn't expect the Virtualbox machine to be very fast. I'll make sure to grab my tired old Windows 10 laptop to test on as well.

EDIT: both VMs are very likely using software rendering for WebEngine. My laptop is configured that way too. Perhaps that's the missing variable here?
Yes anything that impacts the order of events or time for any event could be a culprit.

My Linux box is a 12 year old iMac!

Last edited by KevinH; Yesterday at 12:48 PM.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestions for Sigil Improvements or New Features KevinH Sigil 168 11-18-2025 01:23 PM
Suggestions for New Plugins and Plugin Improvements KevinH Plugins 0 09-22-2025 11:53 AM
Ideas for New Improvements or Features KevinH Sigil 97 04-09-2025 10:45 AM
Improvements/bugs/features dontcrash KOReader 10 10-23-2019 11:05 AM
Onyx M92: Suggestions for possible improvements Lode Onyx Boox 3 02-11-2013 08:40 AM


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


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