Repository navigation
Description
I see quite a bit of exception logs from customer machines with a call stack pointing to "LabelEditNativeWindow". This seems to have something to do with assisting technologies like screen readers and suchlike. i have tried all sorts of things (running narrator, running zoom, putting pressure on the runtime, using different flags for how it does gc - but i cannot repro this on any of my machines.). After working on that for some days, i do think this is a bug in winforms somehow. all of the callstacks that i have seen start somewhere in my code but all of them, no matter what, end up in that stack inside winforms. Any suggestions what i might do about this?
Application: baustatik.exe CoreCLR Version: 10.0.926.27113 .NET Version: 10.0.9
Description: The application requested process termination through System.Environment.FailFast.
Message: A callback was made on a garbage collected delegate of type 'System.Windows.Forms!System.Windows.Forms.LabelEditNativeWindow+WINEVENTPROC::Invoke'.
Stack:
at Windows.Win32.PInvokeCore.CallWindowProc(Windows.Win32.Foundation.LRESULT (Windows.Win32.Foundation.HWND, UInt32, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM), Windows.Win32.Foundation.HWND, UInt32, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM)
at Windows.Win32.PInvokeCore.CallWindowProc(Windows.Win32.Foundation.LRESULT (Windows.Win32.Foundation.HWND, UInt32, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM), Windows.Win32.Foundation.HWND, UInt32, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM)
at System.Windows.Forms.Control.DefWndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.PropertyGridInternal.PropertyGridView+GridViewTextBox.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.Callback(Windows.Win32.Foundation.HWND, UInt32, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM)
at Windows.Win32.PInvoke.<SetWindowText>g__LocalExternFunction 2890_0(Windows.Win32.Foundation.HWND, Windows.Win32.Foundation.PCWSTR)
at Windows.Win32.PInvoke.<SetWindowText>g__LocalExternFunction 2890_0(Windows.Win32.Foundation.HWND, Windows.Win32.Foundation.PCWSTR)
at Windows.Win32.PInvoke.SetWindowText(Windows.Win32.Foundation.HWND, Windows.Win32.Foundation.PCWSTR)
at System.Windows.Forms.TextBoxBase.set_WindowText(System.String)
at System.Windows.Forms.Control.set_Text(System.String)
at System.Windows.Forms.TextBoxBase.set_Text(System.String)
at System.Windows.Forms.PropertyGridInternal.PropertyGridView+GridViewTextBox.set_Text(System.String)
at System.Windows.Forms.PropertyGridInternal.PropertyGridView.CommitValue(System.Windows.Forms.PropertyGridInternal.GridEntry, System.Object, Boolean)
at System.Windows.Forms.PropertyGridInternal.GridEntry.EditPropertyValue(System.Windows.Forms.PropertyGridInternal.PropertyGridView)
at System.Windows.Forms.PropertyGridInternal.PropertyDescriptorGridEntry.EditPropertyValue(System.Windows.Forms.PropertyGridInternal.PropertyGridView)
at System.Windows.Forms.PropertyGridInternal.PropertyGridView.PopupEditor(Int32)
at System.Windows.Forms.PropertyGridInternal.PropertyGridView.OnButtonClick(System.Object, System.EventArgs)
at System.Windows.Forms.Button.OnClick(System.EventArgs)
at System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.Callback(Windows.Win32.Foundation.HWND, UInt32, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM)
at Windows.Win32.PInvoke.DispatchMessage(Windows.Win32.UI.WindowsAndMessaging.MSG*)
at System.Windows.Forms.Application+LightThreadContext.FPushMessageLoop(Microsoft.Office.msoloop)
at System.Windows.Forms.Application+LightThreadContext.RunMessageLoop(Microsoft.Office.msoloop, Boolean)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Microsoft.Office.msoloop, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Application.Run(System.Windows.Forms.Form)
at DIE.Framework.ApplicationModell.ApplicationLoader.StartApplication(System.String[])
at DIE.Applications.Faltwerk.Program.Main(System.String[])
Activity
twoelfer commentedon Jun 25, 2026
Is there anything i can do to help with that issue. (Sorry for the rookie question, i am new to the "github" modus operandi.)
Zheng-Li01 commentedon Sep 10, 2026
Verified the issue with .NET 11.0.0-rc.2.26458.109 + private dlls built from main branch of dotnet /winforms repo that the Applications using screen readers (e.g., Narrator) no longer crash when editing PropertyGrid or TreeView with accessibility enabled as below screenshot.
14657.zip
14657.mp4
twoelfer commentedon Sep 10, 2026
Do you know if this code is already in windowsdesktop-runtime 10.0.12 ? (or how i can find out if it is in there? and if not, how can i find out in which upcoming version of the windowsdesktop-runtime it will be?)
Workaround für WinForms-Absturz nach Beschriftungsbearbeitung (dotnet…
Workaround für dotnet/winforms#14657: LabelEditGuard hält das LabelEd…
Workaround für dotnet/winforms#14657: LabelEditGuard hält das LabelEd…
Workaround für WinForms-Absturz nach Beschriftungsbearbeitung (dotnet…