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 04-26-2025, 07:30 PM   #31
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,681
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DiapDealer View Post
I see a lot of scattering of webengine cache files on both Linux and Windows. I've always meant to try Kovid's approach at unifying on Windows (requires patching qtbase), but I've never gotten around to it.

...
I get a calibre-ebook.com folder in C:|Users\<??????>\AppData\Roaming despite the fact that I relocate calibre's preferences and cache via its EnvVar directives, if I delete the folder it gets recreated when I use the calibre Viewer or Editor… even if I use calibre's supposedly self-contained portable edition.

Sigil's the same, even though I relocate it's Preferences from C:\Users\<??????>\AppData\Local via its EnvVar directive, I still get a sigil-ebook folder in C:\Users\<??????>\AppData\Roaming.

FTR: I have no problems running multiple instances of Sigil 2.4.2… including via calibre's built-in Open with.

BR
BetterRed is offline   Reply With Quote
Old 04-26-2025, 07:33 PM   #32
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: 28,519
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
@KevinH: I may have led you astray a bit. I did a full rebuild (without the latest off-the-record change) and I'm no longer getting the "deadline expired" message. It's still not deleting the empty 'Preview- +uuid' folders from C:/Users/<USER>/AppData/Roaming/sigil-ebook/sigil/QtWebEngine after Sigil closes, but the infinite loop does NOT seem to be happening with your previous change.

Sorry for any potential confusion. Should I still try the new off-the-record approach or do you want to revert and do more testing?

I think the new QWebEngineProfileBuilder class in 6.9 is intended to fix this exact sort of issue:

https://codereview.qt-project.org/c/...ngine/+/597808

Last edited by DiapDealer; 04-26-2025 at 07:38 PM.
DiapDealer is online now   Reply With Quote
Advert
Old 04-26-2025, 07:37 PM   #33
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: 28,519
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BetterRed View Post
FTR: I have no problems running multiple instances of Sigil 2.4.2… including via calibre's built-in Open with.
The problem doesn't manifest until after the official 2.4.2 release. If we can figure it out, it won't manifest in ANY official release.
DiapDealer is online now   Reply With Quote
Old 04-26-2025, 07:41 PM   #34
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: 8,651
Karma: 5703586
Join Date: Nov 2009
Device: many
Please try the off the record approach. If that works we at least have a safety net.

We can then revert and try to track down exactly where the damn cache files are going on Windows so that they are properly cleared.

According to latest qtbase code it should go here:

extracted from qtbase source in github from src/corelib/io/qstandardpaths_win.cpp

Code:
QString QStandardPaths::writableLocation(StandardLocation type)
{
    QString result;
    switch (type) {
    case CacheLocation:
        // Although Microsoft has a Cache key it is a pointer to IE's cache, not a cache
        // location for everyone.  Most applications seem to be using a
        // cache directory located in their AppData directory
        result = sHGetKnownFolderPath(writableSpecialFolderId(AppLocalDataLocation));
        if (!result.isEmpty()) {
            appendTestMode(result);
            appendOrganizationAndApp(result);
            result += "/cache"_L1;
        }
        break;
But it somehow ends up in roaming and seemingly without the final "cache" folder?

Does this folder even exist?

C:\Users\<??????>\AppData\Roaming\sigil-ebook\sigil\cache\

Last edited by KevinH; 04-26-2025 at 07:45 PM.
KevinH is offline   Reply With Quote
Old 04-26-2025, 08:23 PM   #35
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: 28,519
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Does this folder even exist?

C:\Users\<??????>\AppData\Roaming\sigil-ebook\sigil\cache\
No. The cache folder does not currently exist in either of the locations that this cache stuff is getting written to.

In roaming, things are being written to C:\Users\<??????>\AppData\Roaming\sigil-ebook\sigil\QtWebEngine\

For the record: the 'cache' folder has been present in Sigil's regular prefs directory (C:\Users\<??????>\AppData\Local\sigil-ebook\sigil\) when we've been testing different strategies. But before your latest commit. It did not exist.

I'll try the latest commit (off-the record cache) and get back to you.
DiapDealer is online now   Reply With Quote
Advert
Old 04-26-2025, 08:52 PM   #36
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: 28,519
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
OK. That last commit seems to be working. Multiple instances can be launched with no 'deadline expired' messages logged. The only thing (re)created in C:/Users/<USER>/AppData/Roaming is an empty 'sigil-ebook/sigil' folder

Preview-Cache is still being created in Sigil's prefs location (C:/Users/<USER>/AppData/Local/sigil-ebook/sigil), but I see from master that it's still being created if it doesn't exist. Nothing is being written to it. No 'cache' folder and no 'QtWebEngine' folder has been (re)created.
DiapDealer is online now   Reply With Quote
Old 04-26-2025, 09:05 PM   #37
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: 8,651
Karma: 5703586
Join Date: Nov 2009
Device: many
Okay. So with some cleanups, we have a fallback safety net with off-the-record.

I have now hopefully pushed to master a fixed version of the previous attempt (named storage with unique names) and then we can decide which one to use later.

If you have time, please give it a try and let me know if this one works.

Otherwise I will study the code and try to figure out something else tomorrow.

Thanks!

Last edited by KevinH; 04-26-2025 at 09:18 PM.
KevinH is offline   Reply With Quote
Old 04-26-2025, 09:44 PM   #38
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: 28,519
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I think we might be closer. There are no infinite loops and multiple instances work.

The named storage is created in Sigils prefs directory (under the 'cache' folder) and they are cleaned up properly after Sigil exits.

The only problem is that the named storage is being duplicated in a C:\Users\<??????>\AppData\Roaming\sigil-ebook\sigil\QtWebEngine (not the proper Sigil prefs location) and they are NOT being cleaned up after Sigil exits. They are being orphaned. There's never any content in the orphaned folders. Even when Sigil is still open. It's like they're being created there before the code that properly creates the caches in Sigil's prefs directory takes effect or something. Very weird.

I think it might be the very act of trying to change these default locations that's introducing these anomalies on Windows.

We'll have to revisit tomorrow sometime.

EDIT: Sorry, I forgot to attach the debug output. It's reporting the correct paths (not the stuff in Roaming) by the way.
Attached Files
File Type: txt sigil_debuglog.txt (4.1 KB, 30 views)

Last edited by DiapDealer; 04-26-2025 at 10:05 PM.
DiapDealer is online now   Reply With Quote
Old 04-26-2025, 10:27 PM   #39
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: 8,651
Karma: 5703586
Join Date: Nov 2009
Device: many
Wow, I stopped trying to set it and instead just let it create itself. Then I ask the profile what cachePath it will be using and it reports the local app data instead of the roaming one, and it adds the "cache" as well. This only happens with Windows. It reports correctly on Linux and MacOS.

But we know this is not correct at all. So QtWebEngine for windows is saying its cache is one place but it is actually in another!

I will have to either hard code in the roaming bit or try to find where that path is being created somehow. This is a mess.

Tomorrow, I will try to track down where this is being set in the Windows code in QtWebEngine.

Last edited by KevinH; 04-26-2025 at 10:50 PM.
KevinH is offline   Reply With Quote
Old 04-26-2025, 10:41 PM   #40
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: 28,519
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Wow, I stopped trying to set it and instead just let it create itself. Then I ask the profile what cachePath it will be using and it reports the local app data instead of the roaming one, and it adds the "cache" as well. This only happens with Windows. It reports correctly on Linux and MacOS.

But we know this is not correct at all. So QtWebEngine for windows is saying its cache is one place but it is actually in another!

I will have to either hard code in the roaming bit or try to find where that path is being created simehow. This is a mess.

Tomorrow, I will try to track down where this is being set in the Windows code in QtWebEngine.
For the record, the location being reported in the debug log is the actual location (in Sigil's prefs location) where the caches are actually being created (under the cache prefix), used, and then cleaned up properly. The problem is that the directories are also being created (but unused), and orphaned in the Roaming location. The local app data location is the correct location.
DiapDealer is online now   Reply With Quote
Old 04-26-2025, 11:37 PM   #41
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: 45,620
Karma: 168959522
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
For what it may be worth, I am still seeing the Debug: View Preview Cache Clear failed - deadline expired on the code I downloaded from GitHub this evening.
Attached Files
File Type: txt sigil_debug.txt (2.1 KB, 31 views)
DNSB is offline   Reply With Quote
Old 04-27-2025, 12:05 AM   #42
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: 28,519
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Are you doing a full rebuild, or are you using an existing build directory and doing a partial build with just the changed files? I was still seeing the deadline expired messages until I deleted everything in my build directory, did a new cmake configure and a full rebuild.
DiapDealer is online now   Reply With Quote
Old 04-27-2025, 01:56 AM   #43
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: 45,620
Karma: 168959522
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I delete the contents of my sigil-src directory and then unzip the sigil-master directory in the downloaded .zip file into that directory. Run cmake/nmake/nmake makeinstaller and install the output file.

I also deleted the contents of the Program Files\Sigil directory and re-installed and still no joy.
DNSB is offline   Reply With Quote
Old 04-27-2025, 08:00 AM   #44
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: 28,519
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Well shoot. That indicates there might be a race condition that one of us is losing/winning.
DiapDealer is online now   Reply With Quote
Old 04-27-2025, 08:51 AM   #45
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: 8,651
Karma: 5703586
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DiapDealer View Post
For the record, the location being reported in the debug log is the actual location (in Sigil's prefs location) where the caches are actually being created (under the cache prefix), used, and then cleaned up properly. The problem is that the directories are also being created (but unused), and orphaned in the Roaming location. The local app data location is the correct location.
Oh, then I misunderstood you. So I just need to clean up the Roaming location as an extra location. I can add that. I thought the actual internal cache files were being stored there.
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
Multiple content-server instances possible ? Tuxracer Server 15 05-28-2022 02:09 PM
Running 2 instances in order to merge/combine two very different libraries? manawydan Library Management 1 12-28-2020 06:41 PM
Way to open multiple instances of calibre? charlweed Server 1 12-28-2018 09:24 PM
Two instances of calibre running BetterRed Calibre 2 06-19-2017 04:18 AM
Two or multiple instances of Calibre on one computer clockmaker Library Management 2 06-30-2012 01:55 PM


All times are GMT -4. The time now is 05:57 AM.


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