Opened 8 years ago
Closed 8 years ago
#6152 closed defect (fixed)
ogr2ogr crashes with CSV containing empty (NULL) geometry
Reported by: | rtorre | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 2.1.0 |
Component: | OGR_SF | Version: | svn-trunk |
Severity: | normal | Keywords: | ogr2ogr, csv_drv, GEOM_POSSIBLE_NAMES |
Cc: | Even Rouault |
Description
ogr2ogr crashes when trying to import a csv using the GEOM_POSSIBLE_NAMES
option when the referenced column contains empty (NULL) values:
$ ogr2ogr \ -f PostgreSQL PG:"host=localhost port=5432 user=postgres dbname=tests" \ -oo GEOM_POSSIBLE_NAMES=the_geom \ -oo KEEP_GEOM_COLUMNS=NO \ bug_empty_the_geom.csv ERROR 1: Invalid index : 3 Segmentation fault (core dumped)
Interestingly it does not crash if:
KEEP_GEOM_COLUMNS=NO
is not used or set toYES
, orthe_geom
has non-null values in all rows.
Attachments (1)
Change History (3)
by , 8 years ago
Attachment: | bug_empty_the_geom.csv added |
---|
comment:1 by , 8 years ago
Owner: | changed from | to
---|
comment:2 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Version: | unspecified → svn-trunk |
Note:
See TracTickets
for help on using tickets.
trunk r31006 "CSV: fix crash with empty geometry column and GEOM_POSSIBLE_NAMES and KEEP_GEOM_COLUMNS=NO options (#6152)"
Pushed in 2.0_cartodb branch in https://github.com/rouault/gdal2/commit/ad3285765895989215875aaaa124b9e8f57f0aa2