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 crashes when I do "print (field_name)" #28711

Closed
qgib opened this issue Dec 28, 2018 · 3 comments
Closed

QGIS crashes when I do "print (field_name)" #28711

qgib opened this issue Dec 28, 2018 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority PyQGIS Related to the PyQGIS API

Comments

@qgib
Copy link
Contributor

qgib commented Dec 28, 2018

Author Name: Babacar FASSA (@Babacarfassa)
Original Redmine Issue: 20892
Affected QGIS version: 3.4.2
Redmine category:python_bindings_/_sipify


Hello,

i have a problem when i run this code. Can some one help.

User Feedback

shape_boite = self.parameterAsSource(parameters, self.BOITE, context)
shape_point_technique = self.parameterAsSource(parameters, self.PT, context)
shape_cables = self.parameterAsSource(parameters, self.CABLE, context)
field_name=self.parameterAsFields(parameters, self.testfield, context)
print (field_name)

when i print field_name, qgis crached

Report Details

Crash ID: c27feb63aef8c3825e8e636c714477104066e3e8

Stack Trace

QRasterPaintEngine::penChanged :
QPainter::setPen :
QsciScintillaBase::inputMethodQuery :
QsciScintillaBase::inputMethodQuery :
QsciStyledText::text :
QsciStyledText::text :
QsciStyledText::text :
QsciStyledText::text :
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 :
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 :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.4.2-Madeira
QGIS code revision: 22034aa
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.3.2
Running against GDAL: 2.3.2

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

@qgib
Copy link
Contributor Author

qgib commented Dec 28, 2018

Author Name: Giovanni Manghi (@gioman)


  • crashes_corrupts_data was changed from 0 to 1
  • priority_id was changed from Normal to High
  • category_id was changed from Unknown to Python bindings / sipify
  • subject was changed from Qgis crached when i print fieldname to QGIS crashes when I do "print (field_name)"

@qgib
Copy link
Contributor Author

qgib commented Dec 28, 2018

Author Name: Nyall Dawson (@nyalldawson)


Don't use "print" from a background thread - it's not thread safe. Use the feedback object instead.


  • resolution was changed from to invalid
  • status_id was changed from Open to Rejected

@qgib qgib closed this as completed Dec 28, 2018
@qgib
Copy link
Contributor Author

qgib commented Dec 31, 2018

Author Name: Babacar FASSA (@Babacarfassa)


Thanks you Nyall for the responds.

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority PyQGIS Related to the PyQGIS API 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 PyQGIS Related to the PyQGIS API
Projects
None yet
Development

No branches or pull requests

1 participant