You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
StackOverFlowException no longer breaks into the debugger on F5, instead the app hangs #114412
It appears to be a regression from the .NET 10.0 Preview 4 SDK version, which could not be reproduced in the .NET 10.0 Preview 3 test-pass version: 10.0.100-preview.3.25174.5
@Olina-Zhang - thank you for the detailed bug and the investigation. Did you find out why we expect this stack overflow?
Do you think you could create a unit test(in the UI integration tests assembly) that shows this error? Create the icon programmatically, for example ask copilot "create a System.Drawing.Icon sized 256x256", and then set ErrorProvider1.Icon in the unit test and show the parent form.
Call Stack - https://github.com/Tanya-Solyanik/winforms/tree/stack-overflow-before
GpRegion::CreateDeviceRegion Line 1213 C++ Symbols loaded.
GpRegion::CreateDeviceRegion Line 1226 C++ Symbols loaded.
GpRegion::UpdateDeviceRegion Line 1303 C++ Symbols loaded.
[Inline Frame] GpRegion::IsInfinite Line 1881 C++ Symbols loaded.
GdipIsInfiniteRegion Line 3058 C++ Symbols loaded.
[Managed to Native Transition] Annotated Frame
Windows.Win32.Graphics.GdiPlus.GpRegionExtensions.InitializeFromGdiPlus Line 34 C# Symbols loaded.
Windows.Win32.Graphics.GdiPlus.GpRegionExtensions.GetRegionScope Line 13 C# Symbols loaded.
System.Windows.Forms.ErrorProvider.ErrorWindow.Update Line 377 C# Symbols loaded.
System.Windows.Forms.ErrorProvider.ErrorWindow.Add Line 60 C# Symbols loaded.
System.Windows.Forms.ErrorProvider.ControlItem.AddToWindow Line 275 C# Symbols loaded.
I still see Stack Overflow exception reported in the VS output window,
Exception thrown at 0x00007FF9F9B1569B (GdiPlus.dll) in ScratchProject.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x000000A181205FC8).
and the application hangs. Before the SDK update, we would report the stack overflow:
ZwWaitForSingleObject Line 268 Unknown Symbols loaded.
WaitForSingleObjectEx Line 1328 C Symbols loaded.
RtlpCallVectoredHandlers Line 204 C Symbols loaded.
[Inline Frame] RtlCallVectoredExceptionHandlers Line 358 C Symbols loaded.
RtlDispatchException Line 413 C Symbols loaded.
KiUserExceptionDispatch Line 771 Unknown Symbols loaded.
GpRegion::CreateDeviceRegion Line 1210 C++ Symbols loaded.
Activity
LeafShi1 commentedon Mar 28, 2025
This issue appears from PR dotnet/winforms#13169
The exception pop up from InitializeFromGdiPlus
The call stack:
Olina-Zhang commentedon Mar 28, 2025
It appears to be a regression from the .NET 10.0 Preview 4 SDK version, which could not be reproduced in the .NET 10.0 Preview 3 test-pass version: 10.0.100-preview.3.25174.5
Tanya-Solyanik commentedon Apr 1, 2025
@Olina-Zhang - thank you for the detailed bug and the investigation. Did you find out why we expect this stack overflow?
Do you think you could create a unit test(in the UI integration tests assembly) that shows this error? Create the icon programmatically, for example ask copilot "create a System.Drawing.Icon sized 256x256", and then set ErrorProvider1.Icon in the unit test and
showthe parent form.Olina-Zhang commentedon Apr 2, 2025
https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.errorprovider.icon?view=windowsdesktop-9.0, I didn't find any doc about expecting StackOverFlowException, tested .NET framework 3.1~4.8.1 and .NET version, they are same. But recently, behavior is changed.
Olina-Zhang commentedon Apr 2, 2025
In created UI integration test, when debugging it, it shows that error directly, when running it, shows it in Output window
Debug test:
Run test:
StackOverFlow_ErrorProvider.mp4
unit test for https://github.com/dotnet/winforms/issues/13199
Tanya-Solyanik commentedon Apr 4, 2025
Call Stack - https://github.com/Tanya-Solyanik/winforms/tree/stack-overflow-before
GpRegion::CreateDeviceRegion Line 1213 C++ Symbols loaded.
GpRegion::CreateDeviceRegion Line 1226 C++ Symbols loaded.
GpRegion::UpdateDeviceRegion Line 1303 C++ Symbols loaded.
[Inline Frame] GpRegion::IsInfinite Line 1881 C++ Symbols loaded.
GdipIsInfiniteRegion Line 3058 C++ Symbols loaded.
[Managed to Native Transition] Annotated Frame
Windows.Win32.Graphics.GdiPlus.GpRegionExtensions.InitializeFromGdiPlus Line 34 C# Symbols loaded.
Windows.Win32.Graphics.GdiPlus.GpRegionExtensions.GetRegionScope Line 13 C# Symbols loaded.
System.Windows.Forms.ErrorProvider.ErrorWindow.Update Line 377 C# Symbols loaded.
System.Windows.Forms.ErrorProvider.ErrorWindow.Add Line 60 C# Symbols loaded.
System.Windows.Forms.ErrorProvider.ControlItem.AddToWindow Line 275 C# Symbols loaded.
https://github.com/dotnet/winforms/issues/13199 before the new SDK
https://github.com/dotnet/winforms/issues/13199 before the new SDK
Tanya-Solyanik commentedon Apr 8, 2025
I still see Stack Overflow exception reported in the VS output window,
Exception thrown at 0x00007FF9F9B1569B (GdiPlus.dll) in ScratchProject.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x000000A181205FC8).
and the application hangs. Before the SDK update, we would report the stack overflow:
ZwWaitForSingleObject Line 268 Unknown Symbols loaded.
WaitForSingleObjectEx Line 1328 C Symbols loaded.
RtlpCallVectoredHandlers Line 204 C Symbols loaded.
[Inline Frame] RtlCallVectoredExceptionHandlers Line 358 C Symbols loaded.
RtlDispatchException Line 413 C Symbols loaded.
KiUserExceptionDispatch Line 771 Unknown Symbols loaded.
GpRegion::CreateDeviceRegion Line 1210 C++ Symbols loaded.
5 remaining items
Fix issue when logging stack overflow in WinForm apps.
lateralusX commentedon Apr 9, 2025
I believe #114432 will fix this issue.
dotnet-policy-service commentedon Apr 9, 2025
Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.
Fix issue when logging stack overflow in WinForm apps.
Fix issue when logging stack overflow in WinForm apps. (dotnet#114432)