JetBrains dotCover:覆盖会话结束时出现错误:超出允许的迭代以生成唯一的临时名称
JetBrains dotCover: Coverage session finished with errors: Out of allowed iteration to generate unique temp name
我从命令行使用 dotCover.exe 生成覆盖率报告,但随机失败并出现此错误:
[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.
我的命令行如下所示:
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\
似乎我尝试覆盖的 DLL 越多,失败并出现此错误的可能性就越大。从错误消息来看,dotCover 似乎是用 C++ 编写的,它正在使用 boost::filesystem::path
创建一个临时文件,但存在一些竞争条件,它会尝试在它已经存在的地方创建一个新的临时文件。我的 dotCover 版本是 JetBrains dotCover Console Runner 2017.1.2. Build 108.0.20170428.80910
.
有谁知道如何修复该错误?
编辑: 还有一个失败的错误 - 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.
同样,这种情况是随机发生的 - 通常它会失败 3 次,然后 运行 第 4 次成功。
我从命令行使用 dotCover.exe 生成覆盖率报告,但随机失败并出现此错误:
[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.
我的命令行如下所示:
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\
似乎我尝试覆盖的 DLL 越多,失败并出现此错误的可能性就越大。从错误消息来看,dotCover 似乎是用 C++ 编写的,它正在使用 boost::filesystem::path
创建一个临时文件,但存在一些竞争条件,它会尝试在它已经存在的地方创建一个新的临时文件。我的 dotCover 版本是 JetBrains dotCover Console Runner 2017.1.2. Build 108.0.20170428.80910
.
有谁知道如何修复该错误?
编辑: 还有一个失败的错误 - 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.
同样,这种情况是随机发生的 - 通常它会失败 3 次,然后 运行 第 4 次成功。