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

Crash with custom ui for form #25461

Closed
qgib opened this issue Nov 27, 2017 · 8 comments
Closed

Crash with custom ui for form #25461

qgib opened this issue Nov 27, 2017 · 8 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Forms

Comments

@qgib
Copy link
Contributor

qgib commented Nov 27, 2017

Author Name: Hugo Mercier (@mhugo)
Original Redmine Issue: 17564
Affected QGIS version: master
Redmine category:edit_widget
Assignee: Matthias Kuhn


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
@qgib
Copy link
Contributor Author

qgib commented Nov 27, 2017

Author Name: Matthias Kuhn (@m-kuhn)


You wouldn't have a trace ready by any chance?

@qgib
Copy link
Contributor Author

qgib commented Nov 27, 2017

Author Name: Hugo Mercier (@mhugo)


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

@qgib
Copy link
Contributor Author

qgib commented Nov 27, 2017

Author Name: Matthias Kuhn (@m-kuhn)


Thanks a lot,

#5743 should fix it

@qgib
Copy link
Contributor Author

qgib commented Nov 27, 2017

Author Name: Hugo Mercier (@mhugo)


Hmmm, in my case

"mFormEditorWidgets.value( eww->fieldIdx() )" is nullptr in QgsAttributeForm::synchronizeEnabledState

0x00007ffff1fd12e9 in QgsAttributeFormEditorWidget::setConstraintResultVisible (this=0x0, editable=false)

@qgib
Copy link
Contributor Author

qgib commented Nov 27, 2017

Author Name: Matthias Kuhn (@m-kuhn)


Silly me... Of course.

@qgib
Copy link
Contributor Author

qgib commented Nov 28, 2017

Author Name: Anónimo (Anónimo)


Applied in changeset 3c702c0.


  • status_id was changed from Open to Closed
  • done_ratio was changed from 0 to 100

@qgib qgib closed this as completed Nov 28, 2017
@qgib
Copy link
Contributor Author

qgib commented Nov 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to fixed/implemented

@qgib
Copy link
Contributor Author

qgib commented Mar 12, 2018

Author Name: Jürgen Fischer (@jef-n)


  • description was changed from Problem introduced according to git bisect by a recent commit by David
    53d642

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 attribut form

  • use the identify tool on a feature

  • crash

    to Problem introduced according to git bisect by commit: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

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

No branches or pull requests

1 participant