1

I've recently installed Visual Studio 2015 on a new computer but I cant seem to run any projects. They build without warnings or errors but as soon as I hit debug the whole IDE crashes. I even tested it with a program that was just:

int main()
{
    return 0;
}

and it still crashed. It's worth mentioning that after I do this it then stops being able to build in debug (unable to open file) and when I then try to delete the debug build it claims to be open in System. I have tried restarting my computer multiple times and the executable still seems to be in use by System. I would appreciate any help with this issue since I cant think of anything.

I have tried using various compilers as well, MinGW, LLVM and all of them have the same issue.

EDIT with new information:

Restarting does successfully kill the processes if I leave the computer off for a few seconds before restarting.

I have tried building the same projects in VS2013 and the same issue occurs, could the issue be with my project configuration?

Birdfriender
  • 343
  • 1
  • 7
  • 24
  • Have you checked for updates? Generally the first thing to do after installing Visual Studio is to get updates to VS and your OS from Microsoft. I haven't tried VS 2015 yet, but earlier versions both installed with critical bugs that had already been fixed and depended on OS features whose critical bugs would not be fixed by ordinary updates unless VS was already installed. – JSF Dec 06 '15 at 13:37
  • Any crash message? And since you tried other compilers, please update tags. – Mars Dec 06 '15 at 13:43
  • @Mars, I've never seen a crash message when the VS debugger itself (not the debugged process) crashes, so I doubt CountBale saw one. I think the original question already describes trying multiple compilers to create the .exe that the debugger crashes trying to debug, so the choice of compiler can be assumed to not be relevant. – JSF Dec 06 '15 at 13:48
  • I'm checking for updates now, so hopefully thats all thats needed. If I set it to x64 I eventually get "A 64-bit debugging operation is taking longer than expected" with the option to terminate, no detail as to why. – Birdfriender Dec 06 '15 at 13:51
  • 1
    What does "still in use" mean after reboot? If that means what it seems to say, then it implies the VS install was corrupted by a virus that used the debug attempt to hijack the next boot. You need to take a good look at what is loaded on boot and why. – JSF Dec 06 '15 at 13:53
  • @JSF after rebooting I try building the project again and I get the same error "Unable to open file" and then am unable to delete it in explorer. [This](http://i.imgur.com/1CJlu44.png) is all that opens on startup. Is there somewhere I can get more info than that? – Birdfriender Dec 06 '15 at 14:02
  • Task manager is useless for determining what is loaded on boot. For a complete (but barely comprehensible) look at what is loaded on reboot, get this utility from Microsoft: https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx – JSF Dec 06 '15 at 14:10
  • That new-car smell of a new computer doesn't last very long when you install free crapware on it. Uninstall Avast. – Hans Passant Dec 06 '15 at 14:19
  • @JSF I've downloaded it, is there anything in particular I should look out for? Most of the processes are from publishers I recognise (Microsoft, Adobe, Oracle etc.) – Birdfriender Dec 06 '15 at 14:39
  • @Hans is there a free antivirus you'd recommend? I found AVG slowed my computer to a crawl when I used to use it – Birdfriender Dec 06 '15 at 14:42
  • Interpreting results from autoruns is always a lot of work. The other way to look at a file that is open and shouldn't be is with process explorer (from the same set of Microsoft utilities) it is what task manage should have been and it includes a search option to find out which process has a specific file open. – JSF Dec 06 '15 at 14:44
  • @JSF Okay I tried process explorer, the parent shows as "(9932)" and I am unable to kill the process (even the one that just returns 0) it gives "Error Terminating Process: Access is Denied" – Birdfriender Dec 06 '15 at 14:54
  • Update: I tried using taskkill from admin command prompt and I get the error "There is no running instance of the task" despite it correctly identified the PID – Birdfriender Dec 06 '15 at 15:11
  • @JSF ok so the persisting through reboot thing may have been a false alarm. I tried switching off, waiting 20 seconds and then switching back on and the process is gone. It seems like possibly I was just restarting too quickly. Still no idea why the processes are hanging in the first place though – Birdfriender Dec 06 '15 at 19:53
  • I've tried Visual Studio 2013 as well and the exact same thing happens – Birdfriender Dec 06 '15 at 20:28
  • 1
    Are you running Avast? http://stackoverflow.com/questions/33690697/running-my-c-code-gives-me-a-blank-cmd – NathanOliver Dec 07 '15 at 21:00
  • @Nathan Oh my god... that fixed it. Thank you so much I cant believe that was the issue after I spent 2 day wracking my head trying to think of something – Birdfriender Dec 07 '15 at 21:13

1 Answers1

0

The issue was caused by Avast antivirus, I fixed it by adding my projects folder to the list of exceptions in Avast.

Birdfriender
  • 343
  • 1
  • 7
  • 24