-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add SetLastError to GdiPlus methods (#59096) #60201
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
System.Drawing uses the last Win32 error in CheckErrorStatus to try to guess at why a GdiPlus draw method failed and ignore some failures. This was broken in .NETCore when SetLastError was removed from PINvokes. Bring back SetLastError for all PInvokes that use CheckErrorStatus.
|
Tagging subscribers to this area: @safern, @tarekgh Issue DetailsBackport of #59096 to release/5.0 Issue: #58741 Customer ImpactRegression from .NETFramework and .NETCore causing a unexpected TestingManually verified in debugger. Unit tests. RiskVery low. Adds back SetLastError to only those PINvokes which require it.
|
tarekgh
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.
Just wondering, does GDIplus APIs set the last errors in all cases?
@ericstj did you look for that info when doing the initial fix on main and 6.0? |
|
/azp run runtime |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
failures are unrelated so merging this one. |
Backport of #59096 to release/5.0
Issue: #58741
Customer Impact
Regression from .NETFramework and .NETCore causing a unexpected
ExternalExceptionrelated to session transitions (sleep/wake, Remote Desktop, etc)Testing
Manually verified in debugger. Unit tests.
Risk
Very low. Adds back SetLastError to only those PINvokes which require it.