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

QGIS don't like print() - Statements in Processing plugin #27381

Closed
qgib opened this issue Aug 7, 2018 · 2 comments
Closed

QGIS don't like print() - Statements in Processing plugin #27381

qgib opened this issue Aug 7, 2018 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@qgib
Copy link
Contributor

qgib commented Aug 7, 2018

Author Name: Michael Kuerbs (Michael Kuerbs)
Original Redmine Issue: 19554
Affected QGIS version: 3.2.1
Redmine category:processing/core


User Feedback

QGIS don't like print("abc") - Statements in my Processing plugin

Report Details

Crash ID: 2ff0f4e1d6bebc384fef9db4f389363c652392af

Stack Trace

QsciLexerMakefile::qt_static_metacall :
QsciLexerMakefile::qt_static_metacall :
QsciLexerMakefile::qt_static_metacall :
QsciLexerMakefile::qt_static_metacall :
QsciScintillaBase::inputMethodQuery :
PyInit_Qsci :
QWidget::event :
QFrame::event :
PyInit_Qsci :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QWidgetPrivate::drawWidget :
QApplication::windowIcon :
QWidget::event :
QMainWindow::event :
QgisApp::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
PyCFunction_FastCallDict :
PyObject_GenericGetAttr :
PyEval_EvalFrameDefault :
PyFunction_FastCallDict :
PyObject_CallFunctionObjArgs :
PyObject_Call :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
QMetaObject::activate :
QAbstractItemView::doubleClicked :
QTreeView::mouseDoubleClickEvent :
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.2.1-Bonn
QGIS code revision: 1edf372
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 6.1.7601

@qgib
Copy link
Contributor Author

qgib commented Aug 7, 2018

Author Name: Michael Kuerbs (Michael Kuerbs)


  • assigned_to_id removed Victor Olaya

@qgib
Copy link
Contributor Author

qgib commented Aug 7, 2018

Author Name: Nyall Dawson (@nyalldawson)


Correct - it's not thread safe, so calling from a processing algorithm results in a crash. Use the thread safe QgsMessageLog instead, or better yet report feedback messages using the feedback object passed to your algorithm. Then they'll be correctly logged and shown to users.


  • resolution was changed from to wontfix
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Aug 7, 2018
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms Crash/Data Corruption labels May 25, 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 High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant