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

Unstable unit test: System.Windows.Forms.Tests.RadioButtonRendererTests.RadioButtonRenderer_DrawRadioButton_OverloadWithHandle #12935

Open
LeafShi1 opened this issue Feb 13, 2025 · 0 comments
Labels
disabled-test Tracking tests that have been disabled to prevent run failures. test-bug Problem in test source code (most likely)

Comments

@LeafShi1
Copy link
Member

LeafShi1 commented Feb 13, 2025

Test

System.Windows.Forms.Tests.RadioButtonRendererTests.RadioButtonRenderer_DrawRadioButton_OverloadWithHandle(focus: True)

Issue description

Error Message:

  • In X86:
    System.InvalidOperationException : Invalid handle (0)

  • Stack trace:

   at Windows.Win32.Graphics.Gdi.DeviceContextHdcScope.ValidateHDC() in /_/src/System.Private.Windows.GdiPlus/Windows/Win32/Graphics/Gdi/DeviceContextHdcScope.cs:line 186
   at Windows.Win32.Graphics.Gdi.DeviceContextHdcScope..ctor(IHdcContext deviceContext, ApplyGraphicsProperties applyGraphicsState, Boolean saveHdcState) in /_/src/System.Private.Windows.GdiPlus/Windows/Win32/Graphics/Gdi/DeviceContextHdcScope.cs:line 147
   at System.Windows.Forms.DeviceContextExtensions.ToHdcScope(IDeviceContext deviceContext, ApplyGraphicsProperties applyProperties) in /_/src/System.Windows.Forms.Primitives/src/System/Windows/Forms/DeviceContextExtensions.cs:line 184
   at System.Windows.Forms.TextRenderer.DrawTextInternal(IDeviceContext dc, ReadOnlySpan`1 text, Font font, Rectangle bounds, Color foreColor, Color backColor, TextFormatFlags flags) in /_/src/System.Windows.Forms/src/System/Windows/Forms/Rendering/TextRenderer.cs:line 307
   at System.Windows.Forms.TextRenderer.DrawText(IDeviceContext dc, String text, Font font, Rectangle bounds, Color foreColor, TextFormatFlags flags) in /_/src/System.Windows.Forms/src/System/Windows/Forms/Rendering/TextRenderer.cs:line 205
   at System.Windows.Forms.RadioButtonRenderer.DrawRadioButton(Graphics g, Point glyphLocation, Rectangle textBounds, String radioButtonText, Font font, TextFormatFlags flags, Boolean focused, RadioButtonState state, HWND hwnd) in /_/src/System.Windows.Forms/src/System/Windows/Forms/Controls/Buttons/RadioButtonRenderer.cs:line 147
   at System.Windows.Forms.Tests.RadioButtonRendererTests.RadioButtonRenderer_DrawRadioButton_OverloadWithHandle(Boolean focus) in /_/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonRendererTests.cs:line 118
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
@LeafShi1 LeafShi1 added the untriaged The team needs to look at this issue in the next triage label Feb 13, 2025
@LeafShi1 LeafShi1 added test-bug Problem in test source code (most likely) disabled-test Tracking tests that have been disabled to prevent run failures. and removed untriaged The team needs to look at this issue in the next triage labels Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disabled-test Tracking tests that have been disabled to prevent run failures. test-bug Problem in test source code (most likely)
Projects
None yet
Development

No branches or pull requests

1 participant