Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 858
sashoalm Avatar asked Jun 27 '17 15:06

sashoalm


1 Answers

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

like image 185
Rohith Avatar answered Nov 01 '22 09:11

Rohith