Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 07:17 PM   #151
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,316
Karma: 6686152
Join Date: Nov 2009
Device: many
And interesting enough, line 7 in that Chapter 7 xhtml file is:

<link href="css/style.css" type="text/css" rel="stylesheet"/>

So the bug happens when trying to load the css file that is open but not the first time. The first time it worked. But when using the cache it ties to get the contents of the css/styl.css that is being actively edited and fails!

So my guess is this is due to some Windows specific file locking.

Hmm ...
KevinH is offline   Reply With Quote
Old Yesterday, 07:27 PM   #152
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,316
Karma: 6686152
Join Date: Nov 2009
Device: many
@BeckyEbook,

I wonder if this has anything to do with the actual file cache used by WebEngine. Would you please try the following using the debug build.

1. open an epub in Sigil (any epub)
2. Without closing the first Sigil, open a second instance of Sigil and load the Alice epub and run the test but only in the second instance.

Thanks!

Last edited by KevinH; Yesterday at 11:03 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 07:43 PM   #153
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,316
Karma: 6686152
Join Date: Nov 2009
Device: many
And one more thing to try if you have time ...

In Sigil/src/MainUI/MainWindow.cpp there is a a routine called UpdatePreview.

In this routine I would like you to comment out the line that clears the cache, then try and see if that prevents the error.

From:

Code:
void MainWindow::UpdatePreview()
{

    if (m_IsClosing) return;

    m_PreviewTimer.stop();

    DBG qDebug() << "MW: UpdatePreview()";

    QString text;
    QList<ElementIndex> location;
    HTMLResource *html_resource;

    ContentTab *tab = GetCurrentContentTab();
    if (tab != NULL) {

        // Save Tab if update requested from a TextTab tab like CSS or SVG tabs
        if (m_SaveTab) {
            m_SaveTab = false;
            tab->SaveTabContent();
            m_PreviewWindow->ForceFullWebCacheClear();
        }

        html_resource = qobject_cast<HTMLResource *>(tab->GetLoadedResource());
to

Code:
void MainWindow::UpdatePreview()
{

    if (m_IsClosing) return;

    m_PreviewTimer.stop();

    DBG qDebug() << "MW: UpdatePreview()";

    QString text;
    QList<ElementIndex> location;
    HTMLResource *html_resource;

    ContentTab *tab = GetCurrentContentTab();
    if (tab != NULL) {

        // Save Tab if update requested from a TextTab tab like CSS or SVG tabs
        if (m_SaveTab) {
            m_SaveTab = false;
            tab->SaveTabContent();
            // m_PreviewWindow->ForceFullWebCacheClear();
        }

        html_resource = qobject_cast<HTMLResource *>(tab->GetLoadedResource());
I am hoping that the problem is related to file locking in the local QtWebEngine file cache.

I have my fiingers crossed, one of these last two will impact the error.
KevinH is offline   Reply With Quote
Old Yesterday, 08:34 PM   #154
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,076
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I am mobile-devices-only until tomorrow sometime, or I would test.
DiapDealer is online now   Reply With Quote
Old Yesterday, 09:08 PM   #155
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,237
Karma: 178398938
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
This may not be any help but I tried your suggestion for triggering the issue with my local build using Python 3.14.3/Qt 6.10.2 and the debug log does not show any errors. Up to this point, I hadn't realized that I had updated to 3.14.3 instead of 3.14.2.
Attached Files
File Type: txt sigil_debug.txt (3.6 KB, 4 views)
DNSB is offline   Reply With Quote
Old Yesterday, 09:37 PM   #156
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,316
Karma: 6686152
Join Date: Nov 2009
Device: many
That is strange. The code paths in question do not use python3lib code as far as I can tell, so I have no explanation why one Windows person sees a javascript error that causes the Preview to not properly reload and move to its last location, while another does not see the issue or error at all.

The mystery deepens.

Last edited by KevinH; Today at 12:13 AM.
KevinH is offline   Reply With Quote
Old Today, 04:59 AM   #157
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: 934
Karma: 3501230
Join Date: Jan 2017
Location: Poland
Device: Various
It was already nighttime where I am, so I only checked it now.

1. The test with two instances still caused an error. (I removed debug for childs form PreviewWindow.cpp, so the log is cleaner).

2. The change in MainWindow.cpp made it work! Note that I am editing the CSS file, but in the preview window I am still in the previous location, which is how it should be.

Click image for larger version

Name:	works.png
Views:	4
Size:	479.0 KB
ID:	220927
Attached Files
File Type: zip morning-debug.zip (2.4 KB, 1 views)
File Type: zip debug-after-change-mainwindow.zip (2.2 KB, 1 views)
BeckyEbook is offline   Reply With Quote
Old Today, 09:23 AM   #158
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,076
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm not where I can build from your fork, but I can also confirm that with the current Sigil, the behavior doesn't change with the second instance of Sigil.
DiapDealer is online now   Reply With Quote
Old Today, 09:55 AM   #159
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,316
Karma: 6686152
Join Date: Nov 2009
Device: many
@BeckyEBook
Thank you.
So it is related to the asynchronous clearing of the cache on Windows somehow.
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 10:20 AM.


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