You only try to catch C++ exceptions and you cannot catch all exceptions anyway, so I would recommend to focus on fixing the root cause of the error.
Using _T for string literals is decade-old technology, it never got widely adopted and I don’t think anybody tested it with VTK in recent years. Instead, I would recommend to use UTF-8 everywhere. In current Windows versions, you can even set the application’s code page to UTF-8.
If it is crashing in debug mode then it’s awesome, you can then see exactly what goes wrong. Just run the code in a debugger and have a look at the call stack, inspect variables, etc.
I’ll tried that, but only on my app variables, because I don’t have cxx source files from VTK or VTK-DICOM … I got header files and lib files for VTK and VTK-DICOM and I only included in my project.
@lassoan I guess I cannot do that, I could find what is the problem inside of VTK-DICOM class vtkDICOMWriter but I don’t have cxx file, I got from someone only header files and lib files already compiled.
Do you use Visual Studio? If so, you need to double check whether your peer used the same compiler to build the DLLs. If your peer used Visual Studio 2015 to compile VTK, then you should compile your program with it as well.