Skip to content
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

Fix uninitialized memory bug in GdiEngine #13271

Merged
1 commit merged into from
Jun 13, 2022
Merged

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Jun 11, 2022

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

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 [email protected]

@ghost ghost added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Conhost For issues in the Console codebase labels Jun 11, 2022
@lhecker
Copy link
Member Author

lhecker commented Jun 11, 2022

I still have this weird "ghosting" effect when I scroll in my Windows 10 VM, but I'm fairly confident that this should fix the bug.
If you happen to get a chance, would you mind checking whether initializing the RECT properly fixes the bug, @j4james? (If you haven't done so already.)

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did the audit build miss this?

Copy link
Collaborator

@j4james j4james left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this fixes it for me. Thanks.

@lhecker
Copy link
Member Author

lhecker commented Jun 11, 2022

How did the audit build miss this?

That project doesn't get built in the AuditMode configuration. 😿

@lhecker
Copy link
Member Author

lhecker commented Jun 11, 2022

How did the audit build miss this?

@DHowett Terrifying fun fact: I made RendererGdi compile under AuditMode and this bug doesn't get caught at all.
(Sorry, I posted this accidentally on the issue first.)

@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jun 13, 2022
@ghost
Copy link

ghost commented Jun 13, 2022

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 2e7a95d into main Jun 13, 2022
@ghost ghost deleted the dev/lhecker/13270-gdi-invalidation branch June 13, 2022 11:19
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Conhost For issues in the Console codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weird scrolling regression in the GDI renderer
4 participants