Search Issue Tracker
Fixed
Votes
0
Found in [Package]
0.7.1-preview.1
1.0.0
Issue ID
PROFB-71
Regression
Yes
[Memory Profiler] Errors are thrown or Player crashes at dynamic-to-managed byte conversion when capturing a snapshot of IL2CPP Player
How to reproduce:
1. Open the user’s attached “Test” project
2. Build and Run the “main” Scene
3. Take and open a snapshot of the Player in the Memory Profiler
Expected result: No error is thrown
Actual result: Errors are thrown when opening the snapshot or Player crashes
Reproducible with: 0.7.1-preview.1 (2021.3.18f1), 1.0.0 (2022.2.5f1, 2023.1.0b2)
Not reproducible with: 0.7.1-preview.1 (2020.3.44f1)
Reproduced on: macOS 13.0 (Intel)
Thrown errors:
OverflowException
Unity.MemoryProfiler.Editor.CachedSnapshot.ConvertDynamicArrayByteBufferToManagedArray[T]
…
A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details.
Stacktrace:
0 GameAssembly.dylib 0x12d5df6d6 il2cpp::vm::Class::GetVirtualMethod(Il2CppClass*, MethodInfo const*) + 166
1 GameAssembly.dylib 0x12d57227e il2cpp::metadata::GenericMetadata::InflateRGCTXLocked(Il2CppImage const*, unsigned int, Il2CppGenericContext const*, il2cpp::os::FastAutoLock const&) + 670 (GenericMetadata.cpp:290)
2 GameAssembly.dylib 0x12d5dd9c0 il2cpp::vm::Class::InitLocked(Il2CppClass*, il2cpp::os::FastAutoLock const&) + 880 (Class.cpp:1566)
3 GameAssembly.dylib 0x12d5dae56 il2cpp::vm::Class::Init(Il2CppClass*) + 102 (Class.cpp:1602)
4 GameAssembly.dylib 0x12d5d278c il2cpp::vm::Type::GetNameChunkedRecurseInternal(Il2CppType const*, Il2CppTypeNameFormat, bool, void (_)(void_, void*), void*) + 268 (Type.cpp:927)
5 UnityPlayer.dylib 0x10f582c86 MemorySnapshotProcess::AfterScriptingTypesHaveBeenReported() + 2726
Notes:
- In some versions, the Memory Profiler freezes at taking the snapshot where normally in Mono builds it takes in 2 seconds.
- Difficult to find the regression point as in the most alpha and beta versions of 2021.1 and 2021.2 streams, Memory Profiler isn’t compiled.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [MacOS] NaN value appears in a shader when using the EmissionTint parameter property that is not properly initialized
- Crash on mono_class_inflate_generic_method_full_checked when accessing static properties or methods of a Generic Interface in a Generic Class
- Crash on RendererScene::NotifyInvisible when switching QualitySettings of the HDRP pipeline asset in a specific project
- Compute and graphics queues are not run asynchronously when asynchronous compute shaders are enabled in DX12
- Unity Version Control window during "Create workspace" updates only when the mouse is moved
Resolution Note:
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-18685