Uh oh!
There was an error while loading. Please reload this page.
Add SetLastError to GdiPlus methods (#59096) - #60201
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.
ghost
commented
Oct 8, 2021
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.
Just wondering, does GDIplus APIs set the last errors in all cases?
safern
commented
Oct 8, 2021
@ericstj did you look for that info when doing the initial fix on main and 6.0? |
safern
commented
Oct 12, 2021
/azp run runtime |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Anipik
commented
Oct 13, 2021
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.