New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Freezes and "Not responding" when reloading script engine on Windows #3024
Comments
This happens when simply opening "Settings" too. It takes about 5 seconds. The only log output is the following:
procmon spams the same lines as the first screenshot shows. If theres anything else I can do to provide debug info; tell me and I'll try to provide it. 😊 |
You didn't share your settings, hard to get a closer look... So you ran QOwnNotes from a folder |
As described in the original issue: This is a clean ZIP from GitHub releases, only change I made was to add that local script and set theme to Dracula. That's it. Notes are just the standard ones supplied by QOwnNotes when creating a new note folder. Heres the output of debug. Click to expandQOwnNotes Debug InformationGeneral InfoCurrent Date: Server InfoserverUrl: empty SpellcheckingEnabled: Note folderscurrentNoteFolderId: Note folder
|
I created a clean Hyper-V VM from Microsoft official ISO Then:
I don't see the same pattern in Process Monitor, but I see something that looks like telemetry that seemingly takes 2-3 seconds? Output of debug: Click to viewQOwnNotes Debug InformationGeneral InfoCurrent Date: Server InfoserverUrl: empty SpellcheckingEnabled: Note folderscurrentNoteFolderId: Note folder
|
I tried it out on my Windows 11 installation.
I got 0 lag, I could interact with the application all the time. 🤷🏻 Did turning off metric change anything? The network requests are supposed to run in the background anyway... |
Strange. 🤔 Maybe it has to do with scaling and resolution? I have three monitors:
But that wouldn't neccessarily explain why it also happened inside the VM, hmm.. Turning of metrics made it worse, but I don't know if it was due to turning metrics off or closing QOwnNotes after its' first ever run then reopening it. The spamming in procmon for creating file I have a Pop!_OS VM too. With the Flatpak version, enabling (ticking the checkbox) for "Black mode" from Settings -> Scripting easily takes 5-10 seconds. So does reloading script engine. Same with the Snap version. Disabling heartbeat and tracking does not seem to make a difference. |
I had a 4K screen and an HD screen attached too... No idea. I've never seen such an issue... |
Seems it could have something to do with Qt and scaling?
|
Good question, but in QOwnNotes QML is not used for UI, just for script support... And I also tested on a High DPI screen... 🤔 |
Seems it has something to do with scaling after all. I tried disabling "QT_AUTO_SCREEN_SCALE_FACTOR" with PowerShell: [System.Environment]::SetEnvironmentVariable(
'QT_AUTO_SCREEN_SCALE_FACTOR',
0,
'User'
) Started QOwnNotes, tried reloading script enginge. It freezes for much shorter (still freezes though), and I can no longer see that spamming in procmon about |
I wonder where |
I think Tried setting |
For me, under NixOS, it's 0.
Dunno, it was true for you. ️🤷🏻
And you sure that causes a 20sec lag? (see #3027). |
It was not set in the registry, so I don't know were it came from.
Yep. 15-20 seconds. Note theres a difference between:
Guess I'll do some more testing on that vanilla Windows installation.
|
Findings:
A debug build will probably be the next step in troubleshooting here, yep. |
Expected behaviour
Reloading script engine with one simple script that only set some colors should be almost instant.
Script in question, but I don't think the script in itself matters:
Click to view
Actual behaviour
QOwnNotes freezes for many seconds and becomes "Not responding".
Steps to reproduce
qownnotes --portable
Output from the debug section in the settings dialog
Almost no changes from a newly downloaded QOwnNotes, running with
--portable
.Relevant log output in the Log panel
I enabled all log categories. Here are the output of doing it from Scripting -> Reload script engine.
Expand
Microsoft Process Monitor
As QOwnNotes didn't produce much info on what's happening here I looked for other ways to get info. I fired up Microsoft Process Monitor / procmon ( https://learn.microsoft.com/en-us/sysinternals/downloads/procmon ). When reloading script engine procmon fills up with this (tens of thousands of lines):
And some registry access in between once in a while:
The text was updated successfully, but these errors were encountered: