GoogleTest executor crashes

Sysprogs forums Forums VisualGDB GoogleTest executor crashes

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #21760
    Jensa
    Participant

    Hi,

    We occasionally get errors when trying to run our unit tests with the Test Explorer window. The test executor hangs and the tests not run before the exception vanishes from the Test Explorer.
    It happens even with the default template project setup without any changes.

    [2018-08-24 13:21:50 Error] An exception occurred while invoking executor ‘executor://visualgdb/TestRunner’: The parameter cannot be null or empty.
    Parameter name: message

    Any idea what could be wrong?

    Regards
    Jens Nilsson

    #21762
    support
    Keymaster

    Hi,

    Unfortunately it’s hard to pinpoint the source of this without seeing the call stack. Please try checking the test logs and VisualGDB Diagnostics Console for more detailed errors containing a stack trace.

    #21815
    Jensa
    Participant

    Unfortunetly I can’t find a stacktrace anywhere in the logs.

    I’ll attach some logs from a time when it happened on a unchanged google unit test template project. What I did to get it was first a rebuild. Then from the Test Explorer I did “Run All”. It ran ok the first time. Then I selected the top level of the tests and right clicked and clicked “Run selected tests” from there. That’s when it happened this time.

    Attachments:
    You must be logged in to view attached files.
    #21844
    support
    Keymaster

    Hi,

    Thanks for attaching the detailed logs. One error shown in the log files is the missing ‘xauth’ executable that would cause problems when running commands that require X11 redirection. Please try disabling X11 support for that host via Tools->VisualGDB->SSH Host Manager.

    If this doesn’t help, please try this build and attach an updated log from the Test Output: http://sysprogs.com/files/tmp/VisualGDB-5.4.4.2411.msi

     

    #21845
    Jensa
    Participant

    Hi,

    Got the same with X11 disabled.

    See attached logs for more info.

    Regards
    Jens Nilsson

    Attachments:
    You must be logged in to view attached files.
    #21848
    Jensa
    Participant

    Hi,

    We started getting another error as well in our real project. Not sure if it’s the amount of tests that are getting many which is why it fails or what it is but we didn’t get this error earlier today. We’re constantly writing more tests so it’s increasing all the time and the names are quite long.
    I tried to remove a file with tests so we went from 190 to 172 and it worked again.

    See attached for error.

    Attachments:
    You must be logged in to view attached files.
    #21855
    support
    Keymaster

    Hi,

    Thanks for the log file. We have fixed the first issue in this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.4.2413.msi

    The second error looks like the test process terminates unexpectedly, breaking the connection. Please try identifying a specific test that causes it and then use the “Debug Tests” instead of “Run Tests” command to try locating the code responsible for closing the process.

    #22021
    Jensa
    Participant

    Hi,

    Thanks for that fix. It improved it a lot.

    I finally got some more time to work on our testing and got some more issues like the one above. Got this while trying to debug a single test I think:

    [2018-09-20 09:07:26 Error] The parameter cannot be null or empty.
     Parameter name: message
     [2018-09-20 09:07:26 Informational] System.ArgumentException: The parameter cannot be null or empty.
     [2018-09-20 09:07:26 Informational] Parameter name: message
     [2018-09-20 09:07:26 Informational] at Microsoft.VisualStudio.TestPlatform.Common.Logging.TestSessionMessageLogger.SendMessage(TestMessageLevel testMessageLevel, String message)
     [2018-09-20 09:07:26 Informational] at VisualGDBTestExtensionShared.VisualGDBTestExecutor.ReportTestResults(String testContainer, kj1 ctx, IBasicStream stream, Dictionary2 selectedTests, List1 tests, IFrameworkHandle frameworkHandle)
     [2018-09-20 09:07:26 Informational] at VisualGDBTestExtensionShared.VisualGDBTestExecutor.RunTestsInSource(String source, Dictionary`
     2 selectedTests, IRunContext runContext, IFrameworkHandle frameworkHandle)
     [2018-09-20 09:07:26 Informational] at VisualGDBTestExtensionShared.VisualGDBTestExecutor.RunTests(IEnumerable`1 tests, IRunContext runContext, IFrameworkHandle frameworkHandle)
     [2018-09-20 09:07:26 Error] An exception occurred while invoking executor 'executor://visualgdb/TestRunner': The parameter cannot be null or empty.
     Parameter name: message

    The other error I got above is a bit tricky because it doesn’t seem to happen when I actually debug the code and neither when we just run the tests like a normal application. But I get it sometimes and when I get annoyed enough by it I’ll investigate more 🙂

    • This reply was modified 5 years, 7 months ago by Jensa.
    • This reply was modified 5 years, 7 months ago by support. Reason: formatting
    #22043
    support
    Keymaster

    Hi,

    Strange, the log looks like exactly the same error that was fixed previously is triggering again. Please try again with this build and let us know if the issue is still present: http://sysprogs.com/files/tmp/VisualGDB-5.4.4.2443.msi

    #22073
    Jensa
    Participant

    Hi,

    Today the testhost.x86.exe crashed while debugging some test cases. Was able to repeat it with the diagnostics console enabled and got the following logged:

    Exception while forwarding test output: WriteFile failed, win32 error code 109
     ------------------ System.ComponentModel.Win32Exception ------------------
     System.ComponentModel.Win32Exception (0x80004005): WriteFile failed, win32 error code 109
     at u7.s(IntPtr a, Byte[] c, Int32 b)
     at ny.a()

    The tests still ran however when it crashed and all completed successfully without errors.

    Our biggest problem with these issues is that whenever something crashes or something all tests that wasn’t already run gets removed from the Test Explorer window. Sometimes we can then get them back by simply changing a line of code and getting the test project to build and identify tests again but that doesn’t always help either. Perhaps a workaround would be to not remove any test cases from the test explorer when something goes wrong and simply update the pass/fail of the test cases that did run before the crash. That would at least save us a lot of time so we don’t have to try and get the tests back and when they do the history is then lost.

    Regards
    Jens Nilsson

    #22075
    Jensa
    Participant

    Hi again,

    Now I got the crash error null exception error again and it looks like the callstack is the same as well. Using the build 2443 above:

    [2018-09-25 15:19:25 Error] The parameter cannot be null or empty.
     Parameter name: message
     [2018-09-25 15:19:25 Informational] System.ArgumentException: The parameter cannot be null or empty.
     [2018-09-25 15:19:25 Informational] Parameter name: message
     [2018-09-25 15:19:25 Informational] at Microsoft.VisualStudio.TestPlatform.Common.Logging.TestSessionMessageLogger.SendMessage(TestMessageLevel testMessageLevel, String message)
     [2018-09-25 15:19:25 Informational] at VisualGDBTestExtensionShared.VisualGDBTestExecutor.ReportTestResults(String testContainer, bd ctx, IBasicStream stream, Dictionary2 selectedTests, List1 tests, IFrameworkHandle frameworkHandle)
     [2018-09-25 15:19:25 Informational] at VisualGDBTestExtensionShared.VisualGDBTestExecutor.RunTestsInSource(String source, Dictionary`
     2 selectedTests, IRunContext runContext, IFrameworkHandle frameworkHandle)
     [2018-09-25 15:19:25 Informational] at VisualGDBTestExtensionShared.VisualGDBTestExecutor.RunTests(IEnumerable`1 tests, IRunContext runContext, IFrameworkHandle frameworkHandle)
     [2018-09-25 15:19:25 Error] An exception occurred while invoking executor 'executor://visualgdb/TestRunner': The parameter cannot be null or empty.
     Parameter name: message
    • This reply was modified 5 years, 7 months ago by Jensa.
    #22122
    support
    Keymaster

    Hi,

    Sorry for the delay. We have added very verbose additional logging to the following build: http://sysprogs.com/files/tmp/VisualGDB-5.4.5.2448.msi

    Please set the following registry value (32-bit DWORD): HKCU\SOFTWARE\Sysprogs\VisualGDB\Settings\ExtraVerboseTestExecutorLogging

    Then restart Visual Studio. Next time you run tests, the test output will contain detailed logs for each step performed by the VisualGDB test executor (please first check that you can see the “Initializing test container from …” message). Please share the updated log once you reproduce the ‘The parameter cannot be null or empty’ problem.

    The “WriteFile failed” error means that the VS test engine has stopped receiving test information from the VisualGDB debug engine. It can be caused by the same “null” error, or by something else. Please also share the entire verbose output from the VS Test Output window once you reproduce this again. This should help us finally pinpoint the problem and release a hotfix.

    #22130
    Jensa
    Participant

    Hi,

    The “WriteFile failed” error was indeed probably from the same “null” error yes. Got it now and payed more attention to it and it was a null error at the same time. The additional logging says that it tries to write 2 characters only. Perhaps a new line or similar white-space characters that visual studio categorizes as empty?

    Anyway, attached are test output and diagnostic console logs.

    Attachments:
    You must be logged in to view attached files.
    #22137
    support
    Keymaster

     

    Thanks for the log. We have rechecked this and it indeed turns out that trying to send a string consisting purely of whitespace characters causes VS to throw an exception.

    Please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.5.2450.msi. It will filter out empty lines and will also not stop the test session even if the VS refuses to relay the test message.

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.