-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Fix a crash when dragging a debug conhost across a DPI boundary #4022
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
Conversation
|
Hello @zadjii-msft! Because this pull request has the Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 7 hours 37 minutes. No worries though, I will be back when the time is right! 😉 p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
miniksa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change doesn't show understanding of what actually was failing and has no tests to prevent it from happening again.
I'd at minimum want a test or some change that enforces that FontInfo cannot accept a nullptr if it's causing crashes.
But more certainly, I'd want whatever crashed to be guarded and to understand what type of crash it actually was.
|
@miniksa The crash seemed to be related to passing a I did check all the |
Can you change the I just don't like that there's nothing stopping this from happening again by accident. I'm not certain audit would catch this. |
How would I actually do that? The current FontInfo(const std::wstring_view faceName,
const unsigned char family,
const unsigned int weight,
const COORD coordSize,
const unsigned int codePage,
const bool fSetDefaultRasterFont = false);Would I just define a I guess my next question though would be: do we need to do this everywhere we're accepting string_view's? |
|
Nnnnnnn. I guess that it isn't solvable then because it comes out of the constructor. I was imagining that it was accepting the I'll stop blocking then. |
## Summary of the Pull Request When dragging _DEBUG_ conhost across a DPI boundary, we'd crash. This doesn't repro for some reason on Release builds. Maybe @miniksa can share some light why that is. ## PR Checklist * [x] Closes #4012 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed Dragged it across the boundary again, doesn't crash anymore 🙏
Summary of the Pull Request
When dragging DEBUG conhost across a DPI boundary, we'd crash. This doesn't repro for some reason on Release builds. Maybe @miniksa can share some light why that is.
PR Checklist
Validation Steps Performed
Dragged it across the boundary again, doesn't crash anymore 🙏