Bug report #8242

QGIS crashes when removing a postgis layer after renaming a column

Added by Giovanni Manghi about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Data Provider/PostGIS
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 #:17053

Description

Add a postgis layer

rename a column (I used DB Manager)

remove the layer -> crash

please notice that after renaming the column, the table of attributes of the layer is empty. Refreshing the canvas does not help, it is necessary to add again the layer.

Not sure if it is a regression.

Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_US]
WARNING:  there is no transaction in progress
Fatal: QGIS died on signal 11
Stacktrace (piped through c++filt):
/usr/bin/qgis.bin(myMessageOutput(QtMsgType, char const*)+0xe2)[0x4e7f12]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(qt_message_output(QtMsgType, char const*)+0x2e)[0x7fd02e09141e]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(+0x718bf)[0x7fd02e0918bf]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(qFatal(char const*, ...)+0x94)[0x7fd02e091a64]
/lib/x86_64-linux-gnu/libc.so.6(+0x364a0)[0x7fd02b5824a0]
/usr/lib/qgis/plugins/libpostgresprovider.so(QgsPostgresProvider::~QgsPostgresProvider()+0x362)[0x7fd007f9a852]
/usr/lib/qgis/plugins/libpostgresprovider.so(QgsPostgresProvider::~QgsPostgresProvider()+0x9)[0x7fd007f9aca9]
/usr/lib/libqgis_core.so.1.9.0(QgsVectorLayer::~QgsVectorLayer()+0x37)[0x7fd02f1fc4d7]
/usr/lib/libqgis_core.so.1.9.0(QgsVectorLayer::~QgsVectorLayer()+0x9)[0x7fd02f1fcc09]
/usr/lib/libqgis_core.so.1.9.0(QgsMapLayerRegistry::removeMapLayers(QStringList)+0x1af)[0x7fd02f14e11f]
/usr/bin/qgis.bin(QgsLegend::removeSelectedLayers()+0x18d)[0x75c33d]
/usr/bin/qgis.bin(QgisApp::removeLayer()+0x106)[0x514d96]
/usr/bin/qgis.bin[0x7ce51a]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QMetaObject::activate(QObject*, QMetaObject const*, int, void**)+0x2b1)[0x7fd02e1af281]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAction::triggered(bool)+0x32)[0x7fd02d517132]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAction::activate(QAction::ActionEvent)+0x6f)[0x7fd02d51731f]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x617119)[0x7fd02d969119]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x61d272)[0x7fd02d96f272]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QWidget::event(QEvent*)+0x684)[0x7fd02d56e144]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QMenu::event(QEvent*)+0x5b)[0x7fd02d97080b]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0xb4)[0x7fd02d51d894]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::notify(QObject*, QEvent*)+0xabf)[0x7fd02d5230bf]
/usr/lib/libqgis_core.so.1.9.0(QgsApplication::notify(QObject*, QEvent*)+0x96)[0x7fd02f0aabd6]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x8c)[0x7fd02e19ae9c]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)+0x172)[0x7fd02d51e862]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x24c2c1)[0x7fd02d59e2c1]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::x11ProcessEvent(_XEvent*)+0xdce)[0x7fd02d59cbae]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x2740d2)[0x7fd02d5c60d2]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x133)[0x7fd02a0aed53]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x480a0)[0x7fd02a0af0a0]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x34)[0x7fd02a0af164]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x6f)[0x7fd02e1ca3bf]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x273d5e)[0x7fd02d5c5d5e]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x32)[0x7fd02e199c82]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xf7)[0x7fd02e199ed7]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QMenu::exec(QPoint const&, QAction*)+0x71)[0x7fd02d96c131]
/usr/bin/qgis.bin(QgsLegend::handleRightClickEvent(QTreeWidgetItem*, QPoint const&)+0x54b)[0x75ffcb]
/usr/bin/qgis.bin(QgsLegend::mousePressEvent(QMouseEvent*)+0x107)[0x7611b7]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QWidget::event(QEvent*)+0x969)[0x7fd02d56e429]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QFrame::event(QEvent*)+0x26)[0x7fd02d92e3b6]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAbstractItemView::viewportEvent(QEvent*)+0x3eb)[0x7fd02da4289b]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QTreeView::viewportEvent(QEvent*)+0x135)[0x7fd02da8a4b5]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*)+0x88)[0x7fd02e19b028]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0x7f)[0x7fd02d51d85f]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::notify(QObject*, QEvent*)+0xabf)[0x7fd02d5230bf]
/usr/lib/libqgis_core.so.1.9.0(QgsApplication::notify(QObject*, QEvent*)+0x96)[0x7fd02f0aabd6]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x8c)[0x7fd02e19ae9c]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)+0x172)[0x7fd02d51e862]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x24bbf5)[0x7fd02d59dbf5]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::x11ProcessEvent(_XEvent*)+0xdce)[0x7fd02d59cbae]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x2740d2)[0x7fd02d5c60d2]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x133)[0x7fd02a0aed53]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x480a0)[0x7fd02a0af0a0]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x34)[0x7fd02a0af164]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x6f)[0x7fd02e1ca3bf]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x273d5e)[0x7fd02d5c5d5e]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x32)[0x7fd02e199c82]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xf7)[0x7fd02e199ed7]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QCoreApplication::exec()+0x87)[0x7fd02e19ef67]
/usr/bin/qgis.bin(main+0x229e)[0x4e3d6e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fd02b56d76d]
/usr/bin/qgis.bin[0x4e7c81]
Aborted (core dumped)

Related issues

Duplicated by QGIS Application - Bug report #8282: QGis Crashes when a PostGIS Layer is modified (ie in pgAd... Closed 2013-07-12

Associated revisions

Revision 6f82a898
Added by Jürgen Fischer about 6 years ago

postgres provider: reload fields if a cursor query fails (fixes #8242)

History

#1 Updated by Salvatore Larosa about 6 years ago

  • Priority changed from High to Severe/Regression

on 1.8 it works beautifully.

#2 Updated by Jürgen Fischer about 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF