I can not profile WPF application

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
jbonzo
Posts: 4
Joined: Fri Aug 13, 2010 5:08 pm

I can not profile WPF application

Post by jbonzo » Thu Sep 02, 2010 7:51 pm

In Visual Studio 2010, when I go to Profiler -> Start Memory Profiler I get a "The profiled process has been terminated." error box after a few seconds. This seems to happen with any WPF application, even a brand new project. What am I doing wrong?

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Re: I can not profile WPF application

Post by Andreas Suurkuusk » Sun Sep 05, 2010 8:56 pm

When you get the "The profiled process has been terminated" message, I assume that the WPF application has actually been terminated. Is that correct? Since it happens even on newly created WPF project, there might be some problems with the installation. To make sure that you have a correct installation, I recommend that you reinstall the latest version of .NET Memory Profiler software by performing the steps below:
  1. Close all Visual Studio windows and all Visual Studio help windows
  2. Uninstall .NET Memory Profiler
  3. Restart the computer, to make sure that there are no pending installations/uninstallations.
  4. Download the latest version of .NET Memory Profiler (it can be downloaded from http://memprofiler.com/download.aspx).
  5. Reinstall .NET Memory Profiler
If it is still not possible to profile a WPF application, please get back to us.
Best regards,

Andreas Suurkuusk
SciTech Software AB

jbonzo
Posts: 4
Joined: Fri Aug 13, 2010 5:08 pm

Re: I can not profile WPF application

Post by jbonzo » Tue Sep 07, 2010 4:26 pm

Yes, the WPF application is actually terminated. I tried doing as you instructed, but the problem remains. Would an anti-virus program be a problem?

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Re: I can not profile WPF application

Post by Andreas Suurkuusk » Wed Sep 08, 2010 1:15 pm

Does this also happen if you profile the WPF application using the standalone profiler (using the Profile Application command), or is it only when using "Start Memory Profiler" in Visual Studio?

To get more information about why this problem occurs, it would be good if you could send us log-files from the profiler. To create the log-files you need to use the standalone profiler and supply the "/log:<path>" command line argument, e.g. by using the following Run command:

"C:\Program Files\SciTech\NetMemProfiler3\NetMemProfiler.exe" /log:c\MemProfilerLogs

This will create a set of log-files in the c:\MemProfilerLogs folder. If you send the log-files to support@scitech.se, we will take a look at them as soon as possible.
Best regards,

Andreas Suurkuusk
SciTech Software AB

jbonzo
Posts: 4
Joined: Fri Aug 13, 2010 5:08 pm

Re: I can not profile WPF application

Post by jbonzo » Mon Sep 13, 2010 9:04 pm

This happens in the standalone profiler as well.
I will be sending the log files now.
Thanks for you help.

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Re: I can not profile WPF application

Post by Andreas Suurkuusk » Tue Sep 14, 2010 3:26 pm

Thanks for the log-file. The log file (ProfilerClientLog.txt) shows that the profiled application terminates shortly after it was started, but it doesn't provide any info from the profiled process. Much more detailed information is provided in the file ProfilerLog.txt, which should be created if you provide the /log command line argument. Can you find this file? If so, please e-mail it to support@scitech.se.
Best regards,

Andreas Suurkuusk
SciTech Software AB

jbonzo
Posts: 4
Joined: Fri Aug 13, 2010 5:08 pm

Re: I can not profile WPF application

Post by jbonzo » Tue Sep 14, 2010 4:14 pm

Sorry about that. That was the only file created when I ran it before, but now that I am running it again in a different folder it has 3 files (AssertLog, ProfilerClientLog, and ProfilerLog). I'll be sending them shortly.

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Re: I can not profile WPF application

Post by Andreas Suurkuusk » Wed Sep 15, 2010 8:17 pm

Thanks for the log-files. Apparently the profiled process terminates while the profiler is trying to retrieve information about a loaded Type, possibly due to an exception in the runtime. To get more information about this we will need to add some additional logging to the profiler. I will get back to you when we have a new build with more logging available.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests