Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@safern
Copy link
Member

@safern safern commented Jan 15, 2021

Ports: dotnet/runtime@7939172

Summary

Due to libgdiplus behavior we were disposing metafiles twice causing the app to crash. This adds a ref count to avoid disposing a metafile when a graphics instance still has a reference to it.

Customer Impact

Detected via tests.

Regression?

No.

Testing

Unit tests.

Risk

Low-medium. The fix just adds a ref count to the metafile and avoids disposing it if it is still referenced by a graphics object.

cc: @Anipik

@safern safern requested review from danmoseley and ericstj January 15, 2021 09:26
@safern safern force-pushed the PortDrawingMetafileDispose branch 2 times, most recently from b28e086 to 808ab6a Compare January 15, 2021 10:24
@safern safern force-pushed the PortDrawingMetafileDispose branch from 808ab6a to 0f887e6 Compare January 15, 2021 10:35
@safern safern added the Servicing-approved Approved for servicing release label Jan 15, 2021
@safern
Copy link
Member Author

safern commented Jan 15, 2021

Added servicing approved as it was approved over email.

@Anipik Anipik merged commit 24e09fe into dotnet:release/2.1 Jan 15, 2021
@safern safern deleted the PortDrawingMetafileDispose branch January 15, 2021 18:11
crummel pushed a commit to crummel/dotnet_corefx that referenced this pull request Aug 11, 2021
…ng the native image multiple times.

Internal port of: dotnet#43017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Drawing Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants