A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Editor & General Support' started by Lucas-Meijer, Oct 3, 2015.
"Memory profiling" Menu under windows Menu. I am using 5.3.8.F1
Unity 5.4.3p1, downloaded and loaded the project from the repo
First got this issue :
It was on some lines like this one :
I deleted the word and Unity seems to accept that
Android IL2CPP build on a Galaxy S6 Edge, Development Build and Autoconnnect profiler.
The app is open, USB debuging ON, I have the realtime data on the Profiler, but the "Take snapshot" on the Memory Management Windows does nothing.
@Dragonic8926 Are you sure it actually does "nothing"? I've just started using the tool yesterday (and already find it helpful). I've also created a pull request for showing progress bars: https://bitbucket.org/Unity-Technologies/memoryprofiler/pull-requests/21
Maybe that helps you already? Have you tried a relatively small scene? I've noted that in our battle scenes, it might take up to several minutes before the actual results are there, whereas in the main menu the download finished in a few seconds.
You might also want to check the log window, chances are that you are getting exceptions while crawling the snapshot.
That was a Hello World scene, so yes a "relatively small scene" ^^ !
Nothing in the debug console.
There's been an update to the profiler, have you tried the most recent version? It contains bugfixes and progress bars. Are these progress bars shown?
I'm having an issue profiling my project, all the details (with sample data) are here:
If anyone can get eyeballs on this (looking at you @Lucas-Meijer ) I would really appreciate it!
PS: This appears to be an issue with the plugin itself, I'm not trying to hijack the post
Hi, I'm trying to make the profiler run. After clicking "take snapshot" and my app freezing for a long while, nothing shows up in the window for the memory profiler like yours does. Might I be doing something wrong ?
is there a way to display the profiler data to a UI Canvas text? For example if I want to display both the actual CPU usage as a percentage and the RAM as a percentage?
Can somebody explain why its so heavily pushed that this tool is for IL2CPP? I can use it on a windows build(which only builds mono) and it seems to work fine out of the box.
It doesn't display full information on non-IL2CPP builds.
Can you elaborate on what you don't get to see? It looked pretty awesome and I was able to see all the references and amounts of memory used.
Sure. Mono/.NET scripting backends currently do not capture managed heap, so you cannot see any C# objects or references between them.
So I ran it on android built under IL2CPP and I can't seem to see any c# objects. Our code base has a decent amount of plain old c# objects that have to work outside of unity as well. I have attached a snapshot of my profiler memory capture if that helps. The screen looks just about the same as it did when I ran it connected to windows editor.
I tried to upload this but the thing errors out immediatly so I put the file on my site:
I have gone back to 5.6.3p2 and done this process and I do see all the c# objects so you can disregard that previous message. Either was a unity 2017 issue or somehow I didn't do something right.
Perhaps you accidentally had the profiler attached to the editor instead of the player?
Was this ever updated to support the Mono backend?
It's getting support in 2017.3 (apparently not for .net 4.6 yet though?)
Apparently this was added by a commit from an hour ago
Is the memory profiler only available in pro?
The tool is available as a separate project only, not included in Unity, and works with Unity Personal/Plus/Pro.
You can download the Memory Profiler here:
I have tested the profiler and I'm encountering these two issues, which are blocking my progress.
Is there any timeline for improving the profiler?
Any chance this ever works on Mono backend? On 2017.3+ and OSX build, the memory profiler causes the spp to crash as soon as you click Take Snapshot. I know above you mention that it's for il2cpp only, but I can't really make a mobile build.
Would be nice to be able to see large memory allocations and track them. Critical, in fact.
Report a bug if you see crashes. We'll look at them.
I am also getting crashes with the memory snapshots. At first I thought it wasn't a crash as I had done a snapshot of my game while in the main menu and it froze for around 15 minutes until it produced the snapshot so I assumed a snapshot of the game running would take even longer (although this time was already absurd) but after several hours it never recovered.
Do you know when or If you will support Mono for .NET 4.5?
Is this still active? I hope so. The bitbucket hasn't been updated since October, which is a bit worrying, but it's already very useful.
Hello, is there any progress on the profiler? The capture doesn't work for our game, both in-editor and in-build, with the bitbucket looking dead (apart from people submitting their issues).
I guess no one is working on this any more? Snapshots are broken for device builds made with 2017.3
Hi @Lucas-Meijer or @Tautvydas-Zilys
Any idea why taking a snapshot from an Xbox build with Il2CPP scripting backend won't work?
We get this warning in the console: Sending message header failed
The Profiler can connect just fine and and I take memory samples, but taking a memory snapshots with the new memory profiler won't work at all.
The game is built with Unity 2017.1.3.p1 and the memory profiler project from Bitbucket is on the same version.
I also get a crash when snapshotting on iPhone 6S connecting with usb cable.
I am using Unity 5.6.5p3. From Xcode console, I got the EXC_BAD_ACCESS error,
and the callstack was:
Would be a great help if it could be fixed in the future.
Some objects are never released, even though the profiler says they're no longer referenced by anything. I don't know if this is a bug with the profiler, or with Unity itself. I've called Resources.UnloadUnusedAssets multiple times and the objects still show up in the profiler.
So I'll ask again, is this abandoned? Are there any plan to finish and or improve it?
Or is this another one of those "OMG IT'S STARTING TO GET USEFUL, LET'S SILENTLY ABANDON IT" Unity features that I see a lot these days?
It's not abandoned. Did you report bugs about the issues you're facing?
(Case 1034172) PackedMemorySnapshot: "typeDescriptions" array is empty
(Case 993250) PackedMemorySnapshot: RequestNewSnapshot causes Player to crash
(Case 987987) PackedMemorySnapshot: "managedHeapSections" do not match stats in Profiler
(Case 987839) PackedMemorySnapshot: Unexpected connections between native objects
(Case 984330) PackedMemorySnapshot: Type contains staticFieldBytes, but has no static field
(Case 975832) 2017.3: PackedMemorySnapshot: Missing connections between native objects
Our team has been modifying the tool to suit our needs. It doesn't contain bugfixes of any kind besides that the line endings are now consistent, but several nice features have been added.
Changes compared to the official repository:
- Added spreadsheet view (as alternative to the default treemap view)
- Added filters (to find what you're looking for more quicky)
- Added back & next button
- Changes to the user interface slightly for consistency
- Removed unused code
- Removed dependency on Json.Net
- Dropped support for memsnap3 (dependent on Json.Net)
If someone is dependent on memsnap3 files, we can write a tutorial to help you convert the memsnap3 files to memsnap2. These memsnap2 files can also be opened with unity's official memory profiler.
Our memory profiler modifications are available here:
We're still working on removing even more unused code, and refactoring the code to make it more consistent and understandable.
If you're looking for an alternative to Unity's Memory Profiler, I have good news. I just made Heap Explorer available for free, which is superior in many ways to Unity's Memory Profiler.
You can download the tool from this forum thread:
Amazing work! Shame this feature is being developed at a glacial pace, happy that you've put together a feature packed alternative!
This tool is super useful, is there a chance it will get integrated into Unity anytime soon?
Is the memory profiler supposed to capture editor-only static fields?
I'm trying to use it to debug memory usage for my Asset Store tool, which in the Profiler shows 400 MB of managed memory in use, but in the Memory Profiler only shows about 30 MB.