Bug report #18077

QGIS crashes when running "Fix Geometries" Processing algorithm on the attached layer

Added by gcarrillo - almost 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/QGIS
Affected QGIS version:master Regression?:No
Operating System:GNU/Linux (Linux Mint based on Ubuntu Xenial) Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:Yes Copied to github as #:25973

Description

I attach a GeoPackage DB with a single layer, which in turns has a single MultiLineString geometry.

This is the WKT representation of the geometry:

>>>feature.geometry().asWkt()
'MultiLineString ((356984.0625 6300089, 356984.0625 6300089))'

As soon as I run the "Fix Geometries" algorithm, QGIS crashes. This is the last part of the backtrace (hope that it helps):

Stacktrace (piped through c++filt):
/docs/dev/qgis/QGIS/build-master04/output/bin/qgis[0x40cfa3]
/docs/dev/qgis/QGIS/build-master04/output/bin/qgis[0x40d4b0]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x914c6)[0x7ff6fbf5e4c6]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QMessageLogger::warning(char const*, ...) const+0xac)[0x7ff6fbf5f28c]
/docs/dev/qgis/QGIS/build-master04/output/lib/libqgis_core.so.2.99.0(+0xc8de26)[0x7ff6fdc05e26]
/usr/lib/x86_64-linux-gnu/libgeos_c.so.1(GEOSContextHandle_HS::ERROR_MESSAGE(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ...)+0xde)[0x7ff6f5d2bc6e]
/usr/lib/x86_64-linux-gnu/libgeos_c.so.1(GEOSGeom_createCollection_r+0x204)[0x7ff6f5d1f454]
/docs/dev/qgis/QGIS/build-master04/output/lib/libqgis_core.so.2.99.0(+0xc81f9a)[0x7ff6fdbf9f9a]
/docs/dev/qgis/QGIS/build-master04/output/lib/libqgis_core.so.2.99.0(+0xc827d0)[0x7ff6fdbfa7d0]
/docs/dev/qgis/QGIS/build-master04/output/lib/libqgis_core.so.2.99.0(+0xc82ced)[0x7ff6fdbfaced]
/docs/dev/qgis/QGIS/build-master04/output/lib/libqgis_core.so.2.99.0(QgsGeometry::makeValid() const+0x8b)[0x7ff6fdbe3605]
/docs/dev/qgis/QGIS/build-master04/output/lib/libqgis_analysis.so.2.99.0(+0xd1d48)[0x7ff6f8d82d48]
/docs/dev/qgis/QGIS/build-master04/output/lib/libqgis_core.so.2.99.0(QgsProcessingFeatureBasedAlgorithm::processAlgorithm(QMap<QString, QVariant> const&, QgsProcessingContext&, QgsProcessingFeedback*)+0x53e)[0x7ff6fd5ac304]
/docs/dev/qgis/QGIS/build-master04/output/lib/libqgis_core.so.2.99.0(QgsProcessingAlgorithm::runPrepared(QMap<QString, QVariant> const&, QgsProcessingContext&, QgsProcessingFeedback*)+0x2b6)[0x7ff6fd5aa6b8]
/docs/dev/qgis/QGIS/build-master04/output/lib/libqgis_core.so.2.99.0(QgsProcessingAlgRunnerTask::run()+0xb7)[0x7ff6fd5b0b21]
/docs/dev/qgis/QGIS/build-master04/output/python/qgis/_core.so(sipQgsProcessingAlgRunnerTask::run()+0x72)[0x7ff64f0ac6c2]
/docs/dev/qgis/QGIS/build-master04/output/lib/libqgis_core.so.2.99.0(QgsTask::start()+0xcc)[0x7ff6fd8cb26e]
/docs/dev/qgis/QGIS/build-master04/output/lib/libqgis_core.so.2.99.0(+0x956b20)[0x7ff6fd8ceb20]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0xa22d3)[0x7ff6fbf6f2d3]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0xa57be)[0x7ff6fbf727be]
src/core/qgsmessagelog.cpp: 27: (logMessage) [51ms] [thread:0x7ff634001940] 2018-02-11T17:27:51 Qt[1] GEOS exception: IllegalArgumentException: geometries must not contain null elements

Warning: Qt Concurrent has caught an exception thrown from a worker thread.
This is not supported, exceptions thrown in worker threads must be
caught before control returns to Qt Concurrent.
Stacktrace (piped through c++filt):
/docs/dev/qgis/QGIS/build-master04/output/bin/qgis[0x40cfa3]
/docs/dev/qgis/QGIS/build-master04/output/bin/qgis[0x40d4b0]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x914c6)[0x7ff6fbf5e4c6]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QMessageLogger::warning(char const*, ...) const+0xac)[0x7ff6fbf5f28c]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0xa253a)[0x7ff6fbf6f53a]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0xa57be)[0x7ff6fbf727be]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7ff6f41296ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ff6fb6723dd]
src/core/qgsmessagelog.cpp: 27: (logMessage) [26ms] [thread:0x7ff634001940] 2018-02-11T17:27:51 Qt[1] Qt Concurrent has caught an exception thrown from a worker thread.
This is not supported, exceptions thrown in worker threads must be
caught before control returns to Qt Concurrent.
terminate called after throwing an instance of 'GEOSException'
  what():  IllegalArgumentException: geometries must not contain null elements

null_line.gpkg (116 KB) gcarrillo -, 2018-02-12 01:16 AM

Associated revisions

Revision 5431a2db
Added by Nyall Dawson almost 7 years ago

Fix crash when repairing zero length linestring geometry

Fixes #18077

History

#1 Updated by Nyall Dawson almost 7 years ago

  • Pull Request or Patch supplied changed from No to Yes

#2 Updated by Nyall Dawson almost 7 years ago

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

#3 Updated by Giovanni Manghi almost 7 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF