I had been having this issue with Visual Studio 2015. I start it up and it is totally unresponsive. Once in a while, I get a little popup notification that says "Microsoft Visual Studio is Busy". It's not using more than 2% CPU or more than a few hundred megabytes of memory. It doesn't seem to be doing anything at all. And it lasts forever. I once just put my laptop on the passenger seat on the way home and let it run and it never completed.
I didn't know what caused it. I eventually figured out how to fix it.
1. Close my rather large solution (I have to use "End Task" in Task Manager)
2. Open a smaller solution.
3. Rebuild the smaller solution.
4. Close the smaller solution.
5. Reopen the large solution.
It doesn't work EVERY time, but it works often enough that I can get back to work.
For unrelated reasons, I shut off NCrunch a couple months ago. This morning, I turned it back on. There was an upgrade available so I installed that. After VS restarted, "Visual Studio is Busy". I realized, I haven't seen that problem since I shut off NCrunch, so now I have a suspect.
What information do you need from me to figure out what's going on?
1. Run your VS2015 until it crashes in the way you've described
2. Load up a second of instance of VS2015 and don't open a solution, hopefully this won't crash. If it does, load another up until you get a working instance.
3. Using the second instance, attach the debugger onto the first instance of devenv.exe
4. Break into the process. Open the list of running threads, find the main thread
5. Open up the stack trace, copy paste the contents of the stack trace into this forum
I had turned off NCrunch since I first posted. I turned it on a couple days ago. This morning, I got the dreaded hang. Here is that stack trace you requested. Thanks!
akvochick wrote:I also captured a dump file that's about 200MB 7zip'd. If you want that, let me know where to send it.
It would be very useful to see this dump. Unfortunately I don't have anywhere for you to easily send such a large file. Do you have a dropbox account or anywhere you might be able to post it for me?
Although I understand the pattern of this problem suggests it's being caused by NCrunch, the stack trace of the hung main thread doesn't seem to be related to NCrunch in any way. My feeling at the moment is that this problem is actually a problem in VS itself that is being indirectly triggered by NCrunch being resident. Sometimes the smallest adjustment to an environment can cause sequence changes that make race conditions surface. I should be able to know for certain if I can take a look at the minidump.
This appears to me to be a deadlock between the main thread and a background thread somewhere in Nuget/Powershell (threads 14604 and 15980). Because the code here is all internal MS code, I am unfamiliar with its purpose or function. I can say with confidence that this crash is not the fault of NCrunch. It's possible that by having NCrunch loaded, the sequence of events inside your IDE is different and this causes the deadlock to surface.
I recommend sharing this with Microsoft. With the dump file, they'll likely have a good chance of being able to figure this out and hopefully resolve it.