Skip to content

Commit

Permalink
Workaround for crash-on-exit in 6.3v8
Browse files Browse the repository at this point in the history
Closes #4 (at least for Nuke 6.3v8, older versions will still crash)

Keeps weakref to widget, so it can be reopened quickly, and retains state easily.

If proper reference is kept, Nuke segfaults on exit with a traceback ending with something like:

0   org.python.python             	0x0000000104e87d8e PyErr_Occurred + 14
1   QtCore.so                     	0x000000010e7c911d QAbstractListModelWrapper::disconnectNotify(char const*) + 31
2   QtCore                        	0x0000000102c2534c QObject::disconnect(QObject const*, char const*, QObject const*, char const*) + 876
3   QtGui                         	0x00000001024612ae QItemSelectionModel::~QItemSelectionModel() + 62
4   QtCore                        	0x0000000102b40bcf QObjectPrivate::deleteChildren() + 95
5   QtGui                         	0x0000000101fadeac QWidget::~QWidget() + 508
6   QtGui.so                      	0x000000010eed211c QListViewWrapper::~QListViewWrapper() + 84
7   QtCore                        	0x0000000102b40bcf QObjectPrivate::deleteChildren() + 95
8   QtGui                         	0x0000000101fadeac QWidget::~QWidget() + 508
  • Loading branch information
dbr committed Jul 6, 2012
1 parent af4aa82 commit 1d10a17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tabtabtab.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,11 @@ def on_create(menupath):
t.show()
t.raise_()

_tabtabtab_instance = t
# Keep the TabTabTabWidget alive, but don't keep an extra
# reference to it, otherwise Nuke segfaults on exit. Hacky.
# https://github.com/dbr/tabtabtab-nuke/issues/4
import weakref
_tabtabtab_instance = weakref.proxy(t)


if __name__ == '__main__':
Expand Down

0 comments on commit 1d10a17

Please sign in to comment.