Bug report #18736

Crash when aborting geometry check

Added by Antoine Lafranchis about 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:High
Assignee:Martin Dobias
Category:C++ plugins/Geometry Checker
Affected QGIS version:3.1(master) Regression?:Yes
Operating System:Windows 10 with greek language Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:26623

Description

User Feedback

I clicked Abort on a geometry check

Report Details

Crash ID: 9bd4be657063fe6452ffb95a51b1c4a2a1ce3e97

Stack Trace

geos::index::strtree::STRtree::STRIntersectsOp::~STRIntersectsOp :
QgsGeos::QgsGeos :
_C_specific_handler :
_FrameUnwindFilter :
memchr :
_CxxFrameHandler3 :
_chkstk :
RtlUnwindEx :
FindAndUnlinkFrame :
_FrameUnwindFilter :
memchr :
memchr :
_CxxFrameHandler3 :
_chkstk :
RtlLookupFunctionEntry :
RtlRaiseException :
RaiseException :
CxxThrowException :
QgsGeos::symDifference :
geos::index::strtree::STRtree::STRIntersectsOp::~STRIntersectsOp :
geos::index::bintree::Key::Key :
_unDNameEx :
_is_exception_typeof :
RtlCaptureContext :
geos::index::strtree::STRtree::STRIntersectsOp::~STRIntersectsOp :
QgsGeos::overlay :
QgsGeos::intersection :
QgsGeometryOverlapCheck::collectErrors :
QgsGeometryChecker::runCheck :
QgsGeometryChecker::runCheck :
QgsGeometryChecker::runCheck :
QgsInternalGeometrySnapper::operator= :
QtConcurrent::ThreadEngineBase::run :
QThreadPoolPrivate::reset :
QThread::start :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.0.1-Girona
QGIS code revision: a86bec25eb
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4

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

check test.zip - Shapefile (1.17 MB) Antoine Lafranchis, 2018-06-20 09:58 PM

check config.png - Checker config (45.3 KB) Antoine Lafranchis, 2018-06-20 09:58 PM

Associated revisions

Revision 73fd83f7
Added by Martin Dobias almost 6 years ago

Fix crashes in geometry checker (fixes #18736) (#7292)

This fixes two different crashes:
- when trying to close the checker dialog while checks are running in background
- when trying to run checks again after previously aborting a run

History

#1 Updated by Martin Dobias almost 6 years ago

  • Status changed from Open to Feedback

If you do not abort the geometry check, do you also get the crash?

Could you please attach the data you have used and the geometry checker configuration?

#2 Updated by Antoine Lafranchis almost 6 years ago

I did manage to complete the check without any crash. I dont remember the exact config and the I edited the shapefile since then.

I can still reproduce a crash with the attached file and config, and with the following steps:
  • Run check with the config as in the attached screenshot
  • Choose an empty output directory
  • Click run
  • Wait for the spacial index to be built
  • When the Abort button becomes clickable, click it
  • It says Waiting for running checks to finish
  • Don't wait, close the checker's window with the X button
  • After a few seconds, QGis crashes

#3 Updated by Martin Dobias almost 6 years ago

  • Status changed from Feedback to Open
  • Assignee set to Martin Dobias

Thanks - I can reproduce.

0  0x00007f54201b294a in __GI___waitpid (pid=12881, stat_loc=0x7ffc468a2524, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
        resultvar = 18446744073709551104
        sc_cancel_oldtype = 0
#1  0x0000558b5f3c5a6a in qgisCrash(int) (signal=11) at ../src/app/main.cpp:325
        status = 0
        pidstr = "--pid=12090\000\000\000\000\000\220}dd\213U\000\000\200T\347b\213U\000" 
        gdbpid = 12881
        exename = "/home/martin/qgis/git-master/build-debug/output/bin/qgis\000\215\323 T\177\000\000\253\367\b\000\000\000\000\000A\354\021,\000\000\000\000\060\000\000\000\000\000\000\000\000\035\255ŖTTh\000\000\000\000\000\000\000\000\351u\323 T\177\000\000@\273\001a\213U\000\000W\202\323 T\177\000\000\001\000\000\000\000\000\000\000\037\344\265 T\177\000\000\220}dd\213U\000\000\320\024\001a\213U\000\000\000\000\000\000\000\000\000\000\345\201\323 T\177\000\000\033\000\000\000\000\000\000\000C\330\315 T\177\000\000\200T\347b\213U\000\000\000"...
        len = 56
#2  0x00007f5420111140 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#3  0x0000000000000025 in  ()
#4  0x00007f541d8c110f in QCache<long long, QgsFeature>::clear() (this=0x558b64440450) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qcache.h:124
#5  0x00007f541d8c0d5e in QCache<long long, QgsFeature>::~QCache() (this=0x558b64440450, __in_chrg=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qcache.h:93
#6  0x00007f541d8f1bb4 in QgsFeaturePool::~QgsFeaturePool() (this=0x558b64440440, __in_chrg=<optimized out>) at src/analysis/vector/geometry_checker/../../../../../src/analysis/vector/geometry_checker/qgsfeaturepool.h:33
#7  0x00007f541d8f1bdc in QgsFeaturePool::~QgsFeaturePool() (this=0x558b64440440, __in_chrg=<optimized out>) at src/analysis/vector/geometry_checker/../../../../../src/analysis/vector/geometry_checker/qgsfeaturepool.h:33
#8  0x00007f541d8c21d9 in QgsGeometryChecker::~QgsGeometryChecker() (this=0x558b63f470c0, __in_chrg=<optimized out>) at ../src/analysis/vector/geometry_checker/qgsgeometrychecker.cpp:54
        it = {i = 0x558b63efa360}
#9  0x00007f541d8c2298 in QgsGeometryChecker::~QgsGeometryChecker() (this=0x558b63f470c0, __in_chrg=<optimized out>) at ../src/analysis/vector/geometry_checker/qgsgeometrychecker.cpp:57
#10 0x00007f53d5a9fa6d in QgsGeometryCheckerResultTab::~QgsGeometryCheckerResultTab() (this=0x558b6880a8c0, __in_chrg=<optimized out>) at ../src/plugins/geometry_checker/qgsgeometrycheckerresulttab.cpp:116
#11 0x00007f53d5a9faf8 in QgsGeometryCheckerResultTab::~QgsGeometryCheckerResultTab() (this=0x558b6880a8c0, __in_chrg=<optimized out>) at ../src/plugins/geometry_checker/qgsgeometrycheckerresulttab.cpp:118
#12 0x00007f53d5a84adf in QgsGeometryCheckerDialog::done(int) (this=0x558b626d0380, r=0) at ../src/plugins/geometry_checker/qgsgeometrycheckerdialog.cpp:84
#13 0x00007f5421c86202 in QDialog::closeEvent(QCloseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007f53d5a84c55 in QgsGeometryCheckerDialog::closeEvent(QCloseEvent*) (this=0x558b626d0380, ev=0x7ffc468a3310) at ../src/plugins/geometry_checker/qgsgeometrycheckerdialog.cpp:99
#15 0x00007f5421a9bdc8 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007f5421a5b46c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007f5421a62d34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f5422820d8f in QgsApplication::notify(QObject*, QEvent*) (this=0x7ffc468a4ee0, receiver=0x558b626d0380, event=0x7ffc468a3310) at ../src/core/qgsapplication.cpp:343
        done = true
        __FUNCTION__ = "notify" 
#19 0x00007f5420ce0de8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007f5421a97641 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007f5421ab5fa6 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f5421ab9067 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f5421a5b46c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007f5421a62d34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007f5422820d8f in QgsApplication::notify(QObject*, QEvent*) (this=0x7ffc468a4ee0, receiver=0x558b61bbb510, event=0x7ffc468a3660) at ../src/core/qgsapplication.cpp:343
        done = true
        __FUNCTION__ = "notify" 
#26 0x00007f5420ce0de8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007f542129d43a in QGuiApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#28 0x00007f54212a1a55 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#29 0x00007f5421279cab in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#30 0x00007f53f0c675a0 in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#31 0x00007f5415214fb7 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f54152151f0 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007f541521527c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007f5420d3947f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007f5420cdee3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#36 0x00007f53d5a8ab70 in QgsGeometryCheckerSetupTab::runChecks() (this=0x558b621ace20) at ../src/plugins/geometry_checker/qgsgeometrycheckersetuptab.cpp:473
        layers = {<QListSpecialMethods<QgsVectorLayer*>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x558b69c67b00}, d = 0x558b69c67b00}}
        lineLayerCheckLayer = 0x0
        followBoundaryCheckLayer = 0x0
        selectedOnly = false
        processLayers = {<QListSpecialMethods<QgsVectorLayer*>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x558b6a5af060}, d = 0x558b6a5af060}}
        nonEditableLayers = {<QListSpecialMethods<QgsVectorLayer*>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7f5420dd0a00 <QListData::shared_null>}, d = 0x7f5420dd0a00 <QListData::shared_null>}}
        featurePools = {d = 0x558b6451d0e0}
        context = 0x558b635bd7b0
        checks = {<QListSpecialMethods<QgsGeometryCheck*>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x558b69f05fc0}, d = 0x558b69f05fc0}}
        checker = 0x558b63f470c0
        evLoop = <incomplete type>
        futureWatcher = {<QFutureWatcherBase> = {<No data fields>}, m_future = {d = <incomplete type>}}
        maxSteps = 68773
#37 0x00007f53d5a9d9cc in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (QgsGeometryCheckerSetupTab::*)()>::call(void (QgsGeometryCheckerSetupTab::*)(), QgsGeometryCheckerSetupTab*, void**) (f=(void (QgsGeometryCheckerSetupTab::*)(QgsGeometryCheckerSetupTab * const)) 0x7f53d5a88422 <QgsGeometryCheckerSetupTab::runChecks()>, o=0x558b621ace20, arg=0x7ffc468a3ea0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:136
#38 0x00007f53d5a9cfd7 in QtPrivate::FunctionPointer<void (QgsGeometryCheckerSetupTab::*)()>::call<QtPrivate::List<>, void>(void (QgsGeometryCheckerSetupTab::*)(), QgsGeometryCheckerSetupTab*, void**) (f=(void (QgsGeometryCheckerSetupTab::*)(QgsGeometryCheckerSetupTab * const)) 0x7f53d5a88422 <QgsGeometryCheckerSetupTab::runChecks()>, o=0x558b621ace20, arg=0x7ffc468a3ea0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:169
#39 0x00007f53d5a9bced in QtPrivate::QSlotObject<void (QgsGeometryCheckerSetupTab::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x558b62764ab0, r=0x558b621ace20, a=0x7ffc468a3ea0, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:120
#40 0x00007f5420d0f9ff in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007f5421c17572 in QAbstractButton::clicked(bool) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

#4 Updated by Martin Dobias almost 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF