Fix #12661 Null Reference Exception: System.Windows.Forms.TabControl.<WmSelChange>#12683
Merged
LeafShi1 merged 5 commits intodotnet:mainfrom Jan 8, 2025
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12683 +/- ##
====================================================
+ Coverage 76.03186% 97.02571% +20.99385%
====================================================
Files 3181 1191 -1990
Lines 639670 355480 -284190
Branches 47215 5446 -41769
====================================================
- Hits 486353 344907 -141446
+ Misses 149797 9770 -140027
+ Partials 3520 803 -2717
Flags with carried forward coverage won't be shown. Click here to find out more. |
src/System.Windows.Forms/src/System/Windows/Forms/Controls/TabControl/TabControl.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/TabControlTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/TabControlTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/TabControlTests.cs
Outdated
Show resolved
Hide resolved
Contributor
Tanya-Solyanik
left a comment
There was a problem hiding this comment.
Looks good! I added a comment about a test
…utomationEventRaised() test
LeafShi1
approved these changes
Jan 8, 2025
Tanya-Solyanik
approved these changes
Jan 8, 2025
Member
|
/backport to release/9.0 |
Contributor
|
Started backporting to release/9.0: https://github.com/dotnet/winforms/actions/runs/12664765466 |
Member
|
/backport to release/8.0 |
Contributor
|
Started backporting to release/8.0: https://github.com/dotnet/winforms/actions/runs/12664783112 |
Contributor
|
@LeafShi1 backporting to release/8.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix issue 12661 and add unit test
Using index info to reconstruct a base tree...
A src/System.Windows.Forms/src/System/Windows/Forms/Controls/TabControl/TabControl.cs
M src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/TabControlTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/TabControlTests.cs
Auto-merging src/System.Windows.Forms/src/System/Windows/Forms/TabControl.cs
CONFLICT (content): Merge conflict in src/System.Windows.Forms/src/System/Windows/Forms/TabControl.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Fix issue 12661 and add unit test
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
LeafShi1
pushed a commit
to LeafShi1/winforms
that referenced
this pull request
Jan 8, 2025
…ntrol.<WmSelChange> (dotnet#12683) * Fix issue 12661 and add unit test * Updated the unit test code lines to resolve the conversations from Tanya * Updated the BeginInvoke delegate in WmSelChange() * Removed that TabControl_WmSelChange_AccessibilityObjectNotCreated_NoAutomationEventRaised() test * Removed the unnecessary code lines from TabControlTests.cs file.
ricardobossan
pushed a commit
to ricardobossan/winforms
that referenced
this pull request
Jan 9, 2025
…ntrol.<WmSelChange> (dotnet#12683) * Fix issue 12661 and add unit test * Updated the unit test code lines to resolve the conversations from Tanya * Updated the BeginInvoke delegate in WmSelChange() * Removed that TabControl_WmSelChange_AccessibilityObjectNotCreated_NoAutomationEventRaised() test * Removed the unnecessary code lines from TabControlTests.cs file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12661
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
Before
Throw exception in Application.Run()

After
No exception in runtime
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow