Bug report #21020
crash on QGraphicsItem.scale()
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Python plugins | ||
Affected QGIS version: | 3.2.3 | Regression?: | No |
Operating System: | Windows 10 64-Bit | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | up/downstream |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 28839 |
Description
User Feedback¶
QGIS crashing on QGraphicsItem.scale() (QGraphicsPixmapItem) used inside my Plugin.
Happens in QGIS 3.2 and 3.4
Doesnt happen all the time
Sometimes crashing without Crash-Report
Report Details¶
Crash ID: 793913a1729c1d2086d29e2805ec02ef0903ac51
Stack Trace
QGraphicsItem::scale : PyCFunction_FastCallDict : PyObject_GenericGetAttr : PyEval_EvalFrameDefault : PyObject_GenericGetAttr : PyEval_EvalFrameDefault : PyErr_Occurred : PyBytes_Resize : PyObject_Call : PyInit_QtCore : PyInit_QtCore : PyInit_QtCore : PyInit_QtCore : PyInit_QtCore : QMetaObject::activate : QAbstractButton::clicked : QAbstractButton::click : QAbstractButton::mouseReleaseEvent : QWidget::event : 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 : CallWindowProcW : DispatchMessageW : 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 : QAction::activate : QAbstractButton::click : QAbstractButton::mouseReleaseEvent : QToolButton::mouseReleaseEvent : QWidget::event : 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 : CallWindowProcW : DispatchMessageW : QEventDispatcherWin32::processEvents : qt_plugin_query_metadata : QEventLoop::exec : QCoreApplication::exec : main : BaseThreadInitThunk : RtlUserThreadStart :
QGIS Info
QGIS Version: 3.2.3-Bonn
QGIS code revision: 9b176802e5
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: 10.0.17134
History
#1 Updated by Giovanni Manghi over 5 years ago
- Priority changed from Normal to High
#2 Updated by Marcel Münzberg over 5 years ago
i could Workaround it by avoiding this:
self.image_ui.zoom_out_button.clicked.connect(lambda: self.zoom_out_pixmap(pixmap_item))
with pixmap_item = QGraphicsPixmapItem instance
without that it Always works to call pixmap_item.scale() (declared it as self.pixmap_item in init now) inside the function zoom_out_pixmap so it seems like there is something wrong with passing the item to the function
I have another use of Lambda in my Project, which results in a crash since upgrade on QGIS 3.4 from 3.2
#3 Updated by Nyall Dawson over 5 years ago
- Resolution set to up/downstream
- Status changed from Open to Closed
This doesn't look like a qgis issue - possibly it's a qt or pyqt change