Skip to content
This repository

disable calltips in PySide < 1.0.7 to prevent segfault #963

Merged
merged 2 commits into from over 2 years ago

3 participants

Min RK Thomas Kluyver anatoly techtonik
Min RK
Owner

PySide bug caused segfault when QApplication.topLevelAt(pos) should return None, has been fixed in PySide 1.0.7.

We only call this method in the calltip widget (by far the biggest cause of crashes in the qtconsole), but if we want to call it anywhere else, we should probably just bump the PySide version dependency to 1.0.7 in external.qt.

Min RK disable calltips in PySide < 1.0.7 to prevent segfault
PySide bug caused segfault when QApplication.topLevelAt(pos) should return None,
has been fixed in 1.0.7.
e77c750
Min RK minrk referenced this pull request November 01, 2011
Closed

segfault on mac os x #711

Thomas Kluyver
Collaborator

Looks fine at a glance.

Min RK
Owner

An argument against this one is that it disables calltips perhaps too conservatively. It appears to only be macs affected (not the PySide bug itself, but the code path to the call seems executed only on mac), and it is a very specific call that throws the error, so we could circumvent the call much more narrowly.

I'm fine leaving it like this, though, as PySide is in relatively rapid release cycle right now, as it irons out various bugs, and we should probably bump minimum supported version to at least 1.0.7 before too long.

anatoly techtonik

Just bump min PySide version to 1.0.8 or you will end up with too much if's with PySide versions in your code. =)

Min RK
Owner

When it works fine other than a single minor feature, and apparently on a single platform, I think bumping the minimum to a two-week-old release is excessive. But I agree that we should not let this sort of thing proliferate. At the first sign of a more serious bug, or other similar bug, we should bump it, and depending on timing wrt EPD, etc., it may make sense to push the base when we do actually release 0.12.

anatoly techtonik

@minrk, 1.0.8 contains a fix for PySide bug #1019 that affected spyderlib. The assumption that it is only a single minor feature that does not work is true as long as nobody reported some more. Users are more inclined to search for workarounds than to report bugs, and even if they report thing, I won't be too happy to spend time to troubleshoot some issue with ancient PySide version.

Min RK
Owner

I'm not lobbying that we should compartmentalize every area for it's particular minimum PySide version, but we don't want to draw the line unnecessarily. Approximately all reported crashes of the QtConsole are caused by this bug, which only ever affected OSX (to our knowledge). We will happily bump the version to 1.0.8 (or whatever it is at the time), when the next EPD ships, but preventing the qtconsole from running in environments where it is known to work quite well doesn't make a lot of sense.

Min RK minrk merged commit 23b354b into from November 09, 2011
Min RK minrk closed this November 09, 2011
Brian E. Granger ellisonbg referenced this pull request from a commit January 10, 2012
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Nov 01, 2011
Min RK disable calltips in PySide < 1.0.7 to prevent segfault
PySide bug caused segfault when QApplication.topLevelAt(pos) should return None,
has been fixed in 1.0.7.
e77c750
Nov 09, 2011
Min RK warn when disabling calltips due to old PySide cc01504
This page is out of date. Refresh to see the latest.
8  IPython/frontend/qt/console/frontend_widget.py
@@ -7,6 +7,7 @@
7 7
 
8 8
 # System library imports
9 9
 from pygments.lexers import PythonLexer
  10
+from IPython.external import qt
10 11
 from IPython.external.qt import QtCore, QtGui
11 12
 
12 13
 # Local imports
@@ -118,6 +119,13 @@ class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):
118 119
 
119 120
     def __init__(self, *args, **kw):
120 121
         super(FrontendWidget, self).__init__(*args, **kw)
  122
+        # FIXME: remove this when PySide min version is updated past 1.0.7
  123
+        # forcefully disable calltips if PySide is < 1.0.7, because they crash
  124
+        if qt.QT_API == qt.QT_API_PYSIDE:
  125
+            import PySide
  126
+            if PySide.__version_info__ < (1,0,7):
  127
+                self.log.warn("PySide %s < 1.0.7 detected, disabling calltips" % PySide.__version__)
  128
+                self.enable_calltips = False
121 129
 
122 130
         # FrontendWidget protected variables.
123 131
         self._bracket_matcher = BracketMatcher(self._control)
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.