JetBrains dotCover: Coverage session finished with errors: Out of allowed iteration to generate unique temp name
Asked Answered
B

1

6

I generate a coverage report using dotCover.exe from the command line, but it randomly fails with this error:

[JetBrains dotCover] Coverage session finished with errors: Out of allowed iteration to generate unique temp name
  [location] = C:\Build Agent\work\f532b5455ffc19e9\Profiler\Kernel\Windows\Native\Solution\core\src\Util\temp_util.cpp(44)
  [function] = class boost::filesystem::path __cdecl jetbrains::profiler::temp::`anonymous-namespace'::create_temp<class jetbrains::profiler::temp::create_temp_file::<lambda_91d5f1a5933e4e60038be7ca777762a9>,0x010>(const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,class jetbrains::profiler::temp::create_temp_file::<lambda_91d5f1a5933e4e60038be7ca777762a9> &&)
  [file name] = C:\Temp\ft.EC76593C.tmp
  [WIN32 error] = 80, The file exists.

My command line looks like this:

dotCover.exe analyse /TargetExecutable=nunit3-console.exe /TargetArguments="unittest1.dll unittest2.dll ... unittest10.dll" /ReportType="html" /Output=CodeCoverage.html /Filters="+:*;-:*.*Tests;-:*.*.Tests;-:*.Tests;-:*.Tests*" /TempDir=C:\Temp\

It seems the more DLLs I try to cover the more likely it is to fail with this error. From the error message it seems dotCover is written in C++ and it's using boost::filesystem::path to create a temp file but there is some race condition and it tries to create a new temp file where it already exists. My dotCover version is JetBrains dotCover Console Runner 2017.1.2. Build 108.0.20170428.80910.

Does anyone have any idea what's how to fix that error?

Edit: There is another error with which it fails - Access is denied:

  [function] = class boost::filesystem::path __cdecl jetbrains::profiler::temp::`anonymous-namespace'::create_temp<class jetbrains::profiler::temp::create_temp_file::<lambda_91d5f1a5933e4e60038be7ca777762a9>,0x010>(const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,class jetbrains::profiler::temp::create_temp_file::<lambda_91d5f1a5933e4e60038be7ca777762a9> &&)
  [file name] = C:\Temp2\ft.0A96C261.tmp
  [WIN32 error] = 5, Access is denied.

Again, this happens randomly - usually it will fail 3 times and then run successfully on the 4th.

Bronchopneumonia answered 27/6, 2017 at 15:14 Comment(6)
Have you tried reporting the issue to JetBrains using their bug tracker?Monocarpic
looks loke a bug, this "0A96C261.tmp" looks like some encoded timestamp. maybe multiple test suites are trying to create a temp file at the same time.Chassidychassin
@jαsοndιnAlt Is this done by nunit? I know it can run tests in parallel, so maybe if I manage to convince it to serialize them (i.e. run them one after another) the problem will go away.Bronchopneumonia
@Monocarpic Thanks, I found an existing bug about it there - which did not appear in any results. It seems their bugtracker isn't being indexed by google. They claim it will be fixed soon.Bronchopneumonia
@Bronchopneumonia they caim its in the eap6 version which is out nowPurslane
@Purslane Thanks I'll try testing it as soon as I can.Bronchopneumonia
S
5

was running into this issue at times, using the early access version(JetBrains.dotCover.CommandLineTools.2017.2.20170630.95316-eap06) made it disappear the issue till now.

Looks like a bug in the dotcover tool opened here .You can download the latest version of dotcover commandline tools from here

Edit:

Get the latest version of dotcover from here as it has the issue resolved

Separation answered 6/7, 2017 at 4:39 Comment(1)
Using the download link to 2017.2 eap6 is not a good idea any more. Use this link instead: jetbrains.com/dotcover/download/#section=commandlineSchoolmistress

© 2022 - 2024 — McMap. All rights reserved.