[GRASS-dev] Re: [grass-code I][354] v.digit freeze after "Display attributes" --> "New feature"

Hamish hamish_nospam at yahoo.com
Thu Apr 26 03:02:54 EDT 2007


Maciej Sieczka wrote:
> > I might have missed something!
> 
> Now, regarding this very bug report, I confirm it exists in 6.2 CVS.
> Such locks when editing attributes in v.digit happen. Fixed in 6.3.

Hey, I was just able to reproduce the bug!
 (created new table in the settings menu with a varchar(15) column)

More tries to get it to lock up:  (all unsucessful)

- create a new table from the v.digit settings menu
    [Create new table] (only cat)
- digitize boundary box [No category]
- move vertex to close boundary (turns green)
- switch to digitize centroid tool
- create a centroid (edit form pops up; nothing to edit)
- click submit

at which point in red letters at the bottom of the edit form is this:
Cannot update table:
DBMI-DBF driver error:
SQL parser error in statement:
update testmap3 set  where cat = 1
Error in db_execute_immediate()

and in the terminal:
G63> v.digit -n testmap3
New empty map created.
### [before create new table]
cat integer 
### [after create new table]
D0/0: Name = cat
D0/0: Name = _grass_internal_database_encoding
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
DBMI-DBF driver error:
SQL parser error in statement:
update testmap3 set  where cat = 1
Error in db_execute_immediate()

WARNING: Cannot update table

######
v.digit is alive, I can hit the exit/door icon to leave and close the map.


trying again, new map, this time create a new table with a second int
column. Everything works (still get above debug messages).

try again, new map, this time add a new varchar() column. No problems.
try again, new map, this time add new int and varchar() columns.
   No problems.


... and now I can't reproduce it at all no matter what I try ...
shrug.

the driver and encoding errors seem like a good place to start looking for a
fix. I'd rather fix a bug in dead-end code than hope the lightly tested new
version is less buggy.


> This also reminds me of an issue with corrupted "d.what.vect -e"
> tcl/tk windows [1] - fixed in 6.3, but still present in 6.2.
> 
> [1]https://intevation.de/rt/webrt?serial_num=4429

I can't reproduce this in 6.2.1, but:
G6.2.1:spearfish60 > g.copy v=bugsites,test_bugs
COPY [bugsites at PERMANENT] to current mapset as [test_bugs]
WARNING: Default driver / database set to:
         driver: dbf
         database: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/


G621> d.vect test_bugs

G621> d.what.vect -e
[encoding is left as the default utf-8]
every time I hit submit, I get the following printed in the terminal, but no
other ill effects.

D0/0: Name = cat
D0/0: Name = str1
D0/0: Name = _grass_internal_database_encoding
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 


the extra debug messages are from lib/form/form.c  line 180
  G_debug ( 0, "Name = %s", Cols[i].name );

"Could not set Tcl system encoding to <blank>" is a bit suspicious.

interesting, selecting different encodings show it looping through the
encode types, ie ascii is 2nd on list, iso8859-1 is 3rd. utf-8 doesn't
get printed, the other three do, in order:

D0/0: Name = cat
D0/0: Name = str1
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to ascii
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 

D0/0: Name = cat
D0/0: Name = str1
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to iso8859-1
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 

D0/0: Name = cat
D0/0: Name = str1
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to 
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to koi8-r


still not convinced that backporting the new v.digit is a good idea,
(also a complete non-issue until the 6.3 v.digit opens without
seg-faulting)


Hamish




More information about the grass-dev mailing list