Bug report #20140

QgsExternalResourceWidgetWrapper crashes

Added by Benjamin Jakimow about 2 years ago. Updated almost 2 years ago.

Status:Closed
Priority:High
Assignee:David Signer
Category:Attribute table
Affected QGIS version:3.4.1 Regression?:Yes
Operating System:Win10 64 bit Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:Yes Copied to github as #:27961

Description

QGIS crashes when using a QgsExternalResourceWidget in the Attribute TableView to edit the String Field value of a QgsVectorLayer (tested in-memory and geopackage)

Test-Case: Assume we have a QgsVectorFile with string QgsField "textfield"

1. Layer Properties -> Attribute Forms -> set Widget Type of "textfield" to "Attachment" (activates the QgsExternalResourceWidgetWrapper + Factory) (01_AttributeFormDialog.png)
2. Open Attribute Table View, activate Edit mode and try to edit attribute "textfield" creates an edit widget (02_EditTableView.png)
3. Left-Mouse-clock on "..." button opens a "select file dialog" BUT the edit widget disappears meanwhile (03_DisappearedEditWidget.png)
4. Leaving the "select file dialog" (accept/cancel) crashed QGIS

Similar behavior was observed for own implementations of QgsEditorWidgetWrappers using QGIS Python API.

Stack Trace

IUnknown_QueryService :
DllGetClassObject :
DllGetClassObject :
QDialog::exec :
QFileDialog::getOpenFileUrl :
QFileDialog::getOpenFileName :
QgsFileWidget::openFileDialog :
QMetaObject::activate :
QAbstractButton::clicked :
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: 0de984d7f9
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: 10.0.17134

01_AttributeFormDialog.png (51.5 KB) Benjamin Jakimow, 2018-10-17 06:01 PM

02_EditTableView.png (9.57 KB) Benjamin Jakimow, 2018-10-17 06:11 PM

03_DisappearedEditWidget.png (50.4 KB) Benjamin Jakimow, 2018-10-17 06:11 PM


Related issues

Duplicates QGIS Application - Bug report #19118: Crash when clicking browse button in attachment edit widget Open 2018-06-05

History

#1 Updated by David Signer about 2 years ago

I can reproduce that on Linux.
But it crashes before opening the file dialog.

#2 Updated by David Signer about 2 years ago

  • Assignee set to David Signer

#3 Updated by Giovanni Manghi about 2 years ago

  • Status changed from Open to Feedback

Please try on QGIS 3.4.1, if the issue is still valid change the affected version, thanks.

#4 Updated by Benjamin Jakimow about 2 years ago

Same crash happens with:

QGIS version 3.4.1-Madeira
QGIS code revision 383851c597
Compiled against Qt 5.11.2
Running against Qt 5.11.2
Compiled against GDAL/OGR 2.3.2
Running against GDAL/OGR 2.3.2

#5 Updated by Benjamin Jakimow about 2 years ago

It seems that I don't have access rights to modify the affected version of this issue.

#6 Updated by Harrissou Santanna about 2 years ago

  • Affected QGIS version changed from 3.2.3 to 3.4.1

#7 Updated by Giovanni Manghi about 2 years ago

  • Status changed from Feedback to Open

#8 Updated by Julien Cabieces almost 2 years ago

  • Status changed from Open to Closed
  • Resolution set to duplicate

Same as #19118

Cannot reproduce on Linux

#9 Updated by Jürgen Fischer almost 2 years ago

  • Duplicates Bug report #19118: Crash when clicking browse button in attachment edit widget added

Also available in: Atom PDF