Search Issue Tracker

Fixed in 0.4.2-preview.1

Votes

0

Found in [Package]

0.4.0-preview.1

Issue ID

1368289

Regression

Yes

"ArgumentException: Only positive float values are supported. found: 0" exception thrown when opening a snapshot

Package: Memory Profiler

-

How to reproduce:
1. Open the attached Unity project ("repro_2021.2.0b15.zip")
2. Open Memory Profiler (Window -> Analysis -> Memory Profiler)
3. Unzip and import snapshot in Memory Profiler ("Snapshot-637686068250000860.snap.zip")
4. Click on the imported snapshot

Expected result: Snapshot opens, "ArgumentException: only positive float values are supported. found: 0" exception not thrown in Console.
Actual result: Snapshot fails to open, "ArgumentException: only positive float values are supported. found: 0" exception thrown in Console.

Reproducible with: 0.4.0-preview.1, 0.4.1-preview.1 (2019.4.31f1, 2020.3.19f1, 2021.1.24f1, 2021.2.0b15, 2022.1.0a11)
Not reproducible with: 0.2.10-preview.1 (2019.4.31f1, 2020.3.19f1, 2021.1.24f1, 2021.2.0b15, 2022.1.0a11)

Note:
- Only reproduces with the specific snapshot
- Reproducible on Windows and macOS

Full error:
ArgumentException: only positive float values are supported. found: 0
Unity.MemoryProfiler.Editor.UI.Treemap.Utility.GetTreemapRects (System.Single[] values, UnityEngine.Rect targetRect) (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/Treemap/Utility.cs:32)
Unity.MemoryProfiler.Editor.UI.Treemap.TreeMapView.UpdateGroupRect () (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/Treemap/TreeMapView.cs:317)
Unity.MemoryProfiler.Editor.UI.Treemap.TreeMapView.UpdateMetric () (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/Treemap/TreeMapView.cs:296)
Unity.MemoryProfiler.Editor.UI.TreeMapPane.ShowAllObjects (Unity.MemoryProfiler.Editor.UI.Treemap.ObjectMetric itemCopyToSelect, System.Boolean focus) (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/TreeMapPane.cs:242)
Unity.MemoryProfiler.Editor.UI.TreeMapPane..ctor (Unity.MemoryProfiler.Editor.IUIStateHolder s, Unity.MemoryProfiler.Editor.UI.IViewPaneEventListener l) (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/TreeMapPane.cs:191)
Unity.MemoryProfiler.Editor.UI.UIState+SnapshotMode.GetDefaultView (Unity.MemoryProfiler.Editor.IUIStateHolder uiStateHolder, Unity.MemoryProfiler.Editor.UI.IViewPaneEventListener viewPaneEventListener) (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/UIState.cs:232)
Unity.MemoryProfiler.Editor.UI.OldViewLogic.OnModeChanged (Unity.MemoryProfiler.Editor.UI.UIState+BaseMode newMode, Unity.MemoryProfiler.Editor.UI.UIState+ViewMode newViewMode) (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/AnalysisWindow/OldViewLogic.cs:276)
Unity.MemoryProfiler.Editor.UI.UIState.set_CurrentViewMode (Unity.MemoryProfiler.Editor.UI.UIState+ViewMode value) (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/UIState.cs:430)
Unity.MemoryProfiler.Editor.UI.UIState.SetSnapshot (Unity.MemoryProfiler.Editor.Format.QueriedSnapshot.FileReader snapshot, System.Boolean first) (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/UIState.cs:558)
Unity.MemoryProfiler.Editor.OpenSnapshotsManager.OpenSnapshot (Unity.MemoryProfiler.Editor.SnapshotFileData snapshot) (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/OpenSnapshotsManager.cs:126)
Unity.MemoryProfiler.Editor.SnapshotsWindow.OpenCapture (Unity.MemoryProfiler.Editor.SnapshotFileData snapshot) (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/Workbench/SnapshotsWindow.cs:336)
Unity.MemoryProfiler.Editor.UI.SnapshotListItem.OpenCapture () (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/Workbench/SnapshotListItem.cs:293)
Unity.MemoryProfiler.Editor.UI.SnapshotListItem.<InitVisualChildElements>b__35_1 () (at Library/PackageCache/com.unity.memoryprofiler@0.4.1-preview.1/Editor/UI/Workbench/SnapshotListItem.cs:225)
UnityEngine.UIElements.Clickable.Invoke (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/Clickable.cs:81)
UnityEngine.UIElements.Clickable.OnMouseUp (UnityEngine.UIElements.MouseUpEvent evt) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/Clickable.cs:158)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/Events/EventCallback.cs:64)
UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/Events/EventCallbackRegistry.cs:332)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/Events/EventHandler.cs:95)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/Events/EventHandler.cs:77)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:92)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:310)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:275)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at /Users/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:238)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at /Users/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:203)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at /Users/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:44)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:301)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:159)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/Panel.cs:257)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/UIElementsUtility.bindings.cs:404)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/bokken/buildslave/unity/build/Modules/UIElements/UIElementsUtility.bindings.cs:194)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

  1. Resolution Note (fix version 0.4.2-preview.1):

    Fixed in: 0.4.2-preview.1

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.