Visual Studio CPU Profiler / No Data - visual-studio

Today my CPU Usage Performance profiler in Visual Studio stopped working. I start it, it seems like it's working, you can see the graph of the CPU going up and down but when it finishes I get no data with the message:
"There is no data in the current set of filters."
I have tried every combination of categories and filters with no luck. I restarted Visual Studio, I rebooted the workstation, I tried against a new hello world project. Other performance tools seem to work (e.g. the .NET Object Allocation Tracking tool works). To (try) to rule out that it was something specific in my project I was able to successfully run it on a 2nd workstation against the same set of code. I have also run VS without extensions and also in regular mode after disabling everything I've added in (like ReSharper).
Edit: Additionally I just found this in the Windows Event Viewer.
System.Runtime.InteropServices.COMException: The method or operation is not implemented., System.Object get_Value()
at EnvDTE.Property.get_Value()
at Microsoft.VisualStudio.PerformanceTools.ProjectTarget.LoadBinaryProject(IVsHierarchy hier)
at Microsoft.VisualStudio.PerformanceTools.ProjectTarget.LoadProjInfo()
This also just popped up in the Event Viewer under "Windows Error Reporting" that referenced a Watson VSTelem.Out error:
Fault bucket 125730739576, type 5
Event Name: PerfWatsonVS12Data
Response: Not available
Another oddity is, I just ran a profile session for maybe 20 seconds, however when it's done VS says "Diagnostic session: 127:47 minutes" which would be the about the time I first time I tried it this morning if it never stopped. I did a repair of Visual Studio from the installer and the profile worked for 1 session after, the 2nd session then reverted to the aforementioned behavior again.
I'm currently using:
Visual Studio 16.8.5 16.9.1 16.9.2 16.9.3 16.9.4 16.11.2
.NET Core SDK: 5.0.201
Windows 10 Version 2004 Build 19041.867
Any thoughts on fixes?
Edit: According to the following link, it might be related to a Windows Update and a bug in my NVidia driver:
https://developercommunity.visualstudio.com/t/no-data-in-cpu-usage-tool-windows-update-related/1384519

Microsoft confirmed the problem, as soon as a solution or workaround is found - report it. Follow the forum https://developercommunity.visualstudio.com/t/profiling-cpu-still-states-no-user-code-was-runnin/607535?from=email&viewtype=all#T-ND1373491

Related

Visual Studio error on new project creation

Situation.
I have Web developer Express Studio 2008 installed on my system.
Until recent windows update it worked fine, but about 2 weeks ago it start giving me an error every time I attempt to create any new project. Screen shot of an error below:
Express 2008 error
I did try to do windows restore to point before update and it did not worked.
As a next step I installed Visual Studio 2010(same result) and VS 2015 same result but a bit more descriptive error. Screen show below.
VS 2015 error
But there is no clear information on Microsoft MSDN forums about this error or how to fix it.
I did try to do reset(devenv.exe\resetsettings) but so far no luck.
Any idea what is going on and how to fix this?
Right now I can not create ANY new project and some of older projects are not opening as well. There is no system of or any kind of similarity between projects which opens or not.
This is a fairly vague error as the dll in question isn't listed here and 0x8007045a is just the error code for this dll initialization error. As a next step in troubleshooting to find the issue (outside of a windows repair) I'd go ahead and run Process Monitor and watch the file system activity for Visual Studio (once you see devenv.exe show up, right click on it and include just that process.
There's a blog post with some troubleshooting steps here but really though, you need to find which library is the culprit to track down what you'll need to reinstall (likely from a system or shared library side).

Parameter name Type ISession cannot be resolved when debugging in Visual Studio 2015

Started getting a new error when starting a debugging session in VS2015. It's an ASP.NET MCV project that also exposes a WCF service (don't know if that's relevant).
The debugging session takes ages to start up and then I get a message box saying:
Specified argument was out of the range of valid values.
Parameter name: Type ISession cannot be resolved. Interfaces of
abstract classes should be registered first.
After that the debugger works as expected.
If I do the same thing from VS 2013 then it takes a long time to load but I get a message saying:
Loading symbols for WebActivatorEx.dll from:
d:\Code\GitHub\WebActivator\WebActivator\obj\Debug
This is strange because I haven't knowingly installed WebActivator and my D: drive is a DVD that I haven't opened since I got the PC.
Yesterday I installed OpenCover, but it didn't work so I removed it.
Anyone out there who might have an idea of what's going on???
Thanks
I had the same problem in my local workstation while my colleague was able to debug and run his web application fine. The said error message was thrown from visual studio 2015, but application used to launch fine and run. This was happening only in debug mode (either with "Start debugging" - F5 or debug mode of the project). The other side effect was that this problem was not occurring for the very first time after every system restart.
This thread along with the link How do you clear your Visual Studio cache on Windows Vista? and the link https://blogs.msdn.microsoft.com/willy-peter_schaub/2010/09/15/if-you-have-problems-with-tfs-or-visual-studio-flush-the-user-cache-or-not/ pointed me in right direction.
I was finally able to resolve the issue by clearing the contents from the following three directories on my local workstation:
a) <System drive>:\Users\<user id>\AppData\Local\Microsoft\Team Foundation
b) <System drive>:\Users\<user id>\AppData\Local\Microsoft\VisualStudio
c) <System drive>:\Users\<user id>\AppData\Local\Microsoft\VSCommon
The resolution makes me think on the lines of the accepted response provided with the first link above. There Visual Studio and Team Explorer cache might have gone out of sync. Hope this answer helps people facing similar issues.

