Page 1 of 1

I can not profile WPF application

Posted: Thu Sep 02, 2010 7:51 pm
by jbonzo
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?

Re: I can not profile WPF application

Posted: Sun Sep 05, 2010 8:56 pm
by Andreas Suurkuusk
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.

Re: I can not profile WPF application

Posted: Tue Sep 07, 2010 4:26 pm
by jbonzo
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?

Re: I can not profile WPF application

Posted: Wed Sep 08, 2010 1:15 pm
by Andreas Suurkuusk
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.

Re: I can not profile WPF application

Posted: Mon Sep 13, 2010 9:04 pm
by jbonzo
This happens in the standalone profiler as well.
I will be sending the log files now.
Thanks for you help.

Re: I can not profile WPF application

Posted: Tue Sep 14, 2010 3:26 pm
by Andreas Suurkuusk
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.

Re: I can not profile WPF application

Posted: Tue Sep 14, 2010 4:14 pm
by jbonzo
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.

Re: I can not profile WPF application

Posted: Wed Sep 15, 2010 8:17 pm
by Andreas Suurkuusk
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.