Bug report #20155

crash loading style from postgres db when there is no "layer_styles" table in the database

Added by Jan Lippmann over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:High
Assignee:Alessandro Pasotti
Category:GUI
Affected QGIS version:3.3(master) Regression?:No
Operating System:Win 7 64bit Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:27976

Description

User Feedback

click "load style from qml file" for geometryless layer (in my case a postgres table)...qgis crash

Report Details

Crash ID: 992938a18433f4d771b6eccd8030a4861d77fc09

Stack Trace

QVariant::QVariant :
QgsVectorLayerLoadStyleDialog::initializeLists qgsvectorlayerloadstyledialog.cpp:159
QgsVectorLayerProperties::loadStyle qgsvectorlayerproperties.cpp:1169
QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void (__cdecl QgsVectorLayerProperties::*)(void) __ptr64>::call qobjectdefs_impl.h:134
QtPrivate::FunctionPointer<void (__cdecl QgsVectorLayerProperties::*)(void) __ptr64>::call<QtPrivate::List<>,void> qobjectdefs_impl.h:168
QtPrivate::QSlotObject<void (__cdecl QgsVectorLayerProperties::*)(void) __ptr64,QtPrivate::List<>,void>::impl qobjectdefs_impl.h:397
QMetaObject::activate :
QAction::activate :
QMenu::actionGeometry :
QMenu::actionGeometry :
QMenu::mouseReleaseEvent :
QWidget::event :
QMenu::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:355
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:355
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QMenu::exec :
QDialogPrivate::operator= :
QMetaObject::activate :
QAbstractButton::clicked :
QAbstractButton::mousePressEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:355
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:355
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
QgisApp::showLayerProperties qgisapp.cpp:13443
QgisApp::layerProperties qgisapp.cpp:7560
QgisApp::qt_static_metacall moc_qgisapp.cpp:1506
QMetaObject::activate :
QAction::activate :
QMenu::actionGeometry :
QMenu::actionGeometry :
QMenu::mouseReleaseEvent :
QWidget::event :
QMenu::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:355
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:355
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QMenu::exec :
QgsLayerTreeView::contextMenuEvent qgslayertreeview.cpp:133
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:355
QCoreApplication::notifyInternal2 :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:355
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main main.cpp:1505
WinMain mainwin.cpp:170
__scrt_common_main_seh exe_common.inl:253
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.3.0-Master
QGIS code revision: 9cae77f262
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.3.2
Running against GDAL: 2.3.2

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 6.1.7601

Associated revisions

Revision 897322a4
Added by Alessandro Pasotti over 5 years ago

Fix crash loading style from postgres db when there is no "layer_styles" table in the database

Fix #20155 -crash loading style from postgres db when there is no "layer_styles" table in the database

History

#1 Updated by Jan Lippmann over 5 years ago

load from style file is not correct! only click on "Load Style..." button in the layer properties...then qgis crash

#2 Updated by Giovanni Manghi over 5 years ago

  • Priority changed from Normal to High
  • Crashes QGIS or corrupts data changed from No to Yes

#3 Updated by Peter Petrik over 5 years ago

unable to reproduce.

Jan Lippmann wrote:

load from style file is not correct! only click on "Load Style..." button in the layer properties...then qgis crash

Can you please attach the qml applied?

#4 Updated by Jan Lippmann over 5 years ago

Peter Petrik wrote:

unable to reproduce.

Jan Lippmann wrote:

load from style file is not correct! only click on "Load Style..." button in the layer properties...then qgis crash

Can you please attach the qml applied?

qml not necessary, because crash happen, *when i click on "Load Style..." button in the layer properties *

NEW INFORMATION:

crash happens with postgres geometry layer and geometryless layer, if there is no "layer_styles" table in the database.

#5 Updated by Jan Lippmann over 5 years ago

the title "qgis crash - load style from qml file for geometryless layer" of this issue is no more correct

can a redmine manager change the title to "qgis crash - load style for postgres layer" please?

#6 Updated by Alessandro Pasotti over 5 years ago

  • Subject changed from qgis crash - load style from qml file for geometryless layer to crash loading style from postgres db when there is no "layer_styles" table in the database

#7 Updated by Alessandro Pasotti over 5 years ago

  • Assignee set to Alessandro Pasotti

#8 Updated by Alessandro Pasotti over 5 years ago

  • Status changed from Open to In Progress
  • Pull Request or Patch supplied changed from No to Yes

#9 Updated by Anonymous over 5 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

Also available in: Atom PDF