Merged
Conversation
0badcf0 to
0533444
Compare
Move calls to Create, Duplicate and Destroy into NativeImageList to reduce a chance of interleaved calls to Win32 API.
6acb995 to
b020ffc
Compare
Contributor
Author
|
/cc: @weltkante @hughbe |
Codecov Report
@@ Coverage Diff @@
## master #3526 +/- ##
====================================================
- Coverage 67.03175% 35.60162% -31.43014%
====================================================
Files 1352 900 -452
Lines 505814 253025 -252789
Branches 40899 36734 -4165
====================================================
- Hits 339056 90081 -248975
+ Misses 161191 158092 -3099
+ Partials 5567 4852 -715
|
Quite likely the observe AVE were a result of use reusing a shared instance of an `ImageList` across theory runs. Quite likely xUnit would dispose the instance while another test was run, leading to a corrupt heap. Resolves dotnet#3358
9a01f39 to
abe892e
Compare
JeremyKuhne
approved these changes
Jul 2, 2020
RussKie
added a commit
to RussKie/winforms
that referenced
this pull request
May 21, 2021
There are certain code paths where we are unable to track the lifetime of the object,
for example in the following scenarios:
this.imageList1.ImageStream = (System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"));
or
resources.ApplyResources(this.listView1, "listView1");
In those cases the loose instances will be collected by the GC.
Undo the regression introduced in dotnet#3526.
Fixes dotnet#3567
Closes dotnet#4928
RussKie
added a commit
to RussKie/winforms
that referenced
this pull request
May 25, 2021
There are certain code paths where we are unable to track the lifetime of the object,
for example in the following scenarios:
this.imageList1.ImageStream = (System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"));
or
resources.ApplyResources(this.listView1, "listView1");
In those cases the loose instances will be collected by the GC.
Undo the regression introduced in dotnet#3526.
RussKie
added a commit
to RussKie/winforms
that referenced
this pull request
May 25, 2021
There are certain code paths where we are unable to track the lifetime of the object,
for example in the following scenarios:
this.imageList1.ImageStream = (System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"));
or
resources.ApplyResources(this.listView1, "listView1");
In those cases the loose instances will be collected by the GC.
Undo the regression introduced in dotnet#3526.
RussKie
added a commit
that referenced
this pull request
May 26, 2021
There are certain code paths where we are unable to track the lifetime of the object,
for example in the following scenarios:
this.imageList1.ImageStream = (System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"));
or
resources.ApplyResources(this.listView1, "listView1");
In those cases the loose instances will be collected by the GC.
Undo the regression introduced in #3526.
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.
Proposed changes
Move calls to Create, Duplicate and Destroy into NativeImageList to reduce a chance of interleaved calls to Win32 API.
ImageListinstances in tests.Quite likely the observe AVE were a result of use reusing a shared instance of an
ImageListacross theory runs. Quite likely xUnit would dispose the instance while another test was run, leading to a corrupt heap. Resolves Flaky tests:ImageListrandomly crashes tests and result in AccessViolationException #3358ToolStripItem.AnimateandToolStripItem.set_Imagemethods to reduce nestingMicrosoft Reviewers: Open in CodeFlow