9

I am profiling my C# WinForm project in VS 2010, SP1. IDE crashes after profilig is finished and analyzing is done, but results are not yet displayed. I can manualy process my report by cmd: >VSPerfReport.exe /summary:all "Report111229(4).vsp" but i would like to get analysis results in VS also, .csv files generated by tool are not so nice. Interesting is that VS will crash when I use Instrumentation and Sampling, but not when I use Concurrency. Some ideas or advices how to fix this?

5
  • I've found this part of Visual Studio unreliable when analysing large logs. Dec 29, 2011 at 12:56
  • @watbywbarif I have the same issue, and can reliably recreate this even with really small logs. Some people seem to be able to trace it to some; more specific; underlying error but I can't figure out how.
    – JoeGeeky
    Jan 3, 2012 at 11:07
  • You should report the bug to MS, just in case they're not aware of it. Jan 15, 2012 at 11:39
  • Will do as soon as bounty is over and no solution found. Jan 16, 2012 at 16:24
  • 1
    Same issue here with profiling C++ in Visual Studio 2012...
    – digory doo
    Oct 1, 2013 at 13:38

3 Answers 3

3
+50

Some people are able to get around this using one of four techniques.

  1. disabling all visual experience options in VS 2010 by deselecting the option in Tools --> Options --> Environment --> General | Visual Experience

  2. disable HW Acceleration for WPF by setting the registry value HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics\DisableHWAcceleration to 1

  3. disable the Concurrency option Collect resource contention data

  4. select Enable source server support in Tools --> Options --> Debugging --> General

These all stink but may work long enough to allow you to do what you need

4
  • Thx, I will try this after holidays. Jan 3, 2012 at 11:20
  • 2. HW Acceleration was already disabled for Visual studio in 1. so I don't see how this could help? Also I don't have Avalon.Graphics key in registry Jan 10, 2012 at 15:55
  • 3. This is important only for Concurrency, and Concurrency works OK for me, crashes occur only in Sampling and Instrumentation. Jan 10, 2012 at 15:56
  • Well, this did not help me, but you made some effort, so +50. Jan 18, 2012 at 16:04
1

Try excluding the Performance file from source control

What resolved the problem for me was excluding the Performance file (e.g. Performance.psess) from source control (in our case TFS) and ensuring that none of the .psess and .vsp files are marked read only.

I hope this helps someone else too.

3
  • This did't help neither. I am using svn and .vsp is not managed by subversion nor is marked as read-only. But thx, maybe this will help someone else. Apr 10, 2012 at 7:01
  • 1
    @watbywbarif - in addition, you may want to try waiting for say 5 seconds before stopping the profiling (do it from VS, not by closing the app) and then wait again before you try to produce the report. This appears to reduce the number of times the crash occurs.
    – Chris
    Apr 11, 2012 at 17:14
  • I was finally able to do Instrumentation profiling by pausing the profiler just after the application has launched, then navigate to the exact place that needs to be profiled, resuming the profiler, and exiting by hitting 'Exit' in the profiler.
    – digory doo
    Oct 1, 2013 at 13:41
0

another workaround that helped me (MSVS2013) is to open another instance of visual studio, and debug->attach to the first visual studio process, called devenv.exe. After that, open the profile file in the first studio instance.

Go figure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.