QGIS crashes with PostgreSQL views #29673
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Crash/Data Corruption
Data Provider
Related to specific vector, raster or mesh data providers
Feedback
Waiting on the submitter for answers
High Priority
Regression
Something which used to work, but doesn't anymore
Author Name: Pietro Rossin (Pietro Rossin)
Original Redmine Issue: 21858
Affected QGIS version: 3.6.1
Redmine category:data_provider/postgis
Assignee: Alessandro Pasotti
Qgis 3.4.6 doesn't load a postgis view without an id and a geometry field (attributes only). DbManager says that the layer is invalid and cannot be loaded.
3.6.1-Noosa load the same view but crashes if I open the attribute table (crash report below).
The problem is solved if I add a counter column with
SELECT row_number() OVER () AS id,
....
...
from my_table
Pietro
Crash ID: 90077a9c9e70291cbc7f1009d8c0fddfd432457a
Stack Trace
QMutex::lock :
sourceSelectProviders :
QgsEnumerationWidgetFactory::fieldScore :
QgsEditorWidgetAutoConf::QgsEditorWidgetAutoConf :
QgsEditorWidgetAutoConf::editorWidgetSetup :
QgsEditorWidgetRegistry::findBest :
QgsAttributeTableModel::loadAttributes :
QgsAttributeTableModel::QgsAttributeTableModel :
QgsDualView::initModels :
QgsDualView::init :
QgsAttributeTableDialog::QgsAttributeTableDialog :
QgisApp::attributeTable :
QMetaObject::activate :
QAction::activate :
QMenu::actionGeometry :
QMenu::actionGeometry :
QMenu::mouseReleaseEvent :
QWidget::event :
QMenu::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 :
QMenu::exec :
QgsLayerTreeView::contextMenuEvent :
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
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.6.1-Noosa
QGIS code revision: 2468226
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.4.1
Running against GDAL: 2.4.1
System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17134
The text was updated successfully, but these errors were encountered: