Comments (5)
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!
from powertoys.
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:
- Monaco Preview handler hangs/crashes (#30385), similarity score: 0.79
- Source code files (Monaco) crashes with Unhandled Exception (#23474), similarity score: 0.78
- Explorer preview pane add-on crashes the .NET (#23415), similarity score: 0.78
- MSEdgeWebView2 crashes when trying to preview a file through Monaco in file explorer (#30370), similarity score: 0.77
- "Catastrophic failure" on file previews (#23475), similarity score: 0.76
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
from powertoys.
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 args[1]
= FFFF FFFF A290 0D2C
, as shown in my Immediate Window:
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 IntPtr
, when the hwnd
is actually used:
With reference from Microsoft Learn on the IntPtr struct:
The IntPtr type is designed to be an integer whose size is the same as a pointer. That is, an instance of this type is expected to be 32 bits in a 32-bit process and 64 bits in a 64-bit process.
Here's my thinking: why don't just convert the input string to a IntPtr
at the very beginning, instead of the flow of: A Potentially 64-bit Hexadecimal String -> A Signed 32-bit Integer -> A Platform-dependent Handle Type, when you can parse it at the first shot? I think this should be a relatively easy fix, and I will try to fix it with a PR once approved.
from powertoys.
So hey, I'd like to work on this, thus as mandated in #28769, here's my request of an attempt to fix it.
from powertoys.
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.
from powertoys.
Related Issues (20)
- Add text to speech HOT 1
- [Peek] Annoying link confirmation window
- White rectangle in the middle of screen HOT 1
- Full DWM Customization, or limited features
- Suggest Feature Keyboard Macro HOT 2
- The title of the "Always on Top" tool missing translation and the translation is not very reasonable. HOT 1
- Taskbar Transparency HOT 3
- Microsoft Edge will be open a new window when scribe/select any text in webpage. HOT 1
- Remapping Win(left)+c doesn't seem to apply HOT 1
- Peek doesn't work with PROTECTED VIEW office documents HOT 1
- Modifier key (CTRL) remains stuck HOT 1
- Multi-screen lockscreen
- After initial starting the PowerToys software, the FancyZone feature does not work HOT 1
- PowerRename: Option to only rename folders HOT 2
- Keyboard Manager mangles CloudPC keys HOT 1
- pick colour *from palette* tool HOT 2
- PowerToys crashes and casues black screen on all monitors until automatic restart HOT 2
- White screen issue when using Text Extractor HOT 1
- Crop And Lock - option to change window transparency HOT 3
- PowerToys Peek - 'close the Peek window after it loses focus' but as a button in peek window to enable temporarily HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powertoys.