Symbol clash and undefined behavior in application integrating VTK wigdets

The merge request MR-8885 (BUG: Rename vtkInteractionCallback class to avoid symbol clash) has just been submitted to address undefined behavior and crashes in application integrating one of the following VTK widgets:

  • vtkImplicitPlaneWidget2
  • vtkDisplaySizedImplicitPlaneWidget
  • vtkCoordinateFrameWidget

In short, the use of the generic class name vtkInteractionCallback in Widgets classes was violating the ODR (One Definition Rule) rule and was leading to undefined behavior.

Full details available at Transition of nightly build from VTK 9.0.20201111 to 9.1.20220125 - Development - 3D Slicer Community

Related issues were also created:

  • #18456 (Remove duplicated class vtkTextureArray)
  • #18455 (Remove duplicated class vtkmOutputFilterPolicy)

along with suggestion for improving VTK continuous integration infrastructure:

  • #18457 (Improve continuous integration to detect duplicated symbols)
2 Likes