Closed pllim closed 9 years ago
Hi @pllim, I've encountered it on the rare occasion. I assume that indeed it has something to do with the qt library and maybe python destructors being called incorrectly in some odd state. I have heard that it is better to do something like this:
obj.deleteLater()
obj = None
than to call obj.destroy()
. Maybe we should try changing all existing calls to destroy()
to use this technique? Could you try it and let me know if it makes a difference for the amount of segfaults you are getting? It happens so rarely for me I'm not sure I could be sure I had actually changed any behavior. If it works fine I'd be happy to merge a PR.
@ejeschke , do you use Qt or GTK?
By the way, deleteLater()
does not help in my case. I'll see if adding it to my custom plugins help. Will keep you updated.
GInga-wise, I use Qt for some machines and Gtk on our observation control system. So both are getting used regularly.
Update: The seg fault went away when I switched toolkit from PySide to PyQt4. In doing that, I didn't have to add deleteLater()
to my custom plugins. I was using your latest version on master
.
I don't know if you wish to add a warning about seg fault when using Ginga with PySide. You may close this issue when you wish.
Thanks!
And just in case you are curious, both my PySide and PyQt4 versions are the latest available on Anaconda. Here is my conda list
:
abstract-rendering 0.5.1 np19py27_0
anaconda 2.1.0 np19py27_0
argcomplete 0.8.1 py27_0
astropy 1.0.2 np19py27_0
atom 0.3.9 py27_0
backports.ssl-match-hostname 3.4.0.2 <pip>
beautiful-soup 4.3.2 py27_0
beautifulsoup4 4.3.2 <pip>
binstar 0.7.1 py27_0
bitarray 0.8.1 py27_0
blaze 0.6.3 np19py27_0
blz 0.6.2 np19py27_0
bokeh 0.6.1 np19py27_0
boto 2.32.1 py27_0
cairo 1.12.2 2
casuarius 1.1 py27_0
cdecimal 2.3 py27_0
cffi 0.8.6 py27_0
chaco 4.4.1 np19py27_0
colorama 0.3.1 py27_0
conda 3.10.1 py27_0
conda-build 1.8.2 py27_0
conda-env 2.1.4 py27_0
configobj 5.0.6 py27_0
cryptography 0.5.4 py27_0
curl 7.38.0 0
cython 0.21 py27_0
cytoolz 0.7.0 py27_0
datashape 0.3.0 np19py27_1
dateutil 2.1 py27_2
decorator 3.4.0 py27_0
docutils 0.12 py27_0
dynd-python 0.6.5 np19py27_0
enable 4.3.0 np19py27_2
enaml 0.9.8 py27_0
flask 0.10.1 py27_1
fontconfig 2.11.1 3
freetype 2.5.2 0
future 0.13.1 py27_0
futures 2.1.6 py27_0
gevent 1.0.1 py27_0
gevent-websocket 0.9.3 py27_0
ginga 2.3.20150422073626 <pip>
greenlet 0.4.4 py27_0
grin 1.2.1 py27_1
h5py 2.3.1 np19py27_0
hdf5 1.8.13 0
ipython 2.2.0 py27_0
ipython-notebook 2.2.0 py27_0
ipython-qtconsole 2.2.0 py27_0
itsdangerous 0.24 py27_0
jdcal 1.0 py27_0
jinja2 2.7.3 py27_1
jpeg 8d 0
kiwisolver 0.1.3 py27_0
lcms 1.19 0
libdynd 0.6.5 0
libffi 3.0.13 0
libpng 1.5.13 1
libsodium 0.4.5 0
libtiff 4.0.2 1
libxml2 2.9.0 0
libxslt 1.1.28 0
llvm 3.3 0
llvmpy 0.12.7 py27_0
lxml 3.4.0 py27_0
markupsafe 0.23 py27_0
matplotlib 1.4.0 np19py27_0
mock 1.0.1 py27_0
mpi4py 1.3 py27_0
mpich2 1.4.1p1 0
multipledispatch 0.4.7 py27_0
networkx 1.9.1 py27_0
nltk 3.0.0 np19py27_0
nose 1.3.4 py27_0
numba 0.14.0 np19py27_0
numexpr 2.3.1 np19py27_0
numpy 1.9.2 py27_0
numpydoc 0.5 py27_0
openpyxl 1.8.5 py27_0
openssl 1.0.1k 1
pandas 0.14.1 np19py27_0
patsy 0.3.0 np19py27_0
pep8 1.5.7 py27_0
pil 1.1.7 py27_1
pip 6.1.1 py27_0
pixman 0.26.2 0
ply 3.4 py27_0
psutil 2.1.1 py27_0
py 1.4.25 py27_0
py2cairo 1.10.0 py27_1
pycosat 0.6.1 py27_0
pycparser 2.10 py27_0
pycrypto 2.6.1 py27_0
pycurl 7.19.5 py27_1
pyface 4.4.0 py27_0
pyflakes 0.8.1 py27_0
pygments 2.0.2 py27_0
pyopenssl 0.14 py27_0
pyparsing 2.0.1 py27_0
pyqt 4.11.3 py27_1
pyside 1.2.1 py27_1
pytables 3.1.1 np19py27_1
pytest 2.6.3 py27_0
python 2.7.9 2
python-dateutil 1.5 <pip>
pytz 2014.7 py27_0
pyyaml 3.11 py27_0
pyzmq 14.3.1 py27_0
qt 4.8.6 1
readline 6.2 2
redis 2.6.9 0
redis-py 2.9.1 py27_0
requests 2.6.0 py27_0
rope 0.9.4 py27_1
runipy 0.1.1 py27_0
scikit-image 0.10.1 np19py27_0
scikit-learn 0.15.2 np19py27_0
scipy 0.15.1 np19py27_0
setuptools 15.0 py27_0
shiboken 1.2.1 py27_0
sip 4.16.5 py27_0
six 1.8.0 py27_0
sockjs-tornado 1.0.1 py27_0
sphinx 1.2.3 py27_0
spyder 2.3.1 py27_0
spyder-app 2.3.1 py27_0
sqlalchemy 0.9.7 py27_0
sqlite 3.8.4.1 1
ssl_match_hostname 3.4.0.2 py27_0
statsmodels 0.5.0 np19py27_2
sympy 0.7.5 py27_0
system 5.8 2
tables 3.1.1 <pip>
theano 0.6.0 np19py27_0
tk 8.5.18 0
toolz 0.7.0 py27_0
tornado 4.0.2 py27_0
traits 4.4.0 py27_0
traitsui 4.4.0 py27_0
ujson 1.33 py27_0
unicodecsv 0.9.4 py27_0
util-linux 2.21 0
werkzeug 0.9.6 py27_1
wss-tools 0.1.0.dev0 <pip>
xlrd 0.9.3 py27_0
xlsxwriter 0.5.7 py27_0
xlwt 0.7.5 py27_0
yaml 0.1.4 0
zeromq 4.0.4 0
zlib 1.2.8 0
Thanks, @pllim, I haven't really tested all that much with PySide, so that may indeed be the issue. Some subtle termination race condition issue? In any case, good to hear your experience. I think most people are using with PyQt via anaconda or linux.
Using Ginga with my custom plugins (
ginga -t pyside blahblahblah
), I occasionally encounter segmentation fault when I close Ginga despite everything seemingly works. It is not unlike http://stackoverflow.com/questions/27721469/python-segmentation-fault-core-dumped . A quick search shows that your codes do calldestroy()
in several places. I wonder if that is indeed the cause. Below is mygdb
traceback:Have you encountered this? Maybe it is not your job to fix my custom plugins causing this, but regardless, I want to bring this up in case I am not the only one encountering this issue.