Bug report #6940
Crash using Python console and latest QScintilla 2.7
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Salvatore Larosa | ||
Category: | Python plugins | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | Yes | Resolution: | |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 16053 |
Description
Hi,
When using the latest QScintilla version 2.7 (libqscintilla2.9.0.0), I get a crash with the console when an error is about to be shown.
This is on Mac, with latest master. Reproduce crash with:
import <some non-existent module>
Mac crash report attached. Looks like something is funky between QGIS issuing the error and QScintilla formatting it for output.
Associated revisions
Fix #6940, error traceback output to console crashes under QScintilla 2.7
History
#1 Updated by Giovanni Manghi almost 12 years ago
- Priority changed from Normal to Severe/Regression
tagging as blocker as we don't want to ship new features, but not working as expected.
#2 Updated by Larry Shaffer almost 12 years ago
Hi Giovanni,
Certainly a blocker for me, but I won't be testing on other Macs, since it is a bit of a hassle to recompile the whole PyQt4/QScintilla setup just to verify it doesn't work, only to have to undo it to get back to a working state (don't have the time right now).
So, I would definitely appreciate verification of this bug on another platform, or another Mac.
#3 Updated by Giovanni Manghi almost 12 years ago
Hi Larry,
So, I would definitely appreciate verification of this bug on another platform, or another Mac.
I will certainly give it a go, at least under Linux.
#4 Updated by Larry Shaffer almost 12 years ago
- File console_output_qsci2.7_patch.diff added
- Pull Request or Patch supplied changed from No to Yes
- Status changed from Open to Feedback
Ok, I fixed the crashing, but would like to know if the patch will work for older QScintilla setups as well. (see attached patch)
I'll test it tonight on a different Mac with QScintilla 2.6 (libqscintilla2.8).
If you run into the crash, or have the time on a pre-QScintilla 2.7 install (even though console is currently working there), please test the patch. It would be good if the patch worked for all QScintilla 'recent' (2.4.5-thru-2.7) installs without having to code for different versions.
#5 Updated by Salvatore Larosa almost 12 years ago
Crash confirmed and the patch fixes the issue !
Tested on Linux (2.6, 2.7) and Win (2.6).
Thanks for the fix !
Please, could you apply the patch to master branch as below ?
if self.style == "traceback": # Show errors in red pos = self.outputArea.SendScintilla(QsciScintilla.SCI_GETCURRENTPOS) self.outputArea.SendScintilla(QsciScintilla.SCI_STARTSTYLING, pos, 31) self.outputArea.append(m) self.outputArea.SendScintilla(QsciScintilla.SCI_SETSTYLING, len(m), 1)
#6 Updated by Larry Shaffer almost 12 years ago
- Status changed from Feedback to Closed
Fixed in changeset 866bc22a34f197dfb341de0b46a088bfdea868de.