Home Dashboard Directory Help
Search

Launching unit tests in debugger fails every other time (cannot start QTAgent32.exe) by jhaakana


Status: 

Closed
 as Not Reproducible Help for as Not Reproducible


25
0
Sign in
to vote
Type: Bug
ID: 536475
Opened: 2/25/2010 11:02:14 AM
Access Restriction: Public
5
Workaround(s)
view
22
User(s) can reproduce this bug

Description

I have a solution with multiple projects including one with unit tests. If I start debugging the unit tests in the solution (Test -> Debug -> All test in a solution), the starting of the test first fails with an error "Unable to start program 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe'". The second time I start the debugging, it works. Third time fails again, fourth time works, etc. etc. This also results in multiple (dozens at lest) QTAgent32.exe processes running.
Details
Sign in to post a comment.
Posted by Igby Dalziel on 11/10/2011 at 8:22 AM
I had this problem too. I had a few WCF service projects in my solution, and Emil Macarie's workaround (removing WCF tags from csproj files) worked for me. Thanks Emil!
Posted by bojingo on 6/2/2011 at 1:32 PM
Since this one was closed as Not Reproducible (prematurely, as with the the additional info provided here it shouldn't be difficult for them to repro), I found one that is still active and provides some other information as well.

http://connect.microsoft.com/VisualStudio/feedback/details/650038/launching-unit-tests-in-debugger-fails-every-other-time-when-a-project-started-life-as-wcf-application-related-to-536475

Posted by MatthieuKlotz on 5/16/2011 at 12:57 AM
Same probleme here. I have the following error in my event viewer :

The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

(devenv.exe, PID 368, Thread 1) HierarchyOutputCollection.GetOutputGroup: either buildManager.FindActiveProjectCfg or projectCfg[0].OpenOutputGroup failed: System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at Microsoft.VisualStudio.TestTools.Vsip.HierarchyOutputCollection.GetOutputGroup(IServiceProvider serviceProvider, IVsHierarchy hierarchy)

the message resource is present but the message is not found in the string/message table
Posted by Raul Rangel on 3/18/2011 at 1:05 PM
I also get the following in my event viewer:

Event Type:    Error
Event Source:    VSTTExecution
Event Category:    None
Event ID:    0
Date:        3/18/2011
Time:        1:58:30 PM
User:        N/A
Computer:    CO1801GRXRANGE
Description:
The description for Event ID ( 0 ) in Source ( VSTTExecution ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: (devenv.exe, PID 3340, Thread 47) Local ControllerProxy.PrepareQueueTestRunWorker: error (ignored): System.Runtime.InteropServices.COMException (0x89710016): Unable to start program 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe'.


at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.PrepareProcess(TestRun run)
at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.InitializeController(TestRun run).
Posted by Leroy Kussy on 1/31/2011 at 2:35 AM
This issue should be reopened indeed. I can also reproduce this problem. Not sure what's causing this yet though, but I do have multiple instances of VS2010 open most of the time.

There also seems to be an application event log entry every time this happens:

Log Name:     Application
Source:        VSTTExecution
Date:         31-1-2011 11:21:03
Event ID:     0
Task Category: None
Level:         Error
Keywords:     Classic
User:         N/A

The following information was included with the event:
(devenv.exe, PID 3288, Thread 37) ControllerProxy: Queue test run error: System.Runtime.InteropServices.COMException (0x89710016): Unable to start program 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe'.


at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at Microsoft.VisualStudio.TestTools.TestCaseManagement.UIThreadInvoker.Invoke(Delegate method, Object[] args)
at Microsoft.VisualStudio.TestTools.TestCaseManagement.SolutionIntegrationManager.DebugTarget(DebugInfo debugInfo, Boolean prepareEnvironment)
at Microsoft.VisualStudio.TestTools.Agent.DebugProcessLauncher.Launch(String exeFileName, String args, String workingDir, IEnumerable`1 environmentVariables, EventHandler processExitedHandler, Process& process)
at Microsoft.VisualStudio.TestTools.Agent.OutOfProcessStrategy.LaunchProcessHelper(AgentProcessStartupInfo agentProcessStartupInfo)
at Microsoft.VisualStudio.TestTools.Agent.OutOfProcessStrategy.StartAgentProcess(AgentProcessStartupInfo agentProcessStartupInfo, Boolean restarting)
at Microsoft.VisualStudio.TestTools.Agent.OutOfProcessStrategy.StartAgentProcess(AgentProcessStartupInfo agentProcessStartupInfo)
at Microsoft.VisualStudio.TestTools.Agent.AgentProxy.StartAgentProcess(AgentProcessStartupInfo agentProcessStartupInfo)
at Microsoft.VisualStudio.TestTools.Agent.AgentProcessProxyManager.StartTestAgentProcesses(AgentProcessStartupInfo agentProcessStartupInfo)
at Microsoft.VisualStudio.TestTools.Agent.AgentProcessManager.StartAgentProcess(AgentProcessStartupInfo agentProcessStartupInfo, Boolean startDataCollectionAgent)
at Microsoft.VisualStudio.TestTools.Agent.AgentProcessManager.StartAgentProcess(AgentProcessStartupInfo agentProcessStartupInfo, TestRunConfiguration testRunConfiguration)
at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.StartProcess(TestRun run)
at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.PrepareProcess(TestRun run)
at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.InitializeController(TestRun run)
at Microsoft.VisualStudio.TestTools.TestManagement.ControllerProxy.QueueTestRunWorker(Object state)
Posted by Emil Macarie on 1/28/2011 at 4:57 PM
I agree with dfgffgfghfghfghfghfgh in the sense that it looks like there is some sort of timeout. I posted a workaround for my particular problem, but I am not sure if it applies to everyone.
Some sort of option to set how long to wait for QTAgent32 to start would be nice.
Posted by Lawrence Parker on 10/28/2010 at 1:04 PM
I am running into the exact same problem. Very annoying! I'm running on Windows XP (under VMware).
Posted by hype9 on 10/7/2010 at 7:48 AM
I have exactly the same problem. I have also a Win 7 64 bit System. There also many QTAgent32 processes are running.
If I open a second Visual Studio, it works perfectly on each test start on the second Studio.
I don't know why it doesn't work in the first instance.
Please reopen this thread, this behavior is very annoying.

I test a Webservice project, but with normal Unit tests.
[TestMethod()]
public void Test()
{
     //do test
}
Posted by Nick Nightingale on 10/7/2010 at 5:24 AM
Exactly the same problem for me win Win 7 x64
Works every second time and leaves lots of QTAgent32 processes running
Posted by EllioKiller on 9/24/2010 at 12:13 AM
New info : Occurs mostly when more than one VS2010 is open (resource allocation problem ?)
Posted by EllioKiller on 9/24/2010 at 12:00 AM
It's really easy to reproduce it if your target project (the assembly you're testing) is a wcf service library.

Please reopen this thread asap.
Posted by lothar777 on 9/4/2010 at 2:45 AM
Have the same problem. The vs solution has about 40 projects. Every second time I run unit tests in debug it happens. It seems as if vs2010 doesnt wait long enough for QTAgent to start or something.
Posted by James Ogden on 8/23/2010 at 1:25 PM
Also 100% reproducible. Also Win7 x64
Posted by Kevin Ortman on 8/14/2010 at 8:04 AM
Same. Win7 x64 100% reproducable.
Posted by Shaun P Bowe on 6/14/2010 at 10:59 AM
I can also reproduce this bug. It seems the common thread is Windows 7 64-bit.
Posted by Chuck Berg - Station Casinos on 4/15/2010 at 3:20 PM
I too can reproduce the problem repeatedly, on Windows 7, x64, with RC1.
Posted by Kestas.Cerniauskas on 4/10/2010 at 3:20 AM
I can reproduce this bug too.

I am running VS 2010 RC1 on Windows 7 x64 machine.
My unit-test project behaves exactly as described by jhaakana, every second time tests fails (in debug Tests/All in Current contex mode). Run all tests run just fine.
Posted by Microsoft on 3/3/2010 at 4:36 PM
Hello,

We cannot reproduce this issue with the steps provided. Since we haven't heard back from you with more information or a project, we will be closing this issue.

Thanks,
Visual Studio Product Team
Posted by Microsoft on 2/26/2010 at 1:08 AM
Thanks for reporting this issue. In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Please give us a demo project to demonstrate this issue so that we can conduct further research.

It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 3 days, we will close this issue.

Thanks again for your efforts and we look forward to hearing from you.

Visual Studio Product Team
Posted by Microsoft on 2/25/2010 at 7:04 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by Lowell at LANL on 1/28/2013 at 10:58 AM
To expand on the workaround/solution posted by vze23c3q. (Environment is Win7 64-bit, VS 2010.) I was getting an error saying that "Debugging information for 'QTAgent32.exe' cannot be found or does not match. Cannot find or open the PDB file". This was occurring every time.

While running Visual studio (do you need to have the solution loaded?), select "Test" menu item at top, then check the "Select Test Settings" to see which set of test settings is active. Then "Edit Test Settings", and select the active test settings. In the dialog box that comes up, select "Host" (menu on the left.) Then, under "Run tests in 32 bit or 64 bit process:", select "Run tests in 64 bit process on 64 bit machine" instead of the default "Force tests to run in 32 bit process."

So, thanks "vze23c3q" for pointing the way!
Posted by vze23c3q on 8/25/2012 at 5:45 AM
VS 2010, Win7 - Test Settings | Host | Run Tests in 32 bit or 64 bit process:

Set to: Run tests in 64 bit process on 64 bit machine

(default was: Force test to run in 32 bit process)
Posted by Michael Sander on 3/3/2011 at 1:57 AM
I fixed this issue by cleaning up the references of the test project.
I had some references to third party libs pointing to the release/debug output folders instead of the proper library folders. (resharper likes to do this)
Posted by Emil Macarie on 1/31/2011 at 10:44 AM
I have a second work-around which has also worked for us.
It looks like Visual Studio insists building projects that started their life as a WCFService Application.
After removing the WCF Service Application specific tags from the csproj xml files, unit tests work every time.
I removed the following tags:
Under Property Group:
Remove ProjectTypeGuids and StartArguments
Remove entire ProjectExtensions node
Posted by Emil Macarie on 1/28/2011 at 4:56 PM
I have the exact the problem.
For me the problem was that for some reason every other time I would run "Debug" Visual Studio would decide it needed to build some projects.
Nothing actually got built, but I believe that it delayed the startup of QTAgent32.exe long enough so that there would be an internal timeout.
My workaround was to remove any project dependencies from my test project and simply add the required DLLs instead of the projects tested.