Skip to content

Commit f7b5567

Browse files
committed
Fixed ComputeConnectionKey possibly causing an overflow and showing wrong connections.
1 parent ed5f4c7 commit f7b5567

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this package are documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [4.1.2] - 202?-??-??
8+
### Fixed
9+
- Fixed ```ComputeConnectionKey``` possibly causing an overflow and showing wrong connections. Thanks to Yi Ji for sending me the fix.
10+
711
## [4.1.1] - 2022-06-29
812
### Fixed
913
- Fixed that ```#C Empty Shell Objects``` detection didn't work with memory snapshots taken from a Player. Thanks to Gotmachine for the fix, see [this post](https://forum.unity.com/threads/heap-explorer-memory-profiler-debugger-and-analyzer-for-unity.527949/page-6#post-8240496) in the Unity forums for details.

Editor/Scripts/PackedTypes/PackedMemorySnapshotEx.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,9 @@ public void AddConnection(PackedConnection.Kind fromKind, int fromIndex, PackedC
359359
}
360360
}
361361

362-
UInt64 ComputeConnectionKey(PackedConnection.Kind kind, int index)
362+
ulong ComputeConnectionKey(PackedConnection.Kind kind, int index)
363363
{
364-
var value = (UInt64)(((int)kind << 50) + index);
364+
var value = (((ulong)kind << 50) + (ulong)index);
365365
return value;
366366
}
367367

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Heap Explorer is a Memory Profiler, Debugger and Analyzer for Unity. This repository hosts Heap Explorer for Unity 2019.3 and newer. For older versions, please visit the now obsolete repository on Bitbucket instead ([link](https://bitbucket.org/pschraut/unityheapexplorer/)).
44

5-
I spent a significant amount of time identifying and fixing memory leaks, as well as looking for memory optimization opportunities in Unity applications in the past. During this time, I often used Unity's [old Memory Profiler](https://bitbucket.org/Unity-Technologies/memoryprofiler) and while it's an useful tool, I was never entirely happy with it.
5+
I spent a significant amount of time identifying and fixing memory leaks, as well as looking for memory optimization opportunities in Unity applications in the past. During this time, I often used Unity's [old Memory Profiler](https://bitbucket.org/Unity-Technologies/memoryprofiler) and while it's a useful tool, I was never entirely happy with it.
66

77
This lead me to write my own memory profiler, where I have the opportunity to make all the things I didn't like about Unity's Memory Profiler better™.
88

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.oddworm.heapexplorer",
3-
"version": "4.1.1",
3+
"version": "4.1.2",
44
"displayName": "Heap Explorer",
55
"description": "Heap Explorer is a Memory Profiler, Debugger and Analyzer for Unity. You can open it from the main menu 'Window > Analysis > Heap Explorer'.",
66
"documentationUrl": "https://github.com/pschraut/UnityHeapExplorer",

0 commit comments

Comments
 (0)