Bug report #15179

regression: opening and closing the properties window on a non-geometry layer (e.g. csv) crashes QGIS

Added by Mathieu Pellerin - nIRV over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Martin Dobias
Category:Vectors
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:23118

Description

QGIS crashes when opening and closing the layer properties window of a non-geometry layer such as a csv dataset. It has to do with the style dock's undo stack.

Steps to reproduce
  1. Create a new project
  2. Add a non-geometry dataset (csv, xlsx, etc.)
  3. Open the layer's properties window
  4. Close the properties window by clicking on the [ OK ] button
  5. boom QGIS dies

gdb trace

#0  QUndoStack::index (this=0x108) at util/qundostack.cpp:754
#1  0x00007ffff7819f21 in QgsUndoWidget::setUndoStack (this=0x17c93d0, undoStack=0x108)
    at /home/webmaster/dev/cpp/QGIS/src/app/qgsundowidget.cpp:151
#2  0x00007ffff772e27e in QgsLayerStylingWidget::updateCurrentWidgetLayer (this=0x179e360)
    at /home/webmaster/dev/cpp/QGIS/src/app/qgslayerstylingwidget.cpp:283
#3  0x00007ffff7554646 in QgisApp::showLayerProperties (this=0xb50050, ml=0xab77e30)
    at /home/webmaster/dev/cpp/QGIS/src/app/qgisapp.cpp:11353
#4  0x00007ffff753723c in QgisApp::layerProperties (this=0xb50050) at /home/webmaster/dev/cpp/QGIS/src/app/qgisapp.cpp:6286
#5  0x00007ffff7973c2f in QgisApp::qt_static_metacall (_o=0xb50050, _c=QMetaObject::InvokeMetaMethod, _id=19, _a=0x7fffffffb4a0)
    at /home/webmaster/dev/cpp/QGIS/bm/src/app/moc_qgisapp.cxx:670
#6  0x00007ffff58f6010 in QMetaObject::activate ([email protected]=0x2ea69e0, [email protected]=0x7ffff571eda0 <QAction::staticMetaObject>, 
    [email protected]=1, [email protected]=0x7fffffffb4a0) at kernel/qobject.cpp:3567
#7  0x00007ffff4c21d62 in QAction::triggered ([email protected]=0x2ea69e0, _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#8  0x00007ffff4c230b3 in QAction::activate ([email protected]=0x2ea69e0, [email protected]=QAction::Trigger) at kernel/qaction.cpp:1257
#9  0x00007ffff50849fd in QMenuPrivate::activateCausedStack ([email protected]=0xafd9170, causedStack=..., [email protected]=0x2ea69e0, 
    [email protected]=QAction::Trigger, [email protected]=true) at widgets/qmenu.cpp:1037
#10 0x00007ffff5088de9 in QMenuPrivate::activateAction (this=0xafd9170, action=0x2ea69e0, action_e=QAction::Trigger, self=<optimized out>)
    at widgets/qmenu.cpp:1129
#11 0x00007ffff4c7e8d0 in QWidget::event ([email protected]=0x267fb40, [email protected]=0x7fffffffbbc0) at kernel/qwidget.cpp:8775
#12 0x00007ffff508cffb in QMenu::event (this=0x267fb40, e=0x7fffffffbbc0) at widgets/qmenu.cpp:2480
#13 0x00007ffff4c27fdc in QApplicationPrivate::notify_helper ([email protected]=0x947f00, [email protected]=0x267fb40, 
    [email protected]=0x7fffffffbbc0) at kernel/qapplication.cpp:4570
#14 0x00007ffff4c2f0d6 in QApplication::notify (this=<optimized out>, receiver=0x267fb40, e=0x7fffffffbbc0) at kernel/qapplication.cpp:4113
#15 0x00007ffff5fc5999 in QgsApplication::notify (this=0x7fffffffdae0, receiver=0x267fb40, event=0x7fffffffbbc0)
    at /home/webmaster/dev/cpp/QGIS/src/core/qgsapplication.cpp:281
#16 0x00007ffff58e190d in QCoreApplication::notifyInternal (this=0x7fffffffdae0, [email protected]=0x267fb40, 
    [email protected]=0x7fffffffbbc0) at kernel/qcoreapplication.cpp:955
#17 0x00007ffff4c2e6dd in QCoreApplication::sendEvent (event=<optimized out>, receiver=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#18 QApplicationPrivate::sendMouseEvent ([email protected]=0x267fb40, [email protected]=0x7fffffffbbc0, 
    [email protected]=0x0, [email protected]=0x267fb40, 
    [email protected]=0x7ffff5753368 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3178
#19 0x00007ffff4cacd7c in QETWidget::translateMouseEvent ([email protected]=0x267fb40, [email protected]=0x7fffffffbef0)
    at kernel/qapplication_x11.cpp:4572
#20 0x00007ffff4cabc83 in QApplication::x11ProcessEvent (this=0x7fffffffdae0, [email protected]=0x7fffffffbef0)
    at kernel/qapplication_x11.cpp:3626
#21 0x00007ffff4cd5542 in x11EventSourceDispatch (s=0x947960, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#22 0x00007fffed33d1a7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fffed33d400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007fffed33d4ac in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff59122ae in QEventDispatcherGlib::processEvents (this=0x8a4ff0, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#26 0x00007ffff4cd5616 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#27 0x00007ffff58e018f in QEventLoop::processEvents ([email protected]=0x7fffffffc2e0, flags=...) at kernel/qeventloop.cpp:149
#28 0x00007ffff58e04f5 in QEventLoop::exec ([email protected]=0x7fffffffc2e0, flags=...) at kernel/qeventloop.cpp:204
#29 0x00007ffff508bb57 in QMenu::exec (this=<optimized out>, p=..., action=0x0) at widgets/qmenu.cpp:2124
#30 0x00007ffff6d5d2cf in QgsLayerTreeView::contextMenuEvent (this=0x12e25d0, event=0x7fffffffca50)
    at /home/webmaster/dev/cpp/QGIS/src/gui/layertree/qgslayertreeview.cpp:123

Associated revisions

Revision 9a28b51e
Added by Martin Dobias over 3 years ago

[styledock] Improve fix for crash with non-spatial layers

Follow up 58dbe56 (which fixes #15179)

History

#1 Updated by Martin Dobias over 3 years ago

  • Assignee set to Martin Dobias

#2 Updated by Martin Dobias over 3 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF