segfault with vtkLineIntegralConvolution2D
Bug description
Hello,
This Python code:
import vtk
obj = vtk.vtkRenderingLICPython.vtkLineIntegralConvolution2D()
obj.GetCommunicator()
Produce a segmentation fault, or this exeception:
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
Aborted
There is a GDB backtracer here
My context is installing Mayavi, which setup.py executes the above code.
Bellow are the steps to reproduce the bug on a CentOS 7.2 virtual machine using Vagrant.
Thanks,
David
How to reproduce
Set up VM: vagrant init puppetlabs/centos-7.2-64-nocm
You may want to add memory and cpu in the Vagrantfile:
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 8
end
Start and connect the vagrant machine:
vagrant up
vagrant ssh
Install dependenices:
sudo yum install -y \
gcc-c++ \
libXt-devel \
mesa-libGLU-devel \
cmake \
libpng-devel \
libjpeg-devel \
python-devel
Get VTK sources:
wget http://www.vtk.org/~TK-7.1.0.tar.gz
tar xvzf VTK-7.1.0.tar.gz
cd VTK-7.1.0
Configure:
mkdir build
cd build
cmake .. \
-Wno-dev \
-DBUILD_DOCUMENTATION:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF \
-DBUILD_EXAMPLES:BOOL=OFF \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DVTK_WRAP_PYTHON:BOOL=ON \
-DVTK_ENABLE_VTKPYTHON:BOOL=OFF \
-DVTK_HAS_FEENABLEEXCEPT:BOOL=OFF \
-DVTK_RENDERING_BACKEND=OpenGL
Build: make
Install:
sudo make install
export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:/usr/local/lib/python2.7/site-packages/vtk/
export LD_LIBRARY_PATH=/usr/local/lib/
In Python:
import vtk
obj = vtk.vtkRenderingLICPython.vtkLineIntegralConvolution2D()
obj.GetCommunicator()