Bug report #12413
empty multilinestring causes crash
|Affected QGIS version:||2.8.1||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||invalid|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||20585|
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.