segfault error on Win 10
I compile vtk examples using Visual studio build tools on CLion. I get segfault error when I run ReadDICOM example.
ctest -R ReadDICOM
Test project E:/programming/c++/vtk-examples/build
Start 349: IO-ReadDICOM
1/2 Test #349: IO-ReadDICOM .....................***Exception: SegFault 0.14 sec
Start 350: IO-ReadDICOMSeries
2/2 Test #350: IO-ReadDICOMSeries ...............***Exception: SegFault 0.15 sec
0% tests passed, 2 tests failed out of 2
Label Time Summary:
WikiExamples = 0.29 sec*proc (2 tests)
Total Test time (real) = 0.45 sec
The following tests FAILED:
349 - IO-ReadDICOM (SEGFAULT)
350 - IO-ReadDICOMSeries (SEGFAULT)
Errors while running CTest
As far as I understand, the cause of the error is the following line in IOCxxTests.cxx file
vtkTestingInteractor::TempDirectory =
std::string("E:/programming/c++/vtk-examples/build/Testing/Temporary");
During debug this line produce following error:
error: no member named 'TempDirectory' in 'vtkTestingInteractor'
error: no matching conversion for functional-style cast from 'const char [56]' to 'std::string' (aka 'std::basic_string<char,std::char_traits<char>,std::allocator<char> >')
candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const char [56]' to 'const std::basic_string<char,std::char_traits<char>,std::allocator<char> >' for 1st argument
candidate constructor (the implicit move constructor) not viable: no known conversion from 'const char [56]' to 'std::basic_string<char,std::char_traits<char>,std::allocator<char> >' for 1st argument
candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided