Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-27-2025, 08:57 AM   #46
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,434
Karma: 5702578
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DNSB View Post
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.
Wow, that is not good news. The debug log clearly shows that unique names are being created that should prevent any locking issues. It could be some sort of race as DiapDealer said.

We should probably go back to the off-the-record approach to verify it does work for all as creating named storage but deleting it completely upon exit is effectively just doing off-the-record anyway.

I will revert back to a cleaned up off-the-record approach and push it to master. Hopefully that will work for everyone.

Last edited by KevinH; 04-27-2025 at 09:33 AM.
KevinH is offline   Reply With Quote
Old 04-27-2025, 10:51 AM   #47
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,434
Karma: 5702578
Join Date: Nov 2009
Device: many
Okay, I reverted to full off-the-record profile just to make sure it really does work for everyone (ie. no deadline expired messages).

I have pushed this to master.

@DNSB and DiapDealer, when you get a free moment would you try launching multiple instances of Sigil (after starting with a fresh debug log file!).

I am hoping this will work for both of you.

Thanks.
KevinH is offline   Reply With Quote
Advert
Old 04-27-2025, 06:07 PM   #48
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,335
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
The off-the-record approach still works for me without error in Windows 10. No 'deadline expired' messages logged and multiple instances still work. The cache path is empty in the log file, and no cache folders are being created in either the Local or Roaming locations. But I assume that's expected with OffTheRecord cacheing? As I understand it, OffTheRecord is memory based.

I've attached the log file.

RE the named profile strategy:

I found this bug report: https://github.com/martinrotter/rssguard/issues/1496

Which leads to the following Qt bug report: https://bugreports.qt.io/browse/QTBUG-129620

The gist is that the very act of creating a named profile on Windows creates an empty directory in APPDATA/Roaming before the correct data path is even able to be set.

It shouldn't be too hard to clean those paths up, but we need to make sure that there are no problems with running multiple instances on any Windows machines if we ever go back to using that approach.
Attached Files
File Type: txt sigil_debuglog.txt (3.5 KB, 6 views)
DiapDealer is online now   Reply With Quote
Old 04-27-2025, 06:19 PM   #49
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,434
Karma: 5702578
Join Date: Nov 2009
Device: many
Great! Thanks for testing that. Now if DNSB can confirm no expired messages then we are good to go in master.

As soon as we move to Qt 6.9.x then we can revisit things.
KevinH is offline   Reply With Quote
Old 04-27-2025, 06:40 PM   #50
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,335
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I also tested on a physical Windows 11 machine for good measure and got the exact same results.
DiapDealer is online now   Reply With Quote
Advert
Old 04-27-2025, 07:12 PM   #51
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,434
Karma: 5702578
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DiapDealer View Post
I also tested on a physical Windows 11 machine for good measure and got the exact same results.
That is good. I have been reading up on how Windows handles disk based web caches. It seems Windows has a special security feature that marks everything in the web cache folder and the folder itself (that can be accessed across multiple threads) as not being executable ever. That makes good sense for a web cache. But a folder needs executable permission to write or change any files in it.

So each instance keeps a list of its own cache folders and gives its webengine process permission to write it it. So clearing a cache folder from one external process that does not have the needed permission will fail. This is something specific to Windows.

I think clearing the cache silently was ignored for any process without permission in older Qt/Sigil but since Qt 6.7 we need to wait for the cleared done signal which revealed the problem.

MacOS shares a single cache across multiple mainwindows all part of the same process, so no problems.

I have no idea how it works with Linux and multiple instances of Sigil. Perhaps all QtWebEngine processes share the same group and can access any cache?

I also have no idea how a new process takes ownership of an existing web cache. The new QWebEngineProfileBuilder forces unique names so how on earth can they take ownership of a web cache that already exists (the whole point of disk caches) even when there is only one instance of the app running.

We ended up wiping all disk caches out to prevent folder proliferation.

I do not think the Qt WebEngine devs have fully thought this through.

Last edited by KevinH; 04-27-2025 at 07:25 PM.
KevinH is offline   Reply With Quote
Old 04-28-2025, 01:09 AM   #52
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: 44,446
Karma: 167726581
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by DiapDealer View Post
Well shoot. That indicates there might be a race condition that one of us is losing/winning.
That's possible. My computer is a couple of years old but still decently fast.

I'm building Kevin's latest update and will report back the status of the issue when it's done.

Finished build and Edmonton/LA overtime around the same time.

Loaded 4 epubs and no errors showing in the debug log. Repeated 4 epubs using Open With plugin in calibre and no errors.
Attached Files
File Type: txt sigil_debug.txt (1.2 KB, 7 views)

