Search Issue Tracker

Fixed in 1.0.0-pre.1, 0.7.1-preview.1

Votes

0

Found in [Package]

0.7.0-preview.2

Issue ID

1426543

Regression

No

[Memory Profiler] crash in DynamicArray.ResizeInternalBuffer when opening a capture

Package: Memory Profiler

-

How to reproduce:
This bug is a bit hard to repro consistently outside of a strict test harness, but it would usually reproduce (inconsistently) when open a snapshot with the memory profiler. Depending on the memory state of the Memory Profiler, as well as the snapshot (some may be more prone to triggering this bug), opening a snapshot will crash the Editor.

The resulting Editor.log file will contain lines like:

Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at Unity.Collections.LowLevel.Unsafe.UnsafeUtility:MemCpy <0x000d6>
at Unity.MemoryProfiler.Editor.Containers.DynamicArray`1:ResizeInternalBuffer <0x0026a>
at Unity.MemoryProfiler.Editor.Containers.DynamicArray`1:Resize <0x00172>

Repro via the test harness:
1. Grab the git repro state of the Memory Profiler at changeset 3fff8117ce
2. Drop it into the Packages folder of an empty Unity Project
3. In the manifest.json:
-- add "nuget.moq": "1.0.0" to the list of dependencies
-- after the closing } "dependencies" add:
,
"testables": [
"com.unity.memoryprofiler"
]
4. Open that project and in it, open Window > General > Test Runner
5. filter for NoMemoryCorruptionOnResize and run that test

Expected results: The test passes.
Actual results: The Editor crashes.

Reproducible with: 2022.2.a16 Package version 0.7.0-preview.2
Unity base version should be irrelevant, earlier package versions also have the bug but not the test to repro it.

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.