Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash using Python console and latest QScintilla 2.7 #16053

Closed
qgib opened this issue Jan 3, 2013 · 6 comments
Closed

Crash using Python console and latest QScintilla 2.7 #16053

qgib opened this issue Jan 3, 2013 · 6 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Plugins
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jan 3, 2013

Author Name: Larry Shaffer (Larry Shaffer)
Original Redmine Issue: 6940
Affected QGIS version: master
Redmine category:python_plugins
Assignee: Salvatore Larosa


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.


@qgib
Copy link
Contributor Author

qgib commented Jan 3, 2013

Author Name: Giovanni Manghi (@gioman)


tagging as blocker as we don't want to ship new features, but not working as expected.


  • priority_id was changed from Normal to Severe/Regression

@qgib
Copy link
Contributor Author

qgib commented Jan 3, 2013

Author Name: Larry Shaffer (Larry Shaffer)


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.

@qgib
Copy link
Contributor Author

qgib commented Jan 3, 2013

Author Name: Giovanni Manghi (@gioman)


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.

@qgib
Copy link
Contributor Author

qgib commented Jan 3, 2013

Author Name: Larry Shaffer (Larry Shaffer)


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.


  • 5235 was configured as console_output_qsci2.7_patch.diff
  • pull_request_patch_supplied was changed from 0 to 1
  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2013

Author Name: Salvatore Larosa (@slarosa)


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)

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2013

Author Name: Larry Shaffer (Larry Shaffer)


Fixed in changeset "866bc22a34f197dfb341de0b46a088bfdea868de".


  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins Crash/Data Corruption labels May 24, 2019
@qgib qgib added this to the Version 2.0.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Plugins
Projects
None yet
Development

No branches or pull requests

1 participant