Bug report #854

Dont assert for unknown types in QgsVectorFileWriter

Added by Tim Sutton about 17 years ago. Updated over 15 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Build/Install
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:10913

Description

From QGIS Users list:

2007/12/5, alexey <qgis at mail.ru>:

Hi

I have a problem with generating shape file in qgis.
When at grass vector layer I press right mouse button and select "save as
shapefile" qgis crashes and in terminal appears this text:
-------------------------------------------------------------

QgsGrass::vectors()
qgis: /home/timlinux/dev/cpp/qgis-0.9.0/src/core/qgsvectorfilewriter.cpp:222: bo ol QgsVectorFileWriter::addFeature(QgsFeature&): Assertion @0 && "invalid varian t type"' failed.
Aborted

I've addressed this issue in part with the attached patch in that it should fail more gracefully now with a suitable error message describing the nature of the problem and no longer performing an assert. Since we are in string freeze for 0.9.1, I will apply this after the release.

bug854fix.diff Magnifier (1.77 KB) Tim Sutton, 2007-12-05 05:15 PM

History

#1 Updated by Tim Sutton about 17 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Patch applied in .

#2 Updated by Anonymous over 15 years ago

Milestone Version 0.9.2 deleted

Also available in: Atom PDF