Last edited by DNSB; 04-28-2025 at 01:30 AM.
DNSB is offline   Reply With Quote
Old 04-28-2025, 07:19 AM   #53
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,434
Karma: 5702578
Join Date: Nov 2009
Device: many
Wonderful! Thank you! So we have a working fix and it is in master now.

We can revisit this for a future Qt release of Qt with the new QWebEngineProfileBuilder class in 6.9.x with x>1 as Qt 6.9.0 has broken things for many graphics cards.

Last edited by KevinH; 04-28-2025 at 07:22 AM.
KevinH is offline   Reply With Quote
Old 04-28-2025, 08:37 AM   #54
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,335
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DNSB View Post
That's possible. My computer is a couple of years old but still decently fast.

I'm building Kevin's latest update and will report back the status of the issue when it's done.

Finished build and Edmonton/LA overtime around the same time.

Loaded 4 epubs and no errors showing in the debug log. Repeated 4 epubs using Open With plugin in calibre and no errors.
I'm curious about the previous errors you were still getting (when I wasn't) with the disk cache approach. Were you installing Sigil for everyone (with elevated privileges), or just for your user? That might explain why we were seeing different results.

No big deal any more, obviously--and I can test my theory when I get near my development box again--I was just looking for something that might explain it in the meantime.

Our current solution works with either type of install, so it's not really that important.
DiapDealer is online now   Reply With Quote
Old 04-28-2025, 09:00 AM   #55
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,335
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
That is good. I have been reading up on how Windows handles disk based web caches. It seems Windows has a special security feature that marks everything in the web cache folder and the folder itself (that can be accessed across multiple threads) as not being executable ever. That makes good sense for a web cache. But a folder needs executable permission to write or change any files in it.

So each instance keeps a list of its own cache folders and gives its webengine process permission to write it it. So clearing a cache folder from one external process that does not have the needed permission will fail. This is something specific to Windows.

I think clearing the cache silently was ignored for any process without permission in older Qt/Sigil but since Qt 6.7 we need to wait for the cleared done signal which revealed the problem.

MacOS shares a single cache across multiple mainwindows all part of the same process, so no problems.
My Windows user has full permissions to the location where we were writing our cache files in Sigil's prefs directory: C:/Users/<USER>/AppData/Local/sigil-ebook/sigil/

I'll have to fire up an older build and see if that holds true for the cache directories that the qtwebengine process was creating there previously.

Quote:
Originally Posted by KevinH View Post
I have no idea how it works with Linux and multiple instances of Sigil. Perhaps all QtWebEngine processes share the same group and can access any cache?

I also have no idea how a new process takes ownership of an existing web cache. The new QWebEngineProfileBuilder forces unique names so how on earth can they take ownership of a web cache that already exists (the whole point of disk caches) even when there is only one instance of the app running.

We ended up wiping all disk caches out to prevent folder proliferation.
Not sure. I'd have to be home to check, but maybe suid or sgid or sticky-bit applies to the cache files created by qtwebengineprocess?
DiapDealer is online now   Reply With Quote
Old 04-28-2025, 07:16 PM   #56
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: 44,446
Karma: 167726581
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by DiapDealer View Post
I'm curious about the previous errors you were still getting (when I wasn't) with the disk cache approach. Were you installing Sigil for everyone (with elevated privileges), or just for your user? That might explain why we were seeing different results.
The Sigil installer I build pops up the UAC box with a "Do you want to allow this app from an unknown publisher to make changes to your device?" message. Otherwise, no admin rights seem to be involved.

Otherwise, I checked and my user has full rights on the sigil-ebook directories in both Local and Roaming.
DNSB is offline   Reply With Quote
Old Today, 03:27 PM   #57
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,434
Karma: 5702578
Join Date: Nov 2009
Device: many
FWIW, I found where in the qtwebengine code all the missing dictionaries warnings are being generated.

Even if you use setSpellCheckEnabled(false) they still search for the damn dictionaries and produce meaningless warnings which they explicitly turn on. This is silly. You obviously do not need the dictionaries if you are *disabling* spell checking.

Unfortunately fixing it requires patching qtwebengine. Even if we do not use it for the upcoming release of Sigil we can add it into our build process for the next Qt release.
KevinH is offline   Reply With Quote
Old Today, 08:20 PM   #58
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,335
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I was under the impression that spellchecking was disabled by default unless explicitly set to true in the QWebEngineProfile. So they pop warnings regardless of whether we do nothing, or if we explicitly try to disable it? That's pretty silly.
DiapDealer is online now   Reply With Quote
Old Today, 08:37 PM   #59
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: 44,446
Karma: 167726581
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I can see some dev going "Just in case someone wants to turn spellchecking on, we want to make sure the dictionaries are available". For now, the directory copied from the Page-Edit install directory to the Sigil install directory keeps me from seeing those error messages.
DNSB is offline   Reply With Quote
Reply


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 11:31 PM.


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