Error message in VS2013 Ultimate edition

I'm getting the following error message
Cannot access a disposed object. Object name: 'MarshalingWindowFrame'.
This message came when I tried to load a SLN file into VS2013.
What is the reason?
I am using VS2013 Ultimate with Update 4 on Windows8.1 pro x64 bit OS (8GB RAM, 500GB HDD)
If you get that when opening a solution, either an addon is bugging out or (worse, but less likely) you found a bug in VS itself. Try safe mode and see if that helps.
If however you get the error when opening a form rather than the solution itself (remember opening a solution loads the various forms), there's a bug in an user control that's trying to access a disposed object. Remember that user controls run as binaries when hosted in VS, so make sure you put actual code inside guards that require you not to be in design mode.
Was that project created in the earlier versions or in the Visual Studio 2013 Preview? Because, if you update this project from Visual Studio 2013 Preview, you have to check the update procedure (http://blogs.msdn.com/b/lightswitch/archive/2013/08/12/upgrading-your-lightswitch-projects-raghuveer-gopalakrishnan.aspx) first, perhaps it can give some hints why this happens.

can't start visual studio profiler

I have VS 2010 Ultimate. I have created empty win32 console solution and replaced it's cpp file with http://pastebin.com/EQJKJK6T I tried to perform CPU Sampling profiling. But for some reason I get the following messages
MessageBox:
Could not launch 'path to exe file'. Previous attempt to profile the
application finished unsuccessfully. Please restart the application.
Output window:
Profiling started.
Warning VSP2355: Some Windows counters will not be collected. Without this data, some performance rules may not fire.
Profiling process ID 4368 (test).
Process ID 4368 has exited.
Data written to e:\projects\test\test101224.vsp.
Profiling finished.
PRF0025: No data was collected.
Profiling complete.
I had this issue, yet bizarrely it only affected one Visual Studio solution. Using the profiler with another Visual Studio solution worked fine.
I tried:
disabling Symantec
uninstalling VMware Player (as mentioned above)
but neither worked.
In the end I amended the registry, setting HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SysPlant\Start to 4 and rebooted, it then started working.

Visual Studio 2010 crashes repeatedly

I've been running Visual Studio 2010 (the official release) for some time now. Lately, VS will crash 10+ times during my 8 hour work day. In VS2008, crashes were common when working with large Xaml files, and while I experience some of that with VS2010, crashes occur when debugging, starting the debugger, stopping the debugger, and other random times when editing code.
I've looked through the problem reports, and the one I've found that occurs most frequently is:
Description
Faulting Application Path: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
Problem signature
Problem Event Name: APPCRASH
Application Name: devenv.exe
Application Version: 10.0.30319.1
Application Timestamp: 4ba1fab3
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7600.16385
Fault Module Timestamp: 4a5bdb3b
Exception Code: c0000005
Exception Offset: 0002e23e
I'm running Windows 7 (x64). Hoepfully someone has come across this problem and has found a solution. I plan on reinstalling VS2010. Hopefully that takes care of the problem.
Do you think you have installed any extra Extensions which might lead to frequent crashes?
You can try
Devenv.exe /SafeMode
to start in Safe mode. You can also try
Devenv.exe /Log
Which will log all activity. Have not tried this so don't know What activities are logged.
Visual Studio 2010 Command Line Switches
I was having a similar problem and this helped me
http://connect.microsoft.com/VisualStudio/feedback/details/618802/visual-studio-random-frequent-crash
Running this from the command prompt seemed to fix it. It hasn't crashed for the whole day today.
regsvr32 c:\Windows\System32\ole32.dll
I had similar issues with Visual Studio. The problem was the service pack which for some reason was not installed properly.
I had to reapply the SP1 using the Repair / reapply option. This kind of fixed my issue.
Also make sure to reboot the system.
Just to help people who search it: It was webex instant messenger related part, but not Cisco itself. The cause was a component in Studio Power Tools relevant to integration with messenger. Reinstall power tools but without messaging integration.
In other occasion it is almost always a corporate antivirus authentication helper thing. It required to manually remove registry entries which cause background TFS logins break the studio at random moments.
I had the "Microsoft Visual Studio 2010 has stopped working" error, imediately when Visual Studio 2010 was starting. Fault module was clr.dll in my case. Only rebooting helped sometimes.
I solved it by removing .NET completely and reinstalling it.
Be aware that if you updated to .NET 4.5 this includes .NET 4, so you have to remove and reinstall .NET 4.5
I know why it could be crashing. Code it self. Have you tried to debug the failed instance of VS2010 with Vs2010? If the xaml designer crashed anywhere in your code you should be able to see the stack trace. Also, try to load the same xaml into Blend 4 and then run the vs2010 on Blend when that crashes. I've had some good results debugging Vs2010 crashes like that.
There are so many things that can cause studio to crash.
I'd look at everything from video card drivers to whether the RAM is stable.
Note, there is a microsoft connect but on this exact issue at: http://connect.microsoft.com/VisualStudio/feedback/details/634162/devenv-exe-frequent-intermittent-crashes-fault-module-name-ntdll-dll
You might vote on it or add your own information to the report but the very first thing I'd do is update my video drivers. One place I was at had a lot of issues with 2005; it would randomly crash just displaying the design surface or when opening a few too many code files; but once we got decent video cards and the appropriate drivers installed it worked flawlessly.
I disabled “Options"-"Evnironment"-"Add-in/Micros Security"->"Allow macros to run", and fixed the problem.
I think I just solved a similar issue on my computer, but probably not the same cause. It was related to TortoiseSVN (I think visual loads the tortoise DLL because it is integrated with the explorer, even if I don't have a specific visual studio plug-in). I upgraded TortoiseSVN (from 1.7.8 to 1.7.11) and it didn't crash for a few hours (I also had a 100% repro case when closing visual studio which does not happen anymore). Maybe there is some way to check what DLLs are loaded by visual studio to troubleshoot what are the candidates for upgrading/uninstalling, but I didn't go this far.
Hope it can help someone else.
While developing C++ code, Visual Studio 2010 started crashing frequently and at random times after I enabled the Task List.
As an alternative to using the Task List, I am now simply using the Find in Files tool (Ctrl+Shift+F) and searching for the string TODO as an alternative.
i was having a similar problem. visual studio 2010 was crashing. when i attached, it said it had a read access violation in ntdll.dll
closed all my open instances (there were 5) and it stopped happening.
Today I had this error, in my case it was because Microsoft released the update (KB2858725) the FrameWork 4.5.1, which the download and installed,
However this is definitely addressed by performing the following steps:
FrameWork 4.5.1 download (KB2858728) => NDP451-KB2858728-x86-x64-ENU.exe-Allos
http://www.microsoft.com/en-us/download/details.aspx?id=40779
Install the downloaded software (KB2858728)
Try Vs, but give the same error.
Uninstall the downloaded software (KB2858728)
(this task fully cleaned upgrade giving problems (KB2858725)
Install the downloaded software (KB2858728) again
Try Vs, this time if it will work
NOTE: NEVER! install update (KB2858725)
Logging helps indeed. I have the same problem with crashes. Since there could be numerous reasons and lots of log data, I wrote this .bat (Win7 x64, VS2010 Express) to keep logs organized and easy to analyze:
#echo off
rem date and time in format YYYYMonDD_hhmmss
set year=%DATE:~-4%
set month=%DATE:~3,2%
set day=%DATE:~0,2%
IF %month%==01 set monthstr=Jan
IF %month%==02 set monthstr=Feb
IF %month%==03 set monthstr=Mar
IF %month%==04 set monthstr=Apr
IF %month%==05 set monthstr=May
IF %month%==06 set monthstr=Jun
IF %month%==07 set monthstr=Jul
IF %month%==08 set monthstr=Aug
IF %month%==09 set monthstr=Sep
IF %month%==10 set monthstr=Oct
IF %month%==11 set monthstr=Nov
IF %month%==12 set monthstr=Dec
set now=%TIME:~0,-3%
set now=%now::=%
set now=%now: =0%
set now=%year%%monthstr%%day%_%now%
start "VS2010 express" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe" /Log "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VSlogs\VS_log_%now%.txt"
I had the same problem. I cleared my settings. Configured environment to use C# development settings. Then i disabled all extensions against which disable button was present. I enabled them one by one while opening, running and closing solutions. I found the offending extension to be .Net reflector v 8.5.0.179 by red gate. I had VS2010, VS2012 and VS2013 all installed on my windows 8.1 enterprise 64bit. All of them had the same issue. Whenever i closed the solution VS would crash. Hope it helps.

Resources