-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Weird scrolling regression in the GDI renderer #13270
Comments
Thanks for finding all these! Also, I have to confess: I think I just realized that despite the large changes to the GDI engine, I'm not sure I ever seriously tested it with |
Hmm... weird. I'm unable to reproduce the issue so far. I've tried it at 100%, 150% and 200% zoom scale. I've deleted all keys/values under |
OK, let me try clear out my reg keys and see if I can narrow down a cause. But I can tell you my scale is 200% and I'm using a release build. |
I tried deleting everything under HKCU\Console and I'm still seeing the problem. It couldn't be a Windows version thing could it? I'm assuming you're on Windows 11 and I'm still on 10. But if you can't reproduce it, I'll try and look at the code and see if I can figure out where it's going wrong. |
This could also be a difference due to our hardware. I could imagine that my Nvidia GPU might redraw the entire window according to the GDI information it has on every frame, whereas yours might strictly use the given dirty areas instead. I do have a Windows 10 Hyper-V VM, which seems to reproduce the issue. |
I think I've found the culprit. terminal/src/renderer/gdi/paint.cpp Lines 124 to 126 in ed27737
That
But now it's not, so the left and top coordinates can end up with garbage values. I suspect it doesn't affect you because the debug build initializes everything on the stack to zero anyway. |
Oh nice find! I actually tried it with a Release build as well... |
I'll try to see if I can automate searching the large diff for similar mistakes somehow. |
ed27737 contains a regression were a `RECT` in `GdiEngine` wasn't properly initialized anymore. Due to this, rendering during scrolling behaved erratic. To find other cases of this bug in ed27737 the following regex was used: ``` ^-.* = \{\s*\d*\s*\}; ``` It appears that only `GdiEngine` was affected by a bug of this kind, but just to be sure, this PR reverts all other instances. This bug was likely caused when I tried to undo some of the changes in ed27737 to make the PR smaller, but failed to revert the code properly. ## PR Checklist * [x] Closes #13270 * [x] I work here ## Validation Steps Performed I'm unable to reproduce the issue on my hardware and am unable to test this change, but the uninitialized struct is clearly a bug regardless. Co-authored-by: James Holderness <j4_james@hotmail.com>
Windows Terminal version
Commit 75e4624
Windows build number
10.0.19044.1706
Other Software
No response
Steps to reproduce
UseDx
is 0).Expected Behavior
Just normal scrolling.
Actual Behavior
Random bits of the screen scrolling independently of each other. Here's an example of the sort of thing I end up with.
I'm not sure how I hadn't noticed this before, but I think I've been using the DX renderer and only recently switched back to GDI (that's the only renderer that seems to be affected).
/cc @lhecker I think this might be PR #13025 again.
The text was updated successfully, but these errors were encountered: