Commits

Yuya Nishihara  committed daaf9b5

commit

  • Participants
  • Parent commits cb2c50a

Comments (0)

Files changed (2)

File 15317.diff

-# HG changeset patch
-# User Yuya Nishihara <yuya@tcha.org>
-# Date 1382865243 -32400
-#      Sun Oct 27 18:14:03 2013 +0900
-# Branch stable
-# Node ID 0b0597ac6bdc0eb9e0518d9f03b450cc3881c755
-# Parent fc422727ab1fe62067bec47502e2718a5ffd9cfa
-settings: don't listen to events of orphan widgets causing invalid memory access
-
-If a widget isn't parented by SettingsForm, it can be alive after SettingsForm
-is half destroyed.  Thus, QEvent::Destroy of orphan widget can be sent to
-half-dead SettingsForm and sometimes it causes segfault or abort at exit.
-
-    python: malloc.c:4102: malloc_consolidate: Assertion
-    `nextchunk->fd_nextsize->bk_nextsize == nextchunk' failed.
-
-diff --git a/tortoisehg/hgqt/settings.py b/tortoisehg/hgqt/settings.py
---- a/tortoisehg/hgqt/settings.py
-+++ b/tortoisehg/hgqt/settings.py
-@@ -1502,14 +1502,14 @@ class SettingsForm(QWidget):
-             else:
-                 func = e.values
-                 w = func(opts)
--            w.installEventFilter(self)
-             if e.globalonly:
-                 w.setEnabled(self.rcpath == scmutil.userrcpath())
-             lbl = QLabel(e.label)
--            lbl.installEventFilter(self)
-             lbl.setToolTip(e.tooltip)
-             widgets.append(w)
-             if e.isVisible():
-+                lbl.installEventFilter(self)
-+                w.installEventFilter(self)
-                 form.addRow(lbl, w)
- 
-         # assign the master to widgets that have a master
-15317.diff
 settings-segfault-debug.diff
 mqd-curpatchname.diff
 mqd-qgotoclean.diff