[GRASS-dev] Re: [GRASS GIS] #461: v.to.db crashes on a shapefile
connected with v.external
GRASS GIS
trac at osgeo.org
Tue Jan 12 01:43:40 EST 2010
#461: v.to.db crashes on a shapefile connected with v.external
-----------------------+----------------------------------------------------
Reporter: msieczka | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: Vector | Version: svn-develbranch6
Resolution: | Keywords:
Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Comment (by glynn):
Replying to [comment:5 hamish]:
> We may not be able to add the requested functionality for the next
release, but can we do anything about replacing the segfault with a
G_fatal_error()?
The following is based upon the backtrace, and is completely untested:
{{{
--- lib/db/dbmi_client/select.c (revision 40258)
+++ lib/db/dbmi_client/select.c (working copy)
@@ -134,6 +134,8 @@
table = db_get_cursor_table(&cursor);
column = db_get_table_column(table, 0); /* first column */
+ if (!column)
+ G_fatal_error(_("Table has no columns"));
value = db_get_column_value(column);
type = db_get_column_sqltype(column);
type = db_sqltype_to_Ctype(type);
}}}
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/461#comment:6>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list