Is there any way to catch a segfault caused by Qt (for example, to log it to a file, etc)? I've tried installing a handler for the SIGSEGV signal, but it doesn't seem to work when a segfault occurs within PyQt. Example:
##################### # install a signal handler import signal def handler(signum, frame): print "Signal handler for signal", signum signal.signal(signal.SIGSEGV, handler) from PyQt4.QtCore import * from PyQt4.QtGui import * app = QApplication([]) model = QStandardItemModel(1,1) model.setItem(0,0,QStandardItem("foo")) proxyModel = QSortFilterProxyModel() proxyModel.setSourceModel(model) # cause a Segmentation fault to happen print "causing segfault" index = proxyModel.index(0,0) print index.internalPointer() app.exec_() ######################## when I run this, the program just hangs forever, and I never see the print statement in my handler.
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt