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
Copy link
Member Author

safern commented Jan 15, 2021

The build will fail because this needs #43017 to publish the 4.5.2 package to be able to harvest. I will add the feed once we have a build available.

@safern safern changed the title 3.1] Port graphics metafile refcount fix to avoid disposing the native image multiple times [3.1] Port graphics metafile refcount fix to avoid disposing the native image multiple times Jan 15, 2021
@safern safern requested review from danmoseley and ericstj January 15, 2021 20:04
@safern safern closed this Jan 15, 2021
@safern safern deleted the PortMetafileDispose31 branch January 15, 2021 20:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants