#461: v.to.db crashes on a shapefile connected with v.external
-----------------------+----------------------------------------------------
Reporter: msieczka | Owner: [email protected]
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>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev