Sysprogs forums › Forums › VisualGDB › GoogleTest executor crashes
- This topic has 13 replies, 2 voices, and was last updated 6 years, 1 month ago by support.
-
AuthorPosts
-
August 24, 2018 at 12:40 #21760JensaParticipant
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: messageAny idea what could be wrong?
Regards
Jens NilssonAugust 24, 2018 at 19:20 #21762supportKeymasterHi,
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.
August 28, 2018 at 08:09 #21815JensaParticipantUnfortunetly 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.August 30, 2018 at 01:41 #21844supportKeymasterHi,
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
August 30, 2018 at 08:01 #21845JensaParticipantHi,
Got the same with X11 disabled.
See attached logs for more info.
Regards
Jens NilssonAttachments:
You must be logged in to view attached files.August 30, 2018 at 12:55 #21848JensaParticipantHi,
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.August 30, 2018 at 20:50 #21855supportKeymasterHi,
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.
September 20, 2018 at 08:26 #22021JensaParticipantHi,
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, Dictionary
2 selectedTests, List
1 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: messageThe 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 🙂
September 22, 2018 at 04:31 #22043supportKeymasterHi,
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
September 25, 2018 at 10:11 #22073JensaParticipantHi,
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 NilssonSeptember 25, 2018 at 14:24 #22075JensaParticipantHi 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, Dictionary
2 selectedTests, List
1 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 6 years, 2 months ago by Jensa.
September 28, 2018 at 04:26 #22122supportKeymasterHi,
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.
September 28, 2018 at 10:37 #22130JensaParticipantHi,
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.September 28, 2018 at 18:06 #22137supportKeymasterThanks 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.
-
AuthorPosts
- You must be logged in to reply to this topic.