Search Issue Tracker

In Progress

Fix In Review for 2022.3.64f1, 6000.0.52f1

Fixed in 6000.1.8f1, 6000.2.0b6, 6000.3.0a1

Votes

20

Found in

2022.3.62f1

6000.0.49f1

6000.1.3f1

6000.2.0b1

6000.3.0a1

Issue ID

UUM-105139

Regression

Yes

UnmanagedReadOrWrite objects are not disposed off when GZipStream is used in the "using" statement

-

How to reproduce:
1. Open attached “IN-99816” project
2. In the Project tab, open the “SampleScene”
3. Enter Play mode
4. In the Hierarchy, select the “test” GameObject
5. Wait for ~5 seconds
6. In the Inspector, under the “Gzip Test” script component, toggle the “Take Snap” property
7. Exit Play mode
8. In the title bar, navigate to Window > Analysis > Memory Profiler
9. On the left side of the Memory Profiler window, select the most recent Snapshot
10. In the top of the window, select the “All Of Memory” tab
11. In the search bar, enter “Unmanaged”
12. Expand the “Managed” and “Managed Objects” items
13. Observe the Memory Profiler window

Expected result: “System.IO.Compression.DeflateStreamNative.UnmanagedReadOrWrite” item count is 2
Actual result: “System.IO.Compression.DeflateStreamNative.UnmanagedReadOrWrite” item count is in the thousands

Reproducible with: 2022.3.62f1, 6000.0.35f1 (ed4dc7af2c82), 6000.0.49f1, 6000.1.3f1, 6000.2.0b1
Not reproducible with: 6000.0.34f1

Reproducible on: Windows 11
Not reproducible on: No other environments tested

  1. Resolution Note (fix version 6000.3.0a1):

    Fixed GC Handle leak that would happen every time a new function pointer was returned for a managed delegate.

  2. Resolution Note (fix version 6000.2.0b6):

    Fixed GC Handle leak that would happen every time a new function pointer was returned for a managed delegate.

  3. Resolution Note (fix version 6000.1.8f1):

    Fixed GC Handle leak that would happen every time a new function pointer was returned for a managed delegate.

  4. Resolution Note (fix version 6000.0.52f1):

    Fixed GC Handle leak that would happen every time a new function pointer was returned for a managed delegate.

  5. Resolution Note (fix version 2022.3.64f1):

    Fixed GC Handle leak that would happen every time a new function pointer was returned for a managed delegate.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.