Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QTAgent32.exe has stopped working

I have a VS2012/.NET4.5 solution with huge number of unit tests

When running All unit tests from solution I am randomly getting "QTAgent32.exe has stopped working" error message and unit tests hangs at this point.

My unit tests are actually MSTest and I run them using Resharper menu from VS. Resharper Edition is 7.1.3, not sure if it matters. VS 2012 SP 3

like image 828
Bogdan_Ch Avatar asked Aug 07 '13 16:08

Bogdan_Ch


3 Answers

Eventually I found the reason

One piece of code was written incorrectly and under some curcumstances caused endless recursion and stack overflow. So if you getting the same error "QTAgent32.exe has stopped working" try to check what is your call stak at this point.

like image 164
Bogdan_Ch Avatar answered Sep 30 '22 02:09

Bogdan_Ch


I had a similar problem, so I will present the solution here for anyone else with the same problem.

I would get "QTAgent32.exe has stopped working" whenever trying to run any unit test. This started after I reorganized my solution by pulling out some code into a class library.

This was for a .NET 3.5 solution in VS Premium 2012, update 4.

The fix in the end was to delete the suo file. (This is a hidden file, by the way.)

like image 39
dan-gph Avatar answered Sep 30 '22 00:09

dan-gph


FWIW: My solution in VS2012 was to remove my TraceAndTestImpact.testsettings file in the solutions directory. (possibly together with removing MySolutionName.sln.DotSettings.user and running with elevated privileges)

If you get the following,

An exception occurred while test discoverer 'MSTestDiscoverer' was loading tests.
Exception: An error occurred while initializing the settings provider named 'MSTest'.
Error: The test settings file C:\....\TraceAndTestImpact.testsettings, specified in
the MSTestAdapter settings, is not available. Either access to the file is denied or
the file does not exist. Ensure that the test settings file is available and try again.

try loading the solution with elevated privileges. To add insult to injury no new TraceAndTestImpact.testsettings file is created.

like image 28
LosManos Avatar answered Sep 30 '22 01:09

LosManos