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
Preview handlers fail to handle 64-bit handles #32823
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Closed similar issues:
|
I did some debugging myself, and the faulty line turns out to be:
... where it assumes that the passed window handle is a signed 32-bit number. This should not be how it's implemented. This time, Windows passed a 64-bit handle to the process, with And the process promptly crashed, with an exception of "Value was either too large or too small for a UInt32." The confusing thing for me is this line below, where it's explicitly converted to
With reference from Microsoft Learn on the IntPtr struct:
Here's my thinking: why don't just convert the input string to a |
So hey, I'd like to work on this, thus as mandated in #28769, here's my request of an attempt to fix it. |
Good catch. Yes, absolutely, do implement it! Thank you! |
According to comments in the PR #32826 (comment), this affects all other preview handlers as well. I will work on applying the same fix to all other affected handlers as well once I got the approval. |
Hi, so I arrived here after a google search, trying to find out what the problem with SVG previews is and found the exact problem in issue #30370. However, it was fixed in v0.77 and thus closed. The exact same error is happening to me though, and the bot referred me to this issue. Is your planned implementation on this issue intertwined with the crash I am seeing or should I open a new issue? I'm very new to all this :) |
Hi @thawaffle, I had a look on the referenced issue and can pretty much confirm that it is irrelevant to this one. This issue has nothing to do with the EdgeWebView framework. You should open a new issue or follow other open issues for your case. There are still many open issues that are related with EdgeWebView, and you may want to take a look at those. |
Microsoft PowerToys version
0.80.1
Installation method
GitHub, PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
File Explorer: Preview Pane
Steps to reproduce
Appears totally random. I just previewed some random JSON file and
PowerToys.MonacoPreviewHandler.exe
crashed. But with a new File Explorer window it renders correctly again.✔️ Expected Behavior
The preview rendering correctly.
❌ Actual Behavior
PowerToys.MonacoPreviewHandler.exe
just crashed. I attached Visual Studio 2022 to it and the exception turns out was:Other Software
No response
The text was updated successfully, but these errors were encountered: