Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 Tries to Access Optical Drive After Debug Finished

I recently installed Microsoft VS 2105 Professional (Update 3) on a new computer and I experience a strange behavior. Whenever I try to debug a program, the moment I stop the debugger it tries to access my DVD drive that is both strange and very annoying. Other than my usual daily projects, I tried that with clean "Hello World" style C++ and C# projects and it continues to behave the same.

I have disabled the diagnostic tools (Tools->Options->Debugging->disable Enable Diagnostic Tools while debugging) and also run the VS in safe mode (devenv /SafeMode) but the problem persists. I used "Process Monitor" to identify the program that triggers access to the DVD drive and apparently "StandardCollector.Service.exe" is the culprit. You can find the log from Process Monitor down below (I removed time and PID columns). I know there have been some reported issues (memory) with this particular process (StandardCollector.Service.exe) but why it tries to create/access a file on my DVD drive is a mystery to me. My OS is Windows 10 Home Edition. Can anyone suggest any diagnostic or solution for this problem?

This behavior happens only by Visual Studio upon stopping the debug process and not any other program (Windows does the same upon start-up but I think that is natural). I need to add that if I disable and then enable the DVD drive from Device Manager, the problem goes away (no access to DVD drive when the debugging finished) but it re-appears again after 1-2 minutes.

************************************ LOG FROM PROCESS MONITOR:

StandardCollector.Service.exe IRP_MJ_CREATE H: SUCCESS Desired Access: Generic Read/Write, Dis"Apple-tab-span" style="white-space:pre;"> IRP_MJ_CREATE H:\ INVALID PARAMETER Desired Access: Synchronize, Dis"Apple-tab-span" style="white-space:pre;"> IRP_MJ_DEVICE_CONTROL H: FAST IO DISALLOWED Control: IOCTL_SCSI_PASS_THROUGH_DIRECT StandardCollector.Service.exe IRP_MJ_DEVICE_CONTROL H: SUCCESS Control: IOCTL_SCSI_PASS_THROUGH_DIRECT StandardCollector.Service.exe IRP_MJ_DEVICE_CONTROL H: FAST IO DISALLOWED Control: IOCTL_DISK_GET_DRIVE_GEOMETRY StandardCollector.Service.exe IRP_MJ_DEVICE_CONTROL H: NO MEDIA Control: IOCTL_DISK_GET_DRIVE_GEOMETRY StandardCollector.Service.exe IRP_MJ_DEVICE_CONTROL H: FAST IO DISALLOWED Control: IOCTL_STORAGE_QUERY_PROPERTY StandardCollector.Service.exe IRP_MJ_DEVICE_CONTROL H: SUCCESS Control: IOCTL_STORAGE_QUERY_PROPERTY StandardCollector.Service.exe IRP_MJ_DEVICE_CONTROL H: FAST IO DISALLOWED Control: IOCTL_CDROM_GET_CONFIGURATION StandardCollector.Service.exe IRP_MJ_DEVICE_CONTROL H: SUCCESS Control: IOCTL_CDROM_GET_CONFIGURATION StandardCollector.Service.exe IRP_MJ_DEVICE_CONTROL H: FAST IO DISALLOWED Control: IOCTL_SCSI_PASS_THROUGH_DIRECT StandardCollector.Service.exe IRP_MJ_DEVICE_CONTROL H: SUCCESS Control: IOCTL_SCSI_PASS_THROUGH_DIRECT StandardCollector.Service.exe IRP_MJ_CLEANUP H: SUCCESS StandardCollector.Service.exe IRP_MJ_CLOSE H: SUCCESS

like image 468
user2723342 Avatar asked Nov 26 '16 00:11

user2723342


2 Answers

You could disable the Standard Collector Service with following steps.

  1. Download a Windows Service Manager from this link: http://tools.sysprogs.org/srvman/
  2. Find the Visual Studio Standard Collector Service using the Service Manager UI. The Name of the service is "VSStandardCollectorService140".
  3. Select the VSStandardCollectorService140 service in Server Manager and click the Properties button in the UI to disable this service. enter image description here

Now no matter when starting debug or stop debugging, this service could not be started.

like image 99
Weiwei Avatar answered Jan 04 '23 16:01

Weiwei


VS2019

You don't have to install anything. Just do the following:

  1. ⊞ Win + R
  2. services.msc
  3. Find Visual Studio Standard Collector Service
  4. double-click it and set Startup type to disabled

enter image description here

Currently I am not aware of any side effects.

Leave a comment if you experience any, I will update the answer.

like image 22
Legends Avatar answered Jan 04 '23 17:01

Legends