Skip to content

WPF app crash in EnsureChildren() with Null Reference Exception #3116

Closed

Description

@SamBent

Content in a list control (DataGrid, ListBox, etc.) is cleaned when leaving the visual tree. In some circumstances, the cleaning can raise automation events, which causes COM to start a nested message pump. If this happens to see a WM_SIZE message, the resulting layout pass and subsequent rebuild of the automation tree can happen while the visual tree is in a torn state (visual children lists in the process of being cleared can contain nulls). Some automation peers aren't prepared for this, and NRE.

[Port of servicing fix for .NET 4.7-4.8]

Activity

  1. added
    Bug
    on Jun 22, 2020
  2. added this to the 5.0.0 milestone on Jun 22, 2020
  3. added
    netfx-servicing-approved
    on Sep 24, 2020
  4. ghost removed this from the 5.0.0 milestone on Sep 28, 2020
  5. SamBent commented on Aug 17, 2021

    @SamBent
    ContributorAuthor

    Fix ported to 3.1.19, 5.0.0, 6.0.

  6. ghost locked as resolved and limited conversation to collaborators on Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Bugnetfx-servicing-approved

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions