[GRASS-dev] [GRASS GIS] #966: wx attribute table manger fails on wingrass with >188 dbf tables

#966: wx attribute table manger fails on wingrass with >188 dbf tables
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
----------------------+-----------------------------------------------------
Hi,

as reported to the -users ML:
  http://n2.nabble.com/Bug-or-my-fault-td4609390.html

On latest nightly builds of 6.4.0svn WinGrass if you have a mapset with
>188 dbf tables you get an error when you try to edit in the attribute
table gui.

I can reproduce this on Windows XP (spaces in both $GISBASE and $GISDBASE)
but not on Linux (no spaces in path names). But I get an error, no
infinite loop.

  - create a new mapset called eg test255
  - at the msys prompt create a bunch of maps:
{{{
for i in `seq 350` ; do
   v.random out=test_$i column=rand_01 zmax=1
done
}}}

  - test with `v.db.select test_262`
  - add map to Layer Manager, query it, no problem.
  - right click on map name in layer manager, edit attributes.
  - attribute manager opens
  - right click on an entry, edit it, and click Submit.
  - you get a popup error window:
{{{
__Error in command execution db.execute__

Execution failed: 'db.execute
input=c:\docume~1\hamish\locals~1\temp\tmprnzmdi driver=dbf
database=C:\Documents and
Settings\Hamish\grassdata/spearfish60/user255/dbf/'

Details:
Error:

[Ok]
}}}

and in the layer manager Output tab:
{{{
Traceback ...
   File "c:\Program
Files\GRASS-64-SVN\etc\wxpython\gui_modules\dbm.py", line
1425, in OnDataItemEdit

self.ApplyCommands()
   File "...\dbm.py", line 1783, in ApplyCommands

gcmd.Command(cmd)
   File "...\gcmd.py", line 356, in __init__

_("Error: ") + self.GetError()))
gui_modules.gcmd
.
CmdError
}}}

If I run db.execute directly from the msys prompt it works ok:
{{{
echo "UPDATE test_285 SET rand_01=0.999 WHERE cat=12" | db.execute
v.db.select test_285
}}}

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/966&gt;
GRASS GIS <http://grass.osgeo.org>

#966: wx attribute table manger fails on wingrass with >188 dbf tables
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
----------------------+-----------------------------------------------------
Changes (by hellik):

  * milestone: 6.4.0 => 6.4.2

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/966#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#966: wx attribute table manger fails on wingrass with >188 dbf tables
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
----------------------+-----------------------------------------------------

Comment(by hamish):

needs to be retested with a modern build

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/966#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#966: wx attribute table manger fails on wingrass with >188 dbf tables
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
----------------------+-----------------------------------------------------

Comment(by hamish):

retested with the latest 6.5svn nightly snapshot and whatever the heck the
trouble was here seems to be fixed now.

In testing notice a couple other little bugletts.
  - even though the column is double precision the attribute manager
displays the value as single precision %f. Submitting a double precision
number there gets rounded to single precision.
  - in the cursor query tool on the main map display the vector layer
doesn't have to be in 'Start editing' mode to change the value of what's
selected, or a tick box in the query result window which comes up. Raw
data is sacred and should be read-only unless the user specifically asked
for it not to be. (with d.what.vect you had to use the -e flag to make it
editable)

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/966#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>