empty multilinestring causes crash #20585
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Crash/Data Corruption
Data Provider
Related to specific vector, raster or mesh data providers
Milestone
Author Name: David Mancini (@weifageo)
Original Redmine Issue: 12413
Affected QGIS version: 2.8.1
Redmine category:data_provider/postgis
Assignee: Jürgen Fischer
One of my GIS Technicians was having an issues with a PostGIS layer, where any time an edit was attempted QGIS 2.8.1 would experience a crash dump. We then attempted to edit the same PostGIS layer using QGIS 2.6.0 and it was able to continue editing the layer's features.
After some investigation into the table itself I found the culprit. The layer we were trying to edit contained LINESTRING and MULTILINESTRING geometries. I decided to run a query to identify the number of vertices per object using the ST_NumPoints function. At the bottom of the list I noticed a row was returned with a NULL value. After selecting the items WHERE ST_NumPoints(the_geom) IS NULL I found that there was one item. Running ST_AsText(the_geom) for this feature returned MULTILINESTRING EMPTY. After I deleted this record, I was able to edit the layer once again using QGIS 2.8.1.
I just wanted to let your team know, because this situation seemed to be handled in the previous version 2.6.0 we tested in our office. This is a minor issue which I was able to overcome by cleaning the problem record out of the PostGIS database, but I just wanted to give your team the heads up.
The text was updated successfully, but these errors were encountered: