Visitar URL original
[release/10.0] Fix Control.Dispose crash when dependent UserControl fails to load due to missing assembly by github-actions[bot] · Pull Request #14398 · dotnet/winforms · GitHub
Skip to content

[release/10.0] Fix Control.Dispose crash when dependent UserControl fails to load due to missing assembly - #14398

Merged
LeafShi1 merged 1 commit into
release/10.0from
backport/pr-13840-to-release/10.0
Apr 9, 2026
Merged

LeafShi1 merged 1 commit into
release/10.0from
backport/pr-13840-to-release/10.0

Conversation

@github-actions

@github-actions github-actions Bot commented Mar 16, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #13840 to release/10.0
Fixes #14393

Customer Impact

This change ensures that Control.Dispose() can safely execute even when the control was never fully constructed.

Fix

Added a defensive null check around ContextMenuStrip access in Control.Dispose()
Replaced direct property access with Properties?.TryGetValue(...) to ensure safe event unsubscription

Testing

Manual with the customer repro case.

Risk

Low - This fix only adds a defensive null check and will not affect existing logic.

@github-actions
github-actions Bot requested a review from a team as a code owner March 16, 2026 01:53
@github-actions github-actions Bot added the area-DarkMode Issues relating to Dark Mode feature label Mar 16, 2026
@codecov

codecov Bot commented Mar 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.11109%. Comparing base (ee90158) to head (60b202d).
⚠️ Report is 14 commits behind head on release/10.0.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           release/10.0      #14398         +/-   ##
======================================================
+ Coverage      77.10644%   77.11109%   +0.00464%     
======================================================
  Files              3273        3273                 
  Lines            645033      645033                 
  Branches          47701       47702          +1     
======================================================
+ Hits             497362      497392         +30     
+ Misses           143989      143964         -25     
+ Partials           3682        3677          -5     
Flag Coverage Δ
Debug 77.11109% <0.00000%> (+0.00464%) ⬆️
integration 18.98850% <0.00000%> (+0.00870%) ⬆️
production 51.93587% <0.00000%> (+0.01042%) ⬆️
test 97.40998% <ø> (ø)
unit 49.35089% <0.00000%> (+0.00764%) ⬆️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kirsan31

kirsan31 commented Mar 26, 2026 •

Copy link
Copy Markdown
Contributor

@LeafShi1 @KlausLoeffelmann

I understand the team is short-staffed :( But maybe you could still somehow prioritize basic regression fixes in releases branches? 🙏🙏🙏
Several such pull requests have been pending since February 4th And we all know that after merge a lot of time will pass till release too😭

FYI @merriemcgaw

@merriemcgaw merriemcgaw added servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria and removed area-DarkMode Issues relating to Dark Mode feature labels Mar 26, 2026
@rbhanda rbhanda 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 Mar 30, 2026
@rbhanda rbhanda added this to the 10.0.7 milestone Mar 30, 2026
@LeafShi1
LeafShi1 merged commit e4adf6a into release/10.0 Apr 9, 2026
8 checks passed
@LeafShi1
LeafShi1 deleted the backport/pr-13840-to-release/10.0 branch April 9, 2026 02:23
@github-actions github-actions Bot locked and limited conversation to collaborators May 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-area-label servicing-approved .NET Shiproom approved the PR for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants