Not sure if Everythings fault or PowerToys fault. Everytime I preview a text file a new PowerToys.MonacoPreviewHandler is started + several msedgewebview2.exe processes.
I'm under the impression that "preview_single_handler_instance" is supposed to prevent this behavior. I have it to set to true but it doesn't seem to have an effect.
Unsure if there's anything you can do or if it's PowerToys's fault. I'm kinda leaning towards PowerToys as the occasional JIT exceptions don't inspire confidence. Figured I'll report here though.
I also have the Delphi Preview Handler installed, but PowerToys has overridden most of it. Wish I could instead override PowerToys when Delphi supports the file as it's a little nicer & more reliable, but I haven't found a way & PowerToys supports more types.
[BUG]: preview_single_handler_instance not working as expected
-
- Posts: 42
- Joined: Thu Sep 27, 2018 4:46 pm
Re: [BUG]: preview_single_handler_instance not working as expected
Moved to the Everything 1.5 Alpha forum.
Please post 1.5 Alpha related questions and reports there.
I think you mixed up "preview_single_handler_instance" and "preview_handlers" ?
To override the system (=Windows) preview setting for use in Everything:
P.S IIRC: Delphi puts it's preview handler associations under HKLM, PowerToys under HKCU.
Uninstalling PowerToys leaves you with halfway corrupted registry entries: file extensions that were associated with it do no longer give a preview (at least that was the state of things 2 years ago).
There are ways to remove the PowerToys preview handlers (by editing the registry), which will re-activate the Delphi preview handler for selected file extensions, but I suspect that with the next update the PowerToys ones will be re-installed.
Please post 1.5 Alpha related questions and reports there.
I think you mixed up "preview_single_handler_instance" and "preview_handlers" ?
To override the system (=Windows) preview setting for use in Everything:
- Start the Registry Editor (regedit.exe)
- Go to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers
Will look something like the following: - MAke a note of the GUID of the Delphi Preview Handler
- In Everything, go to Menu => Tools => Options => Advanced
- In the Show settings containing field, search for handler
- Select preview_handlers
- If you want to preview txt,log,html and htm files using the Delphi preview handler, set it's value to:
Where {123....ABC} is the GUID of the Delphi Preview Handler.
Code: Select all
preview_handlers=[{"filter":"*.txt;*.log;*.html;*.htm", "handler":"{12345678-abcd-efg-123456789ABC}"}}]
P.S IIRC: Delphi puts it's preview handler associations under HKLM, PowerToys under HKCU.
Uninstalling PowerToys leaves you with halfway corrupted registry entries: file extensions that were associated with it do no longer give a preview (at least that was the state of things 2 years ago).
There are ways to remove the PowerToys preview handlers (by editing the registry), which will re-activate the Delphi preview handler for selected file extensions, but I suspect that with the next update the PowerToys ones will be re-installed.
Re: [BUG]: preview_single_handler_instance not working as expected
I have the Delphi preview handler installed and configured for many extensions with the registry.
Also, I have PowerToys installed but with disabled Monaco preview handler.
The Delphi previewer works fine in Everything.
______________________________________________________
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
Also, I have PowerToys installed but with disabled Monaco preview handler.
The Delphi previewer works fine in Everything.
______________________________________________________
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
-
- Posts: 42
- Joined: Thu Sep 27, 2018 4:46 pm
Re: [BUG]: preview_single_handler_instance not working as expected
Not sure what you mean by mixing it up. I'm referring to this boolean setting:
viewtopic.php?t=12792#p54426
viewtopic.php?p=54421#preview_single_handler_instance I originally set [c]/preview_single_handler_instance=1[/c] because of the Delphi issue in that linked thread some time ago. I only recently remembered the setting while troubleshooting lag & seeing near 1000 running processes. I was then further confused to find I had already set it true... as 1000 mostly preview processes stared me down from task manager.
Upon re-reading viewtopic.php?t=12792#p54426, I noticed u/void said "I'm adding a hack to Everything 1.5.0.1339a to only load one instance for this specific preview handler."
Does that mean the setting only applies to Delphi?
BTW, is anyone else having this problem with multiple previewer instances & them sticking around? Or is it just me?
-----------
It was never quite clear to me how to use the preview_handlers setting when reading viewtopic.php?t=9994#preview_handlers, but your post here has really cleared it up.
.... Several times now I've stumbled out of google & across a post of yours giving more details on a documented setting, and they've always been super helpful. Just want to throw out there, if you're ever considering linking from the documentation to posts like these, it'd be much appreciated.
-----------
-----------
Explains why any change using the editor tool to use Delphi has no effect, as the tool apparently isn't aware of user level configuration.
viewtopic.php?t=12792#p54426
viewtopic.php?p=54421#preview_single_handler_instance I originally set [c]/preview_single_handler_instance=1[/c] because of the Delphi issue in that linked thread some time ago. I only recently remembered the setting while troubleshooting lag & seeing near 1000 running processes. I was then further confused to find I had already set it true... as 1000 mostly preview processes stared me down from task manager.
Upon re-reading viewtopic.php?t=12792#p54426, I noticed u/void said "I'm adding a hack to Everything 1.5.0.1339a to only load one instance for this specific preview handler."
Does that mean the setting only applies to Delphi?
BTW, is anyone else having this problem with multiple previewer instances & them sticking around? Or is it just me?
-----------
It was never quite clear to me how to use the preview_handlers setting when reading viewtopic.php?t=9994#preview_handlers, but your post here has really cleared it up.
.... Several times now I've stumbled out of google & across a post of yours giving more details on a documented setting, and they've always been super helpful. Just want to throw out there, if you're ever considering linking from the documentation to posts like these, it'd be much appreciated.
-----------
Yeah I've been there. The fix for me was uninstalling both, then reinstalling Delphi then PowerToys, enabling the PowerToys handlers, then installing Delphi again (hoping it would overwrite PowerToys where applicable, no such luck).Uninstalling PowerToys leaves you with halfway corrupted registry entries: file extensions that were associated with it do no longer give a preview (at least that was the state of things 2 years ago).
-----------
Ahh. PowerToys being in HKCU explains why I never found them. Didn't think to look there. I assumed PowerToys was doing something weird because none of my (ancient) preview handler editing tools show its handlers.P.S IIRC: Delphi puts it's preview handler associations under HKLM, PowerToys under HKCU.
Explains why any change using the editor tool to use Delphi has no effect, as the tool apparently isn't aware of user level configuration.
Re: [BUG]: preview_single_handler_instance not working as expected
Thank you.DerekZiemba wrote: ↑Thu May 09, 2024 12:19 am -----------
It was never quite clear to me how to use the preview_handlers setting when reading viewtopic.php?t=9994#preview_handlers, but your post here has really cleared it up.
.... Several times now I've stumbled out of google & across a post of yours giving more details on a documented setting, and they've always been super helpful. Just want to throw out there, if you're ever considering linking from the documentation to posts like these, it'd be much appreciated.
-----------
If you come across topics or posts that might be helpful for more people, please refer to them in the "Greatest Hits" thread.
( Otherwise, in a month time these post will probably be buried under hundreds of other posts; requiring archaeological excavations to unearth them )
-
- Posts: 42
- Joined: Thu Sep 27, 2018 4:46 pm
Re: [BUG]: preview_single_handler_instance not working as expected
Just noticed this today. If you resize the preview, a bunch more monaco preview handlers are created & some of them, not all (no idea why), even show up on the taskbar. It's not 1:1 to the process created and they don't show up everytime you resize.
Clicking them on the taskbar does nothing. Again, not sure if it's a voidtools problem or powertoys problem.
Clicking them on the taskbar does nothing. Again, not sure if it's a voidtools problem or powertoys problem.
Re: [BUG]: preview_single_handler_instance not working as expected
Thank you for the issue report DerekZiemba,
It took me a while to find the cause of the issue.
It's a issue with the Monaco preview handler and changing the preview position with SetRect before DoPreview.
I am working on a solution..
It took me a while to find the cause of the issue.
It's a issue with the Monaco preview handler and changing the preview position with SetRect before DoPreview.
I am working on a solution..
-
- Posts: 42
- Joined: Thu Sep 27, 2018 4:46 pm
Re: [BUG]: preview_single_handler_instance not working as expected
Awesome!
Also have you been able to replicate the multiple monaco previewer instances starting & sticking around?
I was tempted to open an issue on https://github.com/microsoft/PowerToys/issues, but from FileExplorer the Monaco previewer exits.
Also have you been able to replicate the multiple monaco previewer instances starting & sticking around?
I was tempted to open an issue on https://github.com/microsoft/PowerToys/issues, but from FileExplorer the Monaco previewer exits.
Last edited by DerekZiemba on Tue May 21, 2024 8:03 am, edited 1 time in total.
Re: [BUG]: preview_single_handler_instance not working as expected
Yes, the extra process is only created when Everything changes the preview position with SetRect before DoPreview.
With the coming fix, only one process is created and is closed when you hide the preview pane or exit Everything.
With the coming fix, only one process is created and is closed when you hide the preview pane or exit Everything.
Re: [BUG]: preview_single_handler_instance not working as expected
Everything 1.5.0.1377a improves the preview pane.
Everything will now never change the preview position before calling DoPreview.
Only a single preview instance is now allowed by default.
This is now the same behavior as Everything 1.4.
Except, Everything 1.5 runs the preview handler in a separate thread.
Everything will now never change the preview position before calling DoPreview.
Only a single preview instance is now allowed by default.
This is now the same behavior as Everything 1.4.
Except, Everything 1.5 runs the preview handler in a separate thread.