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

Ensure proper ref count of underlying ocx #12281

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

lonitra
Copy link
Member

@lonitra lonitra commented Oct 8, 2024

Fixes #12056

We had missed a release in CreateWithoutLicense, causing the underlying ocx to linger after AxHost control disposal. Made the same adjustment for CreateWithLicense. While investigating also noticed a missing release for ShowPropertyPages so fixed this as well. Regression test has been added for this issue scenario.

Microsoft Reviewers: Open in CodeFlow

@lonitra lonitra requested a review from a team as a code owner October 8, 2024 01:11
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.

Project coverage is 75.44869%. Comparing base (16c923a) to head (3278b3b).
Report is 20 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #12281         +/-   ##
===================================================
+ Coverage   75.43346%   75.44869%   +0.01523%     
===================================================
  Files           3103        3105          +2     
  Lines         634314      634353         +39     
  Branches       46876       46876                 
===================================================
+ Hits          478485      478611        +126     
+ Misses        152403      152324         -79     
+ Partials        3426        3418          -8     
Flag Coverage Δ
Debug 75.44869% <71.42857%> (+0.01523%) ⬆️
integration 17.98648% <0.00000%> (+0.00281%) ⬆️
production 48.84596% <33.33333%> (+0.02863%) ⬆️
test 97.02539% <100.00000%> (+0.00043%) ⬆️
unit 45.85007% <33.33333%> (+0.00107%) ⬆️

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

@lonitra lonitra merged commit 80313d7 into dotnet:main Oct 8, 2024
8 checks passed
@lonitra
Copy link
Member Author

lonitra commented Oct 8, 2024

/backport to release/9.0

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Started backporting to release/9.0: https://github.com/dotnet/winforms/actions/runs/11240680586

@lonitra
Copy link
Member Author

lonitra commented Oct 8, 2024

/backport to release/8.0

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Started backporting to release/8.0: https://github.com/dotnet/winforms/actions/runs/11240684310

@lonitra lonitra deleted the axhostdestructor branch October 8, 2024 17:33
Copy link
Contributor

github-actions bot commented Oct 8, 2024

@lonitra backporting to release/8.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Ensure proper ref count of underlying ocx
Using index info to reconstruct a base tree...
A	src/System.Windows.Forms/src/System/Windows/Forms/ActiveX/AxHost.cs
M	src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AxHostTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AxHostTests.cs
Auto-merging src/System.Windows.Forms/src/System/Windows/Forms/AxHost.cs
CONFLICT (content): Merge conflict in src/System.Windows.Forms/src/System/Windows/Forms/AxHost.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 Ensure proper ref count of underlying ocx
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@dotnet-policy-service dotnet-policy-service bot added this to the 10.0 Preview1 milestone Oct 8, 2024
lonitra added a commit to lonitra/winforms that referenced this pull request Oct 8, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants