Bug report #17564
Crash with custom ui for form
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Matthias Kuhn | ||
Category: | Edit widget | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 25461 |
Description
Problem introduced according to git bisect by 53d642 by David
Steps to reproduce:- take a vector layer with a (text) field "name"
- create a .ui widget with a QLineEdit with name "name"
- use this .ui as the attribute form
- use the identify tool on a feature
- crash
Associated revisions
Fix crash with constraint results and custom .ui
Fix #17564
History
#1 Updated by Matthias Kuhn almost 7 years ago
You wouldn't have a trace ready by any chance?
#2 Updated by Hugo Mercier almost 7 years ago
Thread 1 "qgis" received signal SIGSEGV, Segmentation fault. 0x00007ffff1fd12e9 in QgsAttributeFormEditorWidget::setConstraintResultVisible (this=0x0, editable=false) at /home/hme/src/QGIS/src/gui/qgsattributeformeditorwidget.cpp:114 114 mConstraintResultLabel->setHidden( !editable ); (gdb) bt #0 0x00007ffff1fd12e9 in QgsAttributeFormEditorWidget::setConstraintResultVisible (this=0x0, editable=false) at /home/hme/src/QGIS/src/gui/qgsattributeformeditorwidget.cpp:114 #1 0x00007ffff1fbdf5c in QgsAttributeForm::synchronizeEnabledState (this=0x306c0d0) at /home/hme/src/QGIS/src/gui/qgsattributeform.cpp:983 #2 0x00007ffff1fb96de in QgsAttributeForm::setFeature (this=0x306c0d0, feature=...) at /home/hme/src/QGIS/src/gui/qgsattributeform.cpp:243 #3 0x00007ffff1fb862f in QgsAttributeForm::QgsAttributeForm (this=0x306c0d0, vl=0x3098800, feature=..., context=..., parent=0x327ce00) at /home/hme/src/QGIS/src/gui/qgsattributeform.cpp:72 #4 0x00007ffff1fb7622 in QgsAttributeDialog::init (this=0x327ce00, layer=0x3098800, feature=0x2f61450, context=..., showDialogButtons=true) at /home/hme/src/QGIS/src/gui/qgsattributedialog.cpp:97 #5 0x00007ffff1fb6e88 in QgsAttributeDialog::QgsAttributeDialog (this=0x327ce00, vl=0x3098800, thepFeature=0x2f61450, featureOwner=true, parent=0x2f76f90, showDialogButtons=true, context=...) at /home/hme/src/QGIS/src/gui/qgsattributedialog.cpp:30 #6 0x00007ffff720a170 in QgsFeatureAction::newDialog (this=0x7fffffffba80, cloneFeature=true) at /home/hme/src/QGIS/src/app/qgsfeatureaction.cpp:67 #7 0x00007ffff720ab4f in QgsFeatureAction::viewFeatureForm (this=0x7fffffffba80, h=0x3048680) at /home/hme/src/QGIS/src/app/qgsfeatureaction.cpp:115 #8 0x00007ffff71fcaf5 in QgsIdentifyResultsDialog::featureForm (this=0x2f76f90) at /home/hme/src/QGIS/src/app/qgsidentifyresultsdialog.cpp:1693 #9 0x00007ffff71f6ee1 in QgsIdentifyResultsDialog::show (this=0x2f76f90) at /home/hme/src/QGIS/src/app/qgsidentifyresultsdialog.cpp:969 #10 0x00007ffff7283372 in QgsMapToolIdentifyAction::canvasReleaseEvent (this=0xf795f0, e=0x5a62770) at /home/hme/src/QGIS/src/app/qgsmaptoolidentifyaction.cpp:158 #11 0x00007ffff2106808 in QgsMapCanvas::mouseReleaseEvent (this=0xda7530, e=0x7fffffffc430) at /home/hme/src/QGIS/src/gui/qgsmapcanvas.cpp:1434 #12 0x00007ffff5487f88 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #13 0x00007ffff5586b4e in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #14 0x00007ffff5796e93 in QGraphicsView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #15 0x00007ffff4b52172 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #16 0x00007ffff544503c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #17 0x00007ffff544ac19 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #18 0x00007ffff6016c7b in QgsApplication::notify (this=0x7fffffffd880, receiver=0xdbe7b0, event=0x7fffffffc430) at /home/hme/src/QGIS/src/core/qgsapplication.cpp:317 #19 0x00007ffff4b5238b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #20 0x00007ffff5449b32 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #21 0x00007ffff54a257b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #22 0x00007ffff54a4b3b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #23 0x00007ffff544505c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #24 0x00007ffff544a516 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #25 0x00007ffff6016c7b in QgsApplication::notify (this=0x7fffffffd880, receiver=0x2b283a0, event=0x7fffffffc8e0) at /home/hme/src/QGIS/src/core/qgsapplication.cpp:317 #26 0x00007ffff4b5238b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #27 0x00007ffff4e944e1 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #28 0x00007ffff4e961a5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #29 0x00007ffff4e79f08 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #30 0x00007fffd5b16060 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #31 0x00007fffec49e197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #32 0x00007fffec49e3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #33 0x00007fffec49e49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #34 0x00007ffff4ba87cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #35 0x00007ffff4b4fb4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #36 0x00007ffff4b57bec in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #37 0x00000000004135e0 in main (argc=3, argv=0x7fffffffdce8) at /home/hme/src/QGIS/src/app/main.cpp:1398
#3 Updated by Matthias Kuhn almost 7 years ago
Thanks a lot,
https://github.com/qgis/QGIS/pull/5743 should fix it
#4 Updated by Hugo Mercier almost 7 years ago
Hmmm, in my case
"mFormEditorWidgets.value( eww->fieldIdx() )" is nullptr in QgsAttributeForm::synchronizeEnabledState
0x00007ffff1fd12e9 in QgsAttributeFormEditorWidget::setConstraintResultVisible (this=0x0, editable=false)
#5 Updated by Matthias Kuhn almost 7 years ago
Silly me... Of course.
#6 Updated by Anonymous almost 7 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset qgis|3c702c07a0ab6fa03024e170c826a24351fb86e0.
#7 Updated by Giovanni Manghi almost 7 years ago
- Resolution set to fixed/implemented
#8 Updated by Jürgen Fischer over 6 years ago
- Description updated (diff)