Search Issue Tracker
Fixed in 2020.1.X
Fixed in 2018.4.X, 2019.4.X, 2020.2.X
Votes
0
Found in
2018.3
Issue ID
1297955
Regression
Yes
[Profiler] Hierarchy randomly hides parts of the sample hierarchy if Editor Only Samples are present and set to be Collapsed
How to reproduce:
1. Open any Unity Project
2. Open the Profiler Window (Ctrl/Cmd +7)
3. Load in the Attached profiler data file
4. Got to frame 1, Select the CPU Usage Profiler Module and set it to Hierarchy view
5. Sort the samples in the Hierarchy view by Name
5. Look for this sample (path notation):
PlayerLoop / Update.ScriptRunBehaviourUpdate / BehaviourUpdate / EditorOnlySample.Update() / Update 1057
6. Notice that it doesn't have any child samples, unlike it's similarly named siblings
7. In the far right end of the Hierarchy view's toolbar, click on the three dots kebab-menu (cogwheel pre 2019.3) and toggle off "Collapse EditorOnly Samples"
8. Find the sample again and see that it has child samples now.
The code causing this Profiler data has been attached but basically it 1000 GameObjects spamming Editor Only Samples by triggering the GetComponent NullCheck
Profiler.BeginSample("Update " + (i++));
var nonExisting = GetComponent<RectTransform>();
nonExisting.GetSiblingIndex();
Profiler.EndSample();
so each of these samples should have the same kind of child samples.
Expected result: The Profiler shows that all "Update X" have a similar structure of child samples. "Collapse EditorOnly Samples" only affects samples that are then renamed to clarify that they are Editor Only samples, that have been collapsed.
Actual result: The Profiler wrongfuly collapses some non-editor-only "Update X" samples and thereby hides its child samples.
Reproducible with: 2018.4.20f1, 2019.4.16f1, 2020.1.16f1, 2020.2.0b14, 2021.1.0a6
Not reproducible with: 2018.2 (Collapsing Editor Only samples was only introduced in 2018.3), 2021.1.0a7 (was already fixed)
Note: there are several other "Update X" samples affected, e.g. "Update 1074" "Update 1441" "Update 1724"
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
- Crash on TextCore::OTL_TableReader::GetOpenTypeLayoutTables when using Japanese Font as TMP Fallback
- TreeView.AddItem performance regression when opening EditorWindow
- Shadows are not visible in Player when using DX12 with Forward+ or Deferred+ rendering in URP
- Rendering Debugger Playmode debug UI scrolling is jittery when using click and drag to scroll
- Frame Debugger Target Selection Search Results window becomes too tiny to even see the default “Editor” selection when there are no search results
Resolution Note (fix version 2020.1):
Fixed in: 2020.2.3f1
Resolution Note (fix version 2020.2):
Fixed in: 2020.2.2f1
Resolution Note (fix version 2019.4):
Fixed in: 2019.4.18f1
Resolution Note (fix version 2018.4):
Fixed in: 2018.4.31f1