VTK static lib bug report about vtkInformationXXKey when using more than one copy of vtk libs
I have problem running my exe linked against static vtk libs, involving such as vtkImageSlice.
The case is I have a project consisting of a core lib and a test exe.
The core lib links against vtk static libs and the test exe links against vtk static or dynamic libs.
After my debugging efforts, I found the problem is systematic.
The cause is each copy of vtk lib batch have their own static vtkInformationXXKey* (in vtkDataObject.h).
When passing a vtkImageData pointer from the test exe to the core lib, as input for vtkImageSlice, then running vtkImageSlice::update().
During which process, the codes MapType::const_iterator i = this->Internal->Map.find(key);
in vtkInformation.cxx will result invalid iter.
that is because the Map using vtkInformationKey*(static vtkInformationXXKey* in vtkDataObject.h) as key instead of just std::string.
That means vtkInformation is systematiclly not fit for crossing copies of vtk libs(translation units)