VS2013: Memory profiler doesn't show anything on a specific project
Asked Answered
C

1

15

I want to use the memory profiler of the visual studio 2013 ultimate for profiling a WPF application. But there seems to be a problem: After running the profiler there is no data available/showed. I use Windows 8.1 x64

I get this error:

DA0002: It appears that the file was collected without properly setting the environment variables with VSPerfCLREnv.cmd. Symbols for managed binaries may not resolve.

The odd things are: CPU profiling works with this project and the memory profiling seems to work on other projects (I have created a new WPF project with a empty window and tested the memory profiler there and there was data shown). I have also tested the specific project on another machine with the same result (nothing was shown).

What did I also do: I used the VSPerfCLREnv to set the environment variables as said in the error message above. I have tried the solution of this question: How do I run the Visual Studio 2012 memory profiler? I'm getting the error DA0002, but the part with the VSPerfCmd does not really work (got the message that i should use the VSPerf.exe, but this did not work either).

I think that this is not a problem with the VS2013 in general, but with my project. The mentioned project on which this problem occurs is a WPF application. It includes an asynchronous socket server (based on the SocketAsyncEventArgs).

I cleaned the solution, set debug to x86, removed all unused references of the project and set the target framework from .net4.5 to .net4. Nothing changed. I have no idea why the memory profiling does not work. Maybe the buffers of the sockets are the fault of this (as they are not managed by .net)?

Carlynne answered 14/7, 2014 at 14:29 Comment(4)
After I updated to VS2013 Update 2 the memory profiling worked once (some data was shown) but after that, the error DA0002 occurred again.Carlynne
Now it's more like gambling: Some times memory profiling works, sometimes not. Roughly every fifth attempt leads to a working memory profile. My Solution: I am using now JetBrains dotMemoryCarlynne
I don't know the answer for your question, but I can warmly recommend you this tool: memprofiler.com . Unfortunately it's free for about one week of using (not one week from installation).Infamous
Is your project a VPN client? I realized my VS2022 memory profiler stops working and shows nothing as soon as a TUN/TAP driver is used/Any VPN is activated that changes network settings while the profiler is running. My guess is that MemoryProfiler uses some sort of loopback socket or something that has problems with changes in network adapter settings...Buckden
S
0

It makes me wondering that it is sometimes working. Maybe some Antivirus Software or a driver issue?

Simoneaux answered 11/6, 2015 at 19:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.