Skip to content

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

Open
github-actions[bot] wants to merge 1 commit intorelease/10.0from
backport/pr-13840-to-release/10.0
Open

[release/10.0] Fix Control.Dispose crash when dependent UserControl fails to load due to missing assembly#14398
github-actions[bot] wants to merge 1 commit intorelease/10.0from
backport/pr-13840-to-release/10.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Mar 16, 2026

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
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

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 9 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
Copy link
Copy Markdown
Contributor

kirsan31 commented Mar 26, 2026

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.

3 participants