Bug report #17435

Spatial Query crashes QGIS when there are non-spatial postgresql tables

Added by Donovan Cameron almost 3 years ago. Updated almost 3 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:C++ plugins/Spatial Query
Affected QGIS version:2.18.14 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:wontfix
Crashes QGIS or corrupts data:No Copied to github as #:25332

Description

When I press the Spatial Query button QGIS crashes.

I think it's caused from having a non-spatial postgresql table in the map canvas.

I'm running PostgreSQL 9.6.6 and PostGIS 2.4.1.

Spatial Query will launch and work when there are just vector layers in the map canvas from the PG database.
But as soon as I add a non-spatial table from the PG database, Spatial Query crashes QGIS.

Here's the debug output when pressing the Spatial Query button.

src/gui/qgsmapcanvas.cpp: 1329: (keyReleaseEvent) [8792ms] keyRelease event
src/gui/qgsmapcanvas.cpp: 1351: (keyReleaseEvent) [0ms] Ignoring key release: 16777275
src/providers/postgres/qgspostgresprovider.cpp: 2943: (featureCount) [1731ms] number of features as text: 43829
src/providers/postgres/qgspostgresprovider.cpp: 2948: (featureCount) [0ms] number of features: 43829
Fatal: ASSERT: "0" in file /tmp/makepkg/qgis/src/qgis/src/plugins/spatialquery/qgsspatialquery.cpp, line 159
Stacktrace (piped through c++filt):
qgis(+0xb90e)[0x563e5ffa090e]
qgis(+0xbdd4)[0x563e5ffa0dd4]
/usr/lib/libQtCore.so.4(qt_message_output(QtMsgType, char const*)+0x26)[0x7ff18e3aaea6]
/usr/lib/libQtCore.so.4(+0x7a0aa)[0x7ff18e3ab0aa]
/usr/lib/libQtCore.so.4(qFatal(char const*, ...)+0xa1)[0x7ff18e3aba01]
/usr/lib/qgis/plugins/libspatialqueryplugin.so(+0x1559c)[0x7ff14b07759c]
/usr/lib/qgis/plugins/libspatialqueryplugin.so(+0x15932)[0x7ff14b077932]
/usr/lib/qgis/plugins/libspatialqueryplugin.so(+0xd9a3)[0x7ff14b06f9a3]
/usr/lib/qgis/plugins/libspatialqueryplugin.so(+0xdcd1)[0x7ff14b06fcd1]
/usr/lib/qgis/plugins/libspatialqueryplugin.so(+0x10c97)[0x7ff14b072c97]
/usr/lib/qgis/plugins/libspatialqueryplugin.so(+0x8fb5)[0x7ff14b06afb5]
/usr/lib/qgis/plugins/libspatialqueryplugin.so(+0x186d8)[0x7ff14b07a6d8]
/usr/lib/libQtCore.so.4(QMetaObject::activate(QObject*, QMetaObject const*, int, void**)+0x775)[0x7ff18e4dd9c5]
/usr/lib/libQtGui.so.4(QAction::triggered(bool)+0x43)[0x7ff18d7d35e3]
/usr/lib/libQtGui.so.4(QAction::activate(QAction::ActionEvent)+0xbb)[0x7ff18d7d49fb]
/usr/lib/libQtGui.so.4(+0x5c3bd4)[0x7ff18dbb8bd4]
/usr/lib/libQtGui.so.4(QAbstractButton::mouseReleaseEvent(QMouseEvent*)+0x75)[0x7ff18dbb8d35]
/usr/lib/libQtGui.so.4(QToolButton::mouseReleaseEvent(QMouseEvent*)+0xb)[0x7ff18dc8389b]
/usr/lib/libQtGui.so.4(QWidget::event(QEvent*)+0x3c8)[0x7ff18d831748]
/usr/lib/libQtGui.so.4(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0x94)[0x7ff18d7d9714]
/usr/lib/libQtGui.so.4(QApplication::notify(QObject*, QEvent*)+0xde2)[0x7ff18d7e1712]
/usr/lib/libqgis_core.so.2.18.14(QgsApplication::notify(QObject*, QEvent*)+0x7b)[0x7ff18eb9e3cb]
/usr/lib/libQtCore.so.4(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x8e)[0x7ff18e4c8f7e]
/usr/lib/libQtGui.so.4(QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)+0x13d)[0x7ff18d7e034d]
/usr/lib/libQtGui.so.4(+0x2692cb)[0x7ff18d85e2cb]
/usr/lib/libQtGui.so.4(QApplication::x11ProcessEvent(_XEvent*)+0x1119)[0x7ff18d85d079]
/usr/lib/libQtGui.so.4(+0x291380)[0x7ff18d886380]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x310)[0x7ff187dde270]
/usr/lib/libglib-2.0.so.0(+0x6cf69)[0x7ff187ddff69]
/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x2e)[0x7ff187ddffae]
/usr/lib/libQtCore.so.4(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x78)[0x7ff18e4fa268]
/usr/lib/libQtGui.so.4(+0x291508)[0x7ff18d886508]
/usr/lib/libQtCore.so.4(QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x44)[0x7ff18e4c7484]
/usr/lib/libQtCore.so.4(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0x1bf)[0x7ff18e4c77ef]
/usr/lib/libQtCore.so.4(QCoreApplication::exec()+0xa0)[0x7ff18e4cd480]
qgis(+0x73a9)[0x563e5ff9c3a9]
/usr/lib/libc.so.6(__libc_start_main+0xea)[0x7ff18ccbff6a]
qgis(_start+0x2a)[0x563e5ffa044a]
[1] 20922 abort (core dumped) qgis

History

#1 Updated by Giovanni Manghi almost 3 years ago

  • Status changed from Open to Feedback

this plugin has been removed in master and likely will not get any fix in 2.18. Use the equivalent tool in the Processing toolbox instead.

#2 Updated by Donovan Cameron almost 3 years ago

Hey Giovanni, the processing toolbox works great, thanks for the heads up.

#3 Updated by Alexander Bruy almost 3 years ago

  • Resolution set to wontfix
  • Status changed from Feedback to Closed

Closing as "wontfix" as this plugin removed from master.

Also available in: Atom PDF