-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject ctor ArgumentNullException #4742
Labels
💥 regression-preview
Regression from a preview release
Comments
SergeySmirnov-Akvelon
added a commit
to SergeySmirnov-Akvelon/winforms
that referenced
this issue
Apr 1, 2021
… ArgumentNullException dotnet#4742 The problem is reproduced because when getting an accessibility object for a ListViewSubItem, the ListViewSubItem may not have an owner. This is because we have several ways to create and add an unowned ListViewSubItem to an ListViewItem. Added missing logic for adding and removing owner. Added/updated unit tests
Verified the issue with .NET 6.0.100-preview.4.21221.10-win-x64 that the issue has been fixed, the project provided by customer which can run successfully with no exception. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
.NET Core Version:
5.0.4
Have you experienced this same bug with .NET Framework?:
This does not happen with .NET Framework 4.8. This also does not happen with NetCoreApp3.1.
This appears to be a regression due to #3224, though I can't seem to reconcile the call stack with the code I see in this repository. This is exhibited in a library called
ObjectListView
. This control inherits from ListView, and overrides WndProc. After receiving a WM_LBUTTONDOWN, it calls to base.WndProc. In all cases, when clicking on the first item in Detail view, an ArgumentNullException for parameter 'owningItem' is raised with this stack trace:This is raised when in Details view, only when clicking on a listviewitem in the first column, no matter if it is in Virtual Mode or not. This causes the application to crash.
Expected behavior:
Please do not throw unhandled exception during a hit test.
Minimal repro:
See https://github.com/StevenBonePgh/ListViewSubItemAccessibleObjectExceptionDemo
The text was updated successfully, but these errors were encountered: