Bug report #7845

Topology checker crashes qgis when using the "must not have gaps" rule

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

Status:Closed
Priority:Severe/Regression
Assignee:vinayan Parameswaran
Category:C++ Plugins
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 #:16726

Description

Attached sample vector and project.

The symptoms are different, sometime when I run a "validate all" qgis hard crash

...
...
...
Debug: reading features- 5631
Debug: reading features- 5632
Debug: reading features- 5633
Debug: reading features- 5634
Debug: reading features- 5635
Debug: creating geometry collection-
Debug: performing cascaded union..might take time..-
ERROR 1: TopologyException: found non-noded intersection between
LINESTRING (-53667 -208081, -53667 -208081) and LINESTRING (-53667
-208081, -53667 -208081) at -53666.955337816667 -208081.28168678112
Fatal: QGIS died on signal 11
Stacktrace (piped through c++filt):
/usr/bin/qgis.bin(myMessageOutput(QtMsgType, char const*)+0xac)[0x4e706c]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(qt_message_output(QtMsgType, char const*)+0x2e)[0x7f18e684241e]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(+0x718bf)[0x7f18e68428bf]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(qFatal(char const*, ...)+0x94)[0x7f18e6842a64]
/lib/x86_64-linux-gnu/libc.so.6(+0x364a0)[0x7f18e3d334a0]
/usr/lib/libqgis_core.so.1.9.0(QgsGeometry::asGeometryCollection()+0x12)[0x7f18e78959d2]
/usr/lib/qgis/plugins/libtopolplugin.so(topolTest::checkGaps(double, QgsVectorLayer*, QgsVectorLayer*, bool)+0x8cc)[0x7f18bf5ecc6c]
/usr/lib/qgis/plugins/libtopolplugin.so(topolTest::runTest(QString, QgsVectorLayer*, QgsVectorLayer*, ValidateType, double)+0x355)[0x7f18bf5ef2e5]
/usr/lib/qgis/plugins/libtopolplugin.so(checkDock::runTests(ValidateType)+0x4df)[0x7f18bf5dca5f]
/usr/lib/qgis/plugins/libtopolplugin.so(checkDock::validate(ValidateType)+0xb2)[0x7f18bf5dd302]
/usr/lib/qgis/plugins/libtopolplugin.so(+0x33e05)[0x7f18bf5f3e05]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QMetaObject::activate(QObject*, QMetaObject const*, int, void**)+0x2b1)[0x7f18e6960281]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAbstractButton::clicked(bool)+0x32)[0x7f18e635ec72]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x599a4e)[0x7f18e609ca4e]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x59ad8b)[0x7f18e609dd8b]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAbstractButton::mouseReleaseEvent(QMouseEvent*)+0x8c)[0x7f18e609dffc]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QWidget::event(QEvent*)+0x684)[0x7f18e5d1f144]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0xb4)[0x7f18e5cce894]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::notify(QObject*, QEvent*)+0xabf)[0x7f18e5cd40bf]
/usr/lib/libqgis_core.so.1.9.0(QgsApplication::notify(QObject*, QEvent*)+0x96)[0x7f18e78416f6]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x8c)[0x7f18e694be9c]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)+0x172)[0x7f18e5ccf862]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x24bbf5)[0x7f18e5d4ebf5]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::x11ProcessEvent(_XEvent*)+0xdce)[0x7f18e5d4dbae]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x2740d2)[0x7f18e5d770d2]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x133)[0x7f18e285fd53]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x480a0)[0x7f18e28600a0]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x34)[0x7f18e2860164]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x6f)[0x7f18e697b3bf]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x273d5e)[0x7f18e5d76d5e]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x32)[0x7f18e694ac82]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xf7)[0x7f18e694aed7]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QCoreApplication::exec()+0x87)[0x7f18e694ff67]
/usr/bin/qgis.bin(main+0x228e)[0x4e302e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f18e3d1e76d]
/usr/bin/qgis.bin[0x4e6e11]
Aborted (core dumped)

other times it just return: "unknown exception"
and sometime it runs correctly after a "validate extent" but when I
click on an error in the list qgis crashes

...
...
...
Debug: checking overlap for 3621
Debug: checking overlap for 3625
Debug: checking overlap for 3625
Debug: checking overlap for 3625
Debug: checking overlap for 3625
Debug: checking overlap for 3625
Debug: checking overlap for 3625
Fatal: QGIS died on signal 11
Stacktrace (run through c++filt):
Segmentation fault (core dumped)

cheers!

uso_solo_maio2013.zip (2.8 MB) Giovanni Manghi, 2013-05-16 10:00 AM

49.png (323 KB) Giovanni Manghi, 2013-05-17 03:06 AM

Associated revisions

Revision 454778c7
Added by Jürgen Fischer about 6 years ago

topology checker: catch difference error (fixes #7845)

History

#1 Updated by Werner Macho over 6 years ago

Confirmed here

Identified the "must not have gaps" as the cause of this behaviour..

If I delete the "must not have gaps" check - everything works fine everytime for me ..

BT, I know this is not the correct place but do you think its possible to add something like a progressbar somewhere?
checking this test project from giovanni takes some time and it looks like the computer is dead but indeed it is not..

Thanks a lot for this plugin (it should also go into core) .. and i still don't get how the "Tolerance" Field is getting used..

#2 Updated by Giovanni Manghi over 6 years ago

BT, I know this is not the correct place but do you think its possible to add something like a progressbar somewhere?

But there is a progress bar, can't you see it? :) See attached screenshot.

Does it work for you the "toggle error markers" button?

#3 Updated by Giovanni Manghi over 6 years ago

BT, I know this is not the correct place but do you think its possible to add something like a progressbar somewhere?
checking this test project from giovanni takes some time and it looks like the computer is dead but indeed it is not..

it seems that the progress bar shows only if there is >1 rule(?).

#4 Updated by Werner Macho over 6 years ago

Confirmed .. there is no progress bar if there is only one rule .. .. even if this one rule takes ages ..

regarding toggle errors ..
my pull request got accepted today by vinayan and there should be not toggle button any more but rather a Show errors CheckBox (which seemed more reasonable to me)

And yes .. this CheckBox is working fine here ..
The only questions I still have are:
Why is there a Tolerance SpinBox (Which disappears as soon as I select a Layer)?
Is there a possibility to fix some of the errors automatically (like I have seen some FIX-errors boxes in the UI file)?

#5 Updated by vinayan Parameswaran over 6 years ago

Werner,

Currently there are no rules that support a tolerance value. That is why it gets disabled. As of now we can simply keep it hidden to avoid confusion..right?
those fix buttons too are from the initial work..they are supposed to fix errors automatically..not implemented yet..

#6 Updated by Werner Macho over 6 years ago

Thanks for the Clearification .. so the Tolerance should be kept hidden from beginning on.. Because when I open Topology checker it is been shown as long as i click nothing..

And for the rest there seem to be only the "must not have a gap" bug that Giovanni discovered to make it at least ready for 2.0 release..
I guess you wanted to add the rest of checking and tolerance and fixing geometry errors later..

If I can help you in any way just tell me..

#7 Updated by Giovanni Manghi over 6 years ago

Werner Macho wrote:

Thanks for the Clearification .. so the Tolerance should be kept hidden from beginning on.. Because when I open Topology checker it is been shown as long as i click nothing..

And for the rest there seem to be only the "must not have a gap" bug that Giovanni discovered to make it at least ready for 2.0 release..
I guess you wanted to add the rest of checking and tolerance and fixing geometry errors later..

If I can help you in any way just tell me..

Hi all!

is there a patch available for the last issue has been found?

Thanks in advance!

#8 Updated by Werner Macho over 6 years ago

No patch so far .. I've been only working on the UI ..
Don't have the skills to debug that error though I think it should be obvious ..
Sorry for that ..
Hope that somebody picks this up for the release ..

#9 Updated by vinayan Parameswaran over 6 years ago

I will fix the crash today or tomorrow.. it is due to an error in the geometry(multiple nodes at the same coordinate..)..somehow this error is not caught by our geometry checking methods..unless we fix this geometry, it is not possible to run 'must not have gaps' rule..

#10 Updated by Giovanni Manghi over 6 years ago

vinayan Parameswaran wrote:

I will fix the crash today or tomorrow.. it is due to an error in the geometry(multiple nodes at the same coordinate..)..somehow this error is not caught by our geometry checking methods..unless we fix this geometry, it is not possible to run 'must not have gaps' rule..

Hi Vinayan, are going to remove the "must not have gaps" rule? I hope not :)

#11 Updated by vinayan Parameswaran over 6 years ago

Giovanni..not at all..simply that rule will not run if the geometry contains such an error..i am still working out why geos/qgis does not tag that geom as error..

#12 Updated by Giovanni Manghi over 6 years ago

vinayan Parameswaran wrote:

Giovanni..not at all..simply that rule will not run if the geometry contains such an error..

ok! thanks a lot for your work!

#13 Updated by Giovanni Manghi about 6 years ago

  • Subject changed from Topology checker crashes qgis to Topology checker crashes qgis when using the "must not have gaps" rule

#14 Updated by Salvatore Larosa about 6 years ago

  • Crashes QGIS or corrupts data changed from No to Yes

More info about the crash: http://codepad.org/0Ak5u0ry

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

  • Status changed from Open to Closed

Also available in: Atom PDF