I need to check for memory leaks in a .NET 3.5 XBAP application in production (i.e. not in VisualStudio). That is, launched via a URL in internet explorer e.g. http://SomeServer:9876/MyApp/MyXbap.xbap.
If I choose Profile WPF Browser Application and enter a URL, I get an error "The specific browser applicaation does not exist".
Is profiling XBAPs running in IE something that's possible ?
- Run Memory Profiler as Administrator - if I didn't do this I got error "Profiled process terminated while connecting"
- Select Profile Application
- Enter Internet Explorer as the executable: "C:\Program Files\Internet Explorer\iexplore.exe"
- Enter the URL as the command line arguments e.g. http://SomeServer:9876/MyApp/MyXbap.xbap
Note: I'm using using IE7. Another post suggests if using IE8, need to include -noframemerging before the URL.
The profiler then shows data in the Types and Real-time tabs, but the Type Details and Instance Details tabs remain blank.
Is this the correct approach to be using ?
Is there a way to get the Type Details and Instance Details tabs to populate with data ?
You should be able to attach to the PresentationHost process using the Attach command, but when I tested this, it didn't work. This is something we will look into immediately. I will get back to you when I have some more information.
Profiling Internet Explorer will not give you memory information about the XBAP application, since the actual application is run in the PresentationHost process. You do get some information related to rendering of and interaction with the application, though.
Due to the way Internet Explorer uses processes, it's a bit difficult to run it under the profiler (without getting the "Profiled process terminated while connecting" message). When you start IE,it will try to reuse a running IE "frame process". To get around this, you can use the -noframemerging parameter under IE8. I don't think this works with IE7, so you will need to make sure that all IE windows are closed before starting IE under the profiler. When you run as an administrator, there is no existing process to reuse (at the same elevation level), which explains why it worked better for you when you ran the profiler as an administrator.
You also mention that the Type details and Instance details views are empty. These views will show data when you select a specific Type or Instance in another view, e.g. by double-clicking a type in the Types view. Is the Types view still empty if you double-click a type in the Types list (or select View->Show type details)?
SciTech Software AB
I don't quite understand the instance details tab though, to know where the leak is happening (lost in the information!). I need to read up on that more to understand things.
If you have a class with new instances that you believe shouldn't exist, you can get information about why it has not been GCed by looking at the instance details. In this case you are mainly interested in the root paths of the instance, as they will tell you why the instance has not been collected. If you need help interpreting the root paths, you can attach one ore more of them to a post and I will see if I can provide you with some hints.
SciTech Software AB
Users browsing this forum: No registered users and 26 guests