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

Fix ANE in the "ListViewSubItemAccessibleObjectin " constructor #4744

Conversation

SergeySmirnov-Akvelon
Copy link
Contributor

@SergeySmirnov-Akvelon SergeySmirnov-Akvelon commented Mar 30, 2021

Fixes #4742

Proposed changes

  • Added missing logic for adding and removing owner. 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/updated unit tests

Customer Impact

An app crash upon clicking on a listview subitem.

  • Before fix:
    Issue-4742-BeforeFix

  • After fix:
    Issue-4742-AfterFix

Regression?

  • Yes

Risk

  • Minimal

Test methodology

  • Unit tests
  • CTI team

Test environment(s)

  • Microsoft Windows: Version 10.0.19041.388
  • .NET Core SDK: 6.0.0-preview.2.21154.2
Microsoft Reviewers: Open in CodeFlow

@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #4744 (a4378e6) into main (49a651d) will increase coverage by 0.00117%.
The diff coverage is 100.00000%.

❗ Current head a4378e6 differs from pull request most recent head d8fde13. Consider uploading reports for the commit d8fde13 to get more accurate results

@@                 Coverage Diff                 @@
##                main       #4744         +/-   ##
===================================================
+ Coverage   97.96231%   97.96348%   +0.00117%     
===================================================
  Files            547         547                 
  Lines         266036      266189        +153     
  Branches        5109        5109                 
===================================================
+ Hits          260615      260768        +153     
  Misses          4531        4531                 
  Partials         890         890                 
Flag Coverage Δ
Debug 97.96348% <100.00000%> (+0.00117%) ⬆️
test 97.96348% <100.00000%> (+0.00117%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@SergeySmirnov-Akvelon SergeySmirnov-Akvelon added 📬 waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) waiting-review This item is waiting on review by one or more members of team labels Mar 30, 2021
@RussKie RussKie added the Servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria label Mar 31, 2021
@RussKie RussKie added this to the 5.0.6 milestone Mar 31, 2021
Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 with a small suggestion

@RussKie RussKie removed the waiting-review This item is waiting on review by one or more members of team label Mar 31, 2021
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue_4742_ListViewSubItemAccessibleObject__ctor_ArgumentNullException branch from a196638 to 55d9f02 Compare March 31, 2021 07:19
… 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
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue_4742_ListViewSubItemAccessibleObject__ctor_ArgumentNullException branch from 55d9f02 to d8fde13 Compare April 1, 2021 06:53
@leecow leecow added Servicing-approved .NET Shiproom approved the PR for merge and removed Servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria labels Apr 1, 2021
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon removed the 📬 waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) label Apr 6, 2021
@RussKie RussKie merged commit d5bcf9d into dotnet:main Apr 6, 2021
@RussKie RussKie deleted the Issue_4742_ListViewSubItemAccessibleObject__ctor_ArgumentNullException branch April 6, 2021 06:27
@ghost ghost modified the milestones: 5.0.6, 6.0 Preview4 Apr 6, 2021
SergeySmirnov-Akvelon added a commit to SergeySmirnov-Akvelon/winforms that referenced this pull request Apr 6, 2021
…et#4744)

Added missing logic for adding and removing owner. 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/updated unit tests
dreddy-work pushed a commit that referenced this pull request Apr 7, 2021
… (#4764)

Added missing logic for adding and removing owner. 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/updated unit tests
wreuel pushed a commit to wreuel/winforms that referenced this pull request Apr 13, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Servicing-approved .NET Shiproom approved the PR for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject ctor ArgumentNullException
4 participants