question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unhandled exception pops up when using Accessibility tools to focus on date button in MonthCalendar

See original GitHub issue

.NET version

8.0.100-alpha.1.22430.2

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Yes, it is a regression issue, cannot repro .Net 6.0 and previous, repro in .Net 7.0

Issue description

Unhandled exception pops up when using Accessibility tools to focus on date button in MonthCalendar

System.InvalidOperationException HResult=0x80131509 Message=Collection was modified after the enumerator was instantiated. Source=System.Collections StackTrace: at System.Collections.Generic.LinkedList`1.Enumerator.MoveNext() at System.Windows.Forms.MonthCalendar.CalendarRowAccessibleObject.DisconnectChildren() at System.Windows.Forms.MonthCalendar.CalendarBodyAccessibleObject.DisconnectChildren() at System.Windows.Forms.MonthCalendar.CalendarAccessibleObject.DisconnectChildren() at System.Windows.Forms.MonthCalendar.MonthCalendarAccessibleObject.RebuildAccessibilityTree() at System.Windows.Forms.MonthCalendar.MonthCalendarAccessibleObject.OnMonthCalendarStateChanged(Object sender, EventArgs e) at System.Windows.Forms.MonthCalendar.WmCalViewChanged(Message& m) at System.Windows.Forms.MonthCalendar.WmReflectCommand(Message& m) at System.Windows.Forms.MonthCalendar.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam) at Interop.User32.SendMessageW(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam) at Interop.User32.SendMessageW(IHandle hWnd, WM Msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.Control.ReflectMessage(IntPtr hWnd, Message& m) at System.Windows.Forms.Control.WmNotify(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam) at Interop.User32.CallWindowProcW(IntPtr wndProc, IntPtr hWnd, WM msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.NativeWindow.DefWndProc(Message& m) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam) at Interop.User32.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.Interop.Mso.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context) at WinFormsApp8.Program.Main() in C:\Users\xxxx\source\repos\WinFormsApp8\WinFormsApp8\Program.cs:line 14

Steps to reproduce

Repro Steps:

  1. Create a Winforms .Net Core application with MonthCalendar added
  2. Build and run application
  3. Launch Narrator, focus on MonthCalendar, and then click Date button on the top

or use attached test app: MonthCalendarSample.zip

Actual result: Unhandled exception pops up MonthCalendarIssue

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
MandiMancommented, Sep 30, 2022

Verified on .NET 7.0 test pass build: .NET 7.0.100-rc.2.22476.6, issue is fixed without exception, Gif as below: issue7739

1reaction
Olina-Zhangcommented, Sep 20, 2022

Verified this issue in the latest .Net 8.0 SDK build: 8.0.100-alpha.1.22469.15, it is fixed without exception 7714_Fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Including a Month Calendar in a Windows Form always ...
In Form1, use the GUI to add a Month Calendar. Set my Exception Settings to break on any exception. Run the program. Then...
Read more >
MonthCalendar Class (System.Windows.Forms)
Represents a Windows control that enables the user to select a date using a visual monthly calendar display.
Read more >
Untitled
... .com/community/thread/25701/autocompletebox-popup-items-are-not-scrollabl ... .com/community/thread/25655/unhandledexception-int32editbox-when-committr ...
Read more >
Untitled
Can not use hyperlink in excell, Cat toys under couch or fridge, ... Advertise always pop up on browser, How to get different...
Read more >
DotNetBar for Windows Forms Release Notes
New: iCal import/export added to Calendar/Schedule control; New: Popup menu selects now first item when expanded using keyboard; New: CheckBoxX.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found