Bug report #7653
QGIS Crashes when Docking/Undocking Python Console
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | - | ||
Category: | GUI | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | OS X | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | fixed |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 16573 |
Description
QGIS (d4d26257b77) crashes when docking/undocking Python Console on OS X. Same behavior was not observed on Linux.
Associated revisions
History
#1 Updated by Salvatore Larosa over 11 years ago
- Status changed from Open to Feedback
Hi Gary,
unfortunately I can not debug it on OSX :-( to fix the issue,
so please could you provide more info ?
and maybe some hint ? :-)
Thanks.
#2 Updated by Gary Sherman over 11 years ago
It seems to happen only once the Editor window is enabled and you attempt a docking operation. Docking the Python console itself seems to work fine.
Toggling the Editor open then closed will cause docking operation to fail.
#3 Updated by Nathan Woodrow over 11 years ago
Doesn't seem to happen on Windows 7.
#4 Updated by Larry Shaffer over 11 years ago
Confirmed here, too. Mac 10.7.5, latest master build.
I get a EXC_BAD_ACCESS
crash, but with limited crash report info. Just a bunch (511) of these lines:
0 QtGui 0x000000010d1e72b2 -[QCocoaWindow drawRectSpecial:] + 50 1 QtGui 0x000000010d1e72de -[QCocoaWindow drawRectSpecial:] + 94 2 QtGui 0x000000010d1e72de -[QCocoaWindow drawRectSpecial:] + 94 ... 511 QtGui 0x000000010d1e72de -[QCocoaWindow drawRectSpecial:] + 94
My guess at this point is that the ownership of the editor is in question, and that undocking/docking the console's doc changes parental ownership (on Mac, at least) and the editor isn't an appropriate descendant child when that happens. Dunno, just a guess.
#5 Updated by Salvatore Larosa over 11 years ago
Hi Gary and Larry,
I just saw this bug [1] and appears to be related to this issue.
The problem seems to be in QTabWidget.documentMode, if changed to False the crash should not occur.
so, please could you try commenting out line 609 [2] or set it to False
and let me know if it solves ?
[1] - https://bugreports.qt-project.org/browse/QTBUG-20104
[2] - https://github.com/qgis/Quantum-GIS/blob/master/python/console/console_editor.py#L609
#6 Updated by Larry Shaffer over 11 years ago
Confirmed to fix the issue here: both docking and undocking. Nice cross-platform debug, Salvatore!
Having it be non-document mode should work OK, yes?
#7 Updated by Salvatore Larosa over 11 years ago
Thanks Larry !
I think the documentMode should not change the console behaviour,
so I would prefer to keep it adding a platform check.
#8 Updated by Salvatore Larosa over 11 years ago
- Status changed from Feedback to Closed
Fixed in changeset e22f0d162fdcced81b089611377ece8112ce6dd4.
#9 Updated by Salvatore Larosa over 11 years ago
- Resolution set to fixed