Search Issue Tracker
Fixed in 5.3.2
Votes
0
Found in
5.3.0f2
Issue ID
750432
Regression
No
Memory Profiler throws a KeyNotFoundException when taking a snapshot of project
How to reproduce:
1. Open attached project
2. Build project to iOS and run
- Leave the iOS build running on device
3. Clone and open project from https://bitbucket.org/Unity-Technologies/memoryprofiler
4. Open the Profiler window
5. Attach the profiler to the device running the original project
6. Go to Window -> MemoryProfiler
7. Click Take Snapshot
- Note the error that's thrown in the editor:
KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2[System.UInt64,UnityEditor.MemoryProfiler.TypeDescription].get_Item (UInt64 key) [0x000a2] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150
at MemoryProfilerWindow.Crawler.ParseObjectHeader (MemoryProfilerWindow.StartIndices startIndices, UnityEditor.MemoryProfiler.MemorySection[] heap, UInt64 originalHeapAddress, System.UInt64& typeInfoAddress, System.Int32& indexOfObject, System.Boolean& wasAlreadyCrawled, System.Collections.Generic.List`1 outManagedObjects) [0x00042] in /Users/ayunoshev/GameInsight/Projects/memoryprofiler/Assets/Editor/Crawler.cs:211
at MemoryProfilerWindow.Crawler.CrawlPointer (UnityEditor.MemoryProfiler.PackedMemorySnapshot packedMemorySnapshot, MemoryProfilerWindow.StartIndices startIndices, UInt64 pointer, Int32 indexOfFrom, System.Collections.Generic.List`1 out_connections, System.Collections.Generic.List`1 out_managedObjects) [0x00020] in /Users/ayunoshev/GameInsight/Projects/memoryprofiler/Assets/Editor/Crawler.cs:154
at MemoryProfilerWindow.Crawler.CrawlPointer (UnityEditor.MemoryProfiler.PackedMemorySnapshot packedMemorySnapshot, MemoryProfilerWindow.StartIndices startIndices, UInt64 pointer, Int32 indexOfFrom, System.Collections.Generic.List`1 out_connections, System.Collections.Generic.List`1 out_managedObjects) [0x0011a] in /Users/ayunoshev/GameInsight/Projects/memoryprofiler/Assets/Editor/Crawler.cs:181
at MemoryProfilerWindow.Crawler.CrawlRawObjectData (UnityEditor.MemoryProfiler.PackedMemorySnapshot packedMemorySnapshot, MemoryProfilerWindow.StartIndices startIndices, BytesAndOffset bytesAndOffset, TypeDescription typeDescription, Boolean useStaticFields, Int32 indexOfFrom, System.Collections.Generic.List`1 out_connections, System.Collections.Generic.List`1 out_managedObjects) [0x00128] in /Users/ayunoshev/GameInsight/Projects/memoryprofiler/Assets/Editor/Crawler.cs:140
at MemoryProfilerWindow.Crawler.CrawlPointer (UnityEditor.MemoryProfiler.PackedMemorySnapshot packedMemorySnapshot, MemoryProfilerWindow.StartIndices startIndices, UInt64 pointer, Int32 indexOfFrom, System.Collections.Generic.List`1 out_connections, System.Collections.Generic.List`1 out_managedObjects) [0x00079] in /Users/ayunoshev/GameInsight/Projects/memoryprofiler/Assets/Editor/Crawler.cs:165
at MemoryProfilerWindow.Crawler.Crawl (UnityEditor.MemoryProfiler.PackedMemorySnapshot input) [0x0009e] in /Users/ayunoshev/GameInsight/Projects/memoryprofiler/Assets/Editor/Crawler.cs:31
at MemoryProfilerWindow.MemoryProfilerWindow.IncomingSnapshot (UnityEditor.MemoryProfiler.PackedMemorySnapshot snapshot) [0x00017] in /Users/ayunoshev/GameInsight/Projects/memoryprofiler/Assets/Editor/MemoryProfilerWindow.cs:159
at UnityEditor.MemoryProfiler.MemorySnapshot.DispatchSnapshot (UnityEditor.MemoryProfiler.PackedMemorySnapshot snapshot) [0x0000c] in /Users/builduser/buildslave/unity/build/Editor/Mono/Profiler/MemorySnapshot.cs:24
(Filename: /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs Line: 150)
- Reproduced in Version 5.3.0f4 (2524e04062b4)
- Project crashes on startup on device in Version 5.4.0a5 (6b220773f9c9)
- Blocked from testing older versions
- The issue only happens with the provided project. Using any other project does not yield the issue.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Add comment