[GRASS-dev] [bug #4527] (grass) db.copy: segfault when to_table already exists

Request Tracker grass-bugs at intevation.de
Tue May 30 16:13:29 EDT 2006


this bug's URL: http://intevation.de/rt/webrt?serial_num=4527
-------------------------------------------------------------------------

Subject: db.copy: segfault when to_table already exists

Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 2006-05-17

I agree it shouldn't be allowed, but it shouldn't segfault.

Using DBF driver:

$ db.connect -p
driver:dbf
database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
schema:(null)
group:(null)

$ db.tables -p
cieki05
cieki05_oborot



THE SEGFAULT:

$ db.copy from_table=cieki05 to_table=cieki05_oborot
DBMI-DBF driver error:
Table cieki05_oborot already exists
Cannot create table

WARNING: Cannot create new table
Segmentation fault



BACKTRACE (usefull?):

#0  0xb7de8a38 in fwrite () from /lib/tls/i686/cmov/libc.so.6
#1  0xb7e85bc3 in xdrstdio_create () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7e83daf in xdr_long () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7e83d44 in xdr_int () from /lib/tls/i686/cmov/libc.so.6
#4  0xb7fba2aa in db__send_int (n=101) at xdrint.c:13
#5  0xb7fba5ad in db__start_procedure_call (procnum=101) at xdrprocedure.c:11
#6  0xb7fc1375 in db_close_database (driver=0x0) at c_closedb.c:17
#7  0xb7fc352d in db_close_database_shutdown_driver (driver=0x804d0d0) at db.c:44
#8  0xb7fc2d70 in db__copy_table (from_drvname=0x804b480 "dbf", from_dbname=0x804b0c8 "$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/",
    from_tblname=0x804c1f8 "cieki05", to_drvname=0x804b1f0 "dbf", to_dbname=0x804b358 "$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/",
    to_tblname=0x804c1b8 "cieki05_oborot", where=0x0, select=0x0, selcol=0x0, ivals=0x0, nvals=0) at copy_tab.c:286
#9  0xb7fc30aa in db_copy_table (from_drvname=0x804b480 "dbf", from_dbname=0x804b0c8 "$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/",
    from_tblname=0x804c1f8 "cieki05", to_drvname=0x804b1f0 "dbf", to_dbname=0x804b358 "$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/",
    to_tblname=0x804c1b8 "cieki05_oborot") at copy_tab.c:315
#10 0x08048b8f in main (argc=3, argv=0xbffd9c94) at copy.c:102



I recall Markus has put a Grass backtrace how-to somwhere but I cannot find it on the www nor wiki. Could we have it linked in the bugreport interface and http://grass.itc.it/devel/index.php as well as http://grass.itc.it/community/get_involved.php?

Maciek


-------------------------------------------- Managed by Request Tracker




More information about the grass-dev mailing list