enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.3k stars 285 forks source link

Qt4 segfault on mlab.mesh() #412

Open ntfrgl opened 8 years ago

ntfrgl commented 8 years ago

I have installed mayavi 4.4.4, based on Python 2.7.12, VTK 6.3.0 and Qt 4.8.7. My system is Arch Linux. I can import mayavi and minimal examples of traitsui open Qt windows as expected. But when I try to run the first mlab demo, I am presented with a segfault on the line:

s = mlab.mesh(x, y, z)

The stack as reported by gdb is:

Program received signal SIGSEGV, Segmentation fault.
#0  0x00007fffee559804 in QObject::moveToThread(QThread*) () from /usr/lib/libQtCore.so.4
#1  0x00007fffee522d7e in QFactoryLoader::instance(QString const&) const () from /usr/lib/libQtCore.so.4
#2  0x00007fffec1abf35 in ?? () from /usr/lib/libQtGui.so.4
#3  0x00007fffec1acf55 in ?? () from /usr/lib/libQtGui.so.4
#4  0x00007fffec1ae7e8 in QImageReader::read(QImage*) () from /usr/lib/libQtGui.so.4
#5  0x00007fffec1ae9d4 in QImageReader::read() () from /usr/lib/libQtGui.so.4
#6  0x00007fffec1c221a in QPixmapData::fromFile(QString const&, char const*, QFlags<Qt::ImageConversionFlag>) () from /usr/lib/libQtGui.so.4
#7  0x00007fffec1bac34 in QPixmap::load(QString const&, char const*, QFlags<Qt::ImageConversionFlag>) () from /usr/lib/libQtGui.so.4
#8  0x00007fffec1bc9e0 in QPixmap::QPixmap(QString const&, char const*, QFlags<Qt::ImageConversionFlag>) () from /usr/lib/libQtGui.so.4
#9  0x00007fffed1d1c45 in ?? () from /usr/lib/python2.7/site-packages/PyQt4/QtGui.so
#10 0x00007fffed1d1faa in ?? () from /usr/lib/python2.7/site-packages/PyQt4/QtGui.so
#11 0x00007fffeeda7643 in ?? () from /usr/lib/python2.7/site-packages/sip.so
#12 0x00007ffff7a95ced in type_call () from /usr/lib/libpython2.7.so.1.0
#13 0x00007ffff7a3c662 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0
#14 0x00007ffff7ad9665 in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0
...
ntfrgl commented 8 years ago

This basically means that I can't use MayaVi at all on my machine. I would be very thankful for an investigative hint.

prabhuramachandran commented 8 years ago

Did you start IPython with a GUI? i.e. did you do %gui qt ?

What happens if you run mayavi2 the application? If none of these work can you please try running this:

 $ python -m tvtk.pyface.ui.qt4.QVTKRenderWindowInteractor

does this work at all? If it does not, can you try with the latest version of Mayavi from git if that is possible?