-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Win11 24H2 .NET bug rendering text to image using GDI+ #12910
Comments
@tracktownsoftware Fwiw, we use the same GDI+ APIs on .NET Framework as we do in .NET. @Olina-Zhang can you see if you can reproduce the behavior and validate that it only happens on .NET and not .NET Framework? |
@JeremyKuhne @Olina-Zhang |
We can use physical machine see the .NET and .NET framework have different results on Win11 24H2, not VMs |
This is most likely behaving the way it does because we request different versions of GDI+ in .NET than we do in .NET Framework. .NET Framework initializes as V1, while .NET does V2. It would be good to get a much smaller repro for this to facilitate getting GDI+ to look at this. @Olina-Zhang can you try to make a minimal repro for this? Ideally within the scratch project. It shouldn't need to run within a Form, try to repro within the Program class. I can force the version to 1 to see if the problem goes away. |
@JeremyKuhne , you can clone the branch https://github.com/Zheng-Li01/winforms/tree/RepoIssue12910 or used the attached project ScratchProject.zip Note: the issue can be easily reproduced on physical machine, and only can reproduce on Azure VM on first time on myside. |
@Zheng-Li01 can you please try to cut this down to the minimal repro? In theory you should be able to get to a handful of lines of code that create a different result. Presumably any text rendering is going to generate different raw data. |
@JeremyKuhne, have Updated the code in the branch https://github.com/Zheng-Li01/winforms/tree/RepoIssue12910 & ScratchProject.zip as below screenshot. |
Thank you @Zheng-Li01 this is very helpful! @JeremyKuhne do you have everything you need to investigate? |
I've reached out to the GDI+ team. We're not doing anything special here. |
Thank for continuing to work on this. We have image comparison tests for each update of our software. New images are generated and compared against thousands of baseline images. This has always worked until Win11 24H2. |
Description
Previous to 24H2, running the same code to generate an image with text produced an identical image every time that passed a pixel-by-pixel comparison test. As of 24H2 the same images generated twice fail pixel-by-pixel comparison.
This is a .NET issue. The tests pass when I use .NET Framework 4.8.
Note: I reported this bug to Windows 11 feedback before realizing this is a .NET issue (https://aka.ms/AAuckmw).
Reproduction Steps
Repo with code to reproduce the bug: https://github.com/tracktownsoftware/Win11-24H2-ImageTextBug
Press the "Compare Images" button.
Expected behavior
Expected behavior:
Actual behavior
Actual behavior:
The same images are generated twice but fail pixel-by-pixel comparison. This started with the release of Windows 11 version 24H2.
Note: On a computer with 24H2 I changed the test app to use .NET Framework 4.8. The comparison tests passed, showing this to be a .NET issue.
Regression?
Yes this is a regression. If you run the repo test app with a Win11 version before 24H2 then it works.
Known Workarounds
Don't upgrade to Windows 11 to 24H2
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: