locked
Random tests failure using Moles RRS feed

  • Question

  • Hello everybody,

    We are using Moles (version x86 0.94.51006.1) in an old project, but we are getting random errors when we run our tests.

    We usually get 2 tests that don't pass, but they aren't always the same tests. The tests become "yellow" with the following error: "The agent process was stopped while the test was running".

    If I look at the Event Log, I get three errors that I think are related to this issue:

    - First exception:

    Application: QTAgent32.exe

    Framework Version: v4.0.30319

    Description: The process was terminated due to an unhandled exception.

    Exception Info: exception code c0000005, exception address 738415EC

     

    - Second exception:

    Faulting application name: QTAgent32.exe, version: 10.0.30319.1, time stamp: 0x4ba20efb

    Faulting module name: winhttp.dll, version: 6.1.7601.17514, time stamp: 0x4ce7ba3e

    Exception code: 0xc0000005

    Fault offset: 0x000015ec

    Faulting process id: 0x1f84

    Faulting application start time: 0x01cbde3da8faa91b

    Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe

    Faulting module path: C:\Windows\system32\winhttp.dll

    Report Id: fae219ec-4b00-11e0-9ffe-00219b0e1c8e

     

    - Thrid exception:

    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 5460, Thread 49) OutOfProcessStrategy.ProcessMonitorThread: Agent process was shut down unexpectedly; will attempt to restart

    the message resource is present but the message is not found in the string/message table

     

    I tried this two things to fix the error or, at least, get more information:

    - Adding this piece of XML to the app.config of Tests project:

    <runtime>

      <legacyUnhandledExceptionPolicy enabled="1"/>

    </runtime>

     - Setting MolesAssemblySettings(Diagnostic = true) in the assemblyInfo.cs file.

     

    None of them helped me very much. I also tried to attach to the Microsoft.Moles.VsHost.x86.exe with another instance of VS2010, but it was useless too.

    I'm really stuck with this issue.

    Any help would be really appreciated.

     

    Thanks in advance.

     


    Si la respuesta es correcta, por favor márcala como correcta. También puedes votarla como útil si te lo ha sido.
    Thursday, March 10, 2011 11:40 AM

All replies

  • There might be a failure happening in the finalizer queue that takes down the process. Do you implement finalizers on your objects?Otherwise, if you can extract a repro, we could investigate this issue.

     


    Jonathan "Peli" de Halleux - Try Pex online at www.pexforfun.com!
    Tuesday, March 15, 2011 5:35 AM
  • Hello Peli:

    Thank you so much for your help.

    As soon as I removed a finalizer from an old piece of code (the finalizer was even necessary), it just worked perfectly!

    However, there are other projects that need the finalizers, because they deal with unmanaged code. Do you know if there is any possibility to make Moles work with these projects?

    Thank you in advance.

     


    Si la respuesta es correcta, por favor márcala como correcta. También puedes votarla como útil si te lo ha sido.
    Friday, March 18, 2011 11:40 AM
  • Hello:

    I'm back again. Unfortunately, it looks like it really doesn't work. I don't know why, at the beginning, it worked when we removed the finalizers.

    But now we are getting again the previous errors. It's really annoying because there is not any information that could help us to diagnosticate what's going on and how we can fix it. The Event Log entries are not useful at all. And the Test Results window doesn't show anything better, just yellow lines.

    I have tried to uninstall and install again Moles.

    I wanna provide some information about my working machine, in case it helps:

    Windows 7 Enterprise SP1 x64

    Visual Studio 2010 Premium (without SP1)

    Pex and Moles x86 version 0.94.51006.1

    The reason why I have the x86 version is because most of my workmates have x32 machines, so all of us need the same moles version. Otherwise we get a lot of checkout warnings, given the fact the DLLs are different (among other unexpected side effects).

    Let me know if I can provide you any further information.

    Thanks again for your help.


    Si la respuesta es correcta, por favor márcala como correcta. También puedes votarla como útil si te lo ha sido.
    Friday, March 18, 2011 4:11 PM