Problems profiling Silverlight 4 application w VS 2010 Ultimate. Crashing browser
-
Thursday, June 03, 2010 8:58 AM
Hi I am having a few issues whilst trying to profile a Silverlight 4 application using the methods descibed here:
http://www.nachmore.com/2010/profiling-silverlight-4-with-visual-studio-2010/
and here:
http://blogs.msdn.com/b/mgoldin/archive/2010/04/26/vs2010-silverlight-4-profiling.aspx
I have serious problems with IE8 crashing constantly when trying to profile my application. I have successfully managed to capture around 900 samples of useful profiling data before the crash, including line references to all my code etc. However sometimes it crashes after only a few (<20) samples.
IE crashes when I start my application (using the command line: VSPerfCmd /start:sample /output:MyFile /attach:<PID of iexplore.exe process> I've also tried the syntax that launches the SL app in the browser, and attaches in one step, but the result is no different - crashy browser) I'm using VS2010 10.0.30319.1 RTMRel, and developer version 4.0.50401.0 of the SL plugin. Version 8.0.7600.16385 of Internet Explorer, running on Win 7 Version 6.1 (Build 7600). I've applied the reg fix to disable multiple tab processes in IE.
Further to this I have tested on a different, smaller SL application and I can click around it no problem, and the browser does not crash. I'm then able to examine the .vsp in vs 2010 as expected.
The larger application I have (the problematic one) has many projects with dependencies in the SL client solution, so I am unsure how best to collect the assemblies required (so that they reside in the current directory as described). I have tried unzipping all those contained in the xap file, and also merging everything from all the projects Bin directories into a single location. I have then run the described process from that location, but I still get the same crashing browser! Something to note is that the application started life as an SL2 application, which has been upgraded over time. It also makes a large number of WCF calls.
I’ve run out of ideas at the moment and I really need to sort out the perf issues in our application urgently. Any suggestions much appreciated.
Many Thanks
Gareth
All Replies
-
Friday, June 04, 2010 4:51 AMModerator
Hello Gareth,
Thanks for visiting MSDN forums!
Please relax, take it easy. Our community members and I will provide you some hints to trouble shoot the issue and help you out.
I noticed that there are add-ins for IE8, would you please disable the add-ins for IE? To disable add-ins for IE, you could either run IE with No Add-ons (Start -> All Programs -> Accessories -> System Tools -> Internet Explorer (No Add-ons)) or open IE Add-on Manager (Tools -> Manage Add-ons) to disable them. Besides, please try to reset the settings for IE8 to default settings. For more methods to trouble shoot IE, please refer to: http://support.microsoft.com/kb/967897
According to your test (crash issue does not happen on a small silverlight project), it seems this issue only happens on a particular large project. How about it if you run the project without profiler attached. Does IE crash too?
Based on my understanding, there are many kinds of projects in a single solution (silverlight, WCF, etc...) and you wanted to profile the silverlight web project only(please correct me if i missunderstand you). How about it if we follow up the wizzard in VS2010 and add the web project as the target project? The wizzard could be found under Analyze menu of VS.
Best regards
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback, please tell us.
Welcome to the All-In-One Code Framework! -
Friday, June 04, 2010 8:55 AM
Hi Roahn
Thanks for taking the time to reply.
I've tried running IE without add-ins, but this also disables the Silverlight plugin, so I don't see how this will resolve my issue.
The large project is in production, it only crashes the browser when I try to run whilst capturing profile data, with e.g.
VSPerfClrEnv /sampleon
VSPerfCmd -launch:"c:\Program Files (x86)\Internet Explorer\iexplore.exe" -args:""... so it's a problem with IE itself, the profiler, or something I'm doing wrong :(
The solution I am working on is only for the Silverlight client part of the application (we have other devs who are working on the backend/ WCF), and is comprised of 15 (!) silverlight projects, and a silverlight web project. I'm not trying to profile any of the backend (server side) code - just the silverlight client app. Don't ask me why there are so many projects - I have taken on the application recently. However, as I understand it all of the required assemblies are combined into the same .xap file, so I think that unzipping them into a folder should work.
Thanks
Gareth
-
Friday, June 04, 2010 5:53 PMModerator
Hi Gareth,
when you use VSPerfCmd, you have an option to control frequency of samples through /timer. By default it is set to /timer:10000000 (which means 10M NonHalted CPU Cycles). If you increase that number, you get less samples. If you decrease it - samples come more frequently. Can you please try to manipulate with it and see if it gives you any change? I wonder if some specific functionality in your SL application uncovers an issue between SL and profiler, and changing the samples frequency will allow you to skip it (after all, Sampling is a statistical approach).
We contacted SL team for that issue.
Thanks!
Maxim.
Maxim Goldin [MSFT]- Marked As Answer by Gareth Watt Tuesday, June 08, 2010 7:41 AM
-
Tuesday, June 08, 2010 7:32 AM
Hi Maxim
Thanks for the suggestion. I decreased the sampling frequency as you suggested with the /timer switch on VSPerfCmd and the application now runs for much longer before the crash. Please update the thread with any more updates from the SL team.
Kind Regards
Gareth
- Marked As Answer by Gareth Watt Tuesday, June 08, 2010 7:41 AM
-
Sunday, July 18, 2010 2:57 PMIs there any update on this? I'm experiencing exactly the same problem. Have you solved the issue?

