VTK currently forcibly aborts an application if no screen is available. Having a library like VTK call std::abort
is significantly worse than having it throw errors since for std::abort
, it is not possible to catch the error and show any meaningful information to users - in this case e.g. to users without a screen on HPC systems. Some applications are even commonly run as part of batch scripts and use VTK just for visualization in one step that could be skipped if VTK wouldn’t forcibly abort the software.
The fix for it throwing an error instead was suggested in the merge request https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10500 and discussed in https://gitlab.kitware.com/vtk/vtk/-/issues/19075 with Sankhesh Jhaveri, @cory.quammen and Mathieu Westphal.
As requested in the above merge request, I am hereby opening a Discourse discussion regarding it.