[GRASS-dev] [GRASS GIS] #1270: Error in Attribute Table Manager

#1270: Error in Attribute Table Manager
------------------------+---------------------------------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: Database | Version: 6.4.1 RCs
Keywords: | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------
Hi,
If I add columns to the database of a coverage in "Attribute Table
Manager" and I modify a value in these columns, Grass shows a message of
error (you see attached image) and it doesn't memorize the value.

Thanks

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

#1270: Error in Attribute Table Manager
------------------------+---------------------------------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: Database | Version: 6.4.1 RCs
Keywords: | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------+---------------------------------------------------
Changes (by antonioall):

  * cpu: x86-64 => x86-32

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

#1270: Error in Attribute Table Manager
------------------------+---------------------------------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: Database | Version: 6.4.1 RCs
Keywords: wingrass | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------+---------------------------------------------------
Changes (by hellik):

  * keywords: => wingrass

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

#1270: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.2
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------
Changes (by hamish):

  * keywords: wingrass => wingrass, attribute table manager
  * priority: normal => critical
  * version: 6.4.1 RCs => svn-develbranch6
  * component: Database => wxGUI
  * milestone: 6.4.1 => 6.4.2

Comment:

Hi,

I can reproduce this in 6.5svn nightly build on Windows XP.

steps as described in the orig report, add a new vector column, edit a
row, hit submit.

error is now:
{{{
Error:
c:\docume~1\hamish\locals~1\temp\tmpuelgf4: Permission denied
}}}

exiting & restarting grass doesn't help, nor does rebooting. (there's not
zombie dbf.exe afterwards either)

same error if I try to add a new row or delete and old one.

... so it is generally impossible to edit using the attribute table
manager in wingrass?! (bumping priority)

suspect the attribute manager is holding the temp file open..

Hamish

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.2
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hamish):

maybe this program helps: (lsof for Windows)

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs
/en-us/openfiles.mspx

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.2
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hellik):

Replying to [comment:3 hamish]:
> Hi,
>
> I can reproduce this in 6.5svn nightly build on Windows XP.

confirmed

>
> ... so it is generally impossible to edit using the attribute table
manager in wingrass?! (bumping priority)
>

but map display -> query raster/vector layer -> click on an activated
vector layer feature -> a little windows for updating attributes pops up

there you can edit successfully the attribute for the selected feature.

Helmut

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.2
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hamish):

suggest to apply this patch to 6.4svn until a solution is found:

{{{
Index: gui/wxpython/gui_modules/dbm.py

--- gui/wxpython/gui_modules/dbm.py (revision 50681)
+++ gui/wxpython/gui_modules/dbm.py (working copy)
@@ -546,7 +546,11 @@
              self.editable = True
          else:
              self.editable = False
-
+
+ # FIXME: editing is currently broken on wingrass (bug #1270)
+ if sys.platform == 'win32':
+ self.editable = False
+
          self.cmdLog = log # self.parent.goutput

          wx.Frame.__init__(self, parent, id, style=style)
}}}

Hamish

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.2
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hamish):

patch applied in relbr64 in r50701. please test!

sys.platform for Cygwin = cygwin not win32, so it should still work from
there.

Hamish

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.2
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hellik):

Replying to [comment:7 hamish]:
> patch applied in relbr64 in r50701. please test!
>

tested with

osgeo4w-wingrass6.4.3svn r52715
osgeo4w-wingrass6.5svn r52495

error pop up still there.

but map display -> query raster/vector layer -> click on an activated
vector layer feature -> a little windows for updating attributes pops up

there you can edit successfully the attribute for the selected feature
without any problem.

Helmut

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.2
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by mlennert):

Replying to [comment:3 hamish]:
> Hi,
>
> I can reproduce this in 6.5svn nightly build on Windows XP.
>
> steps as described in the orig report, add a new vector column, edit a
row, hit submit.
>
> error is now:
> {{{
> Error:
> c:\docume~1\hamish\locals~1\temp\tmpuelgf4: Permission denied
> }}}

Working with a student yesterday, I saw a similar error trying to add a
new column.

We were trying to digitize, so I thought it was because the table was open
for the digitization, but even when we ended that, no way to add a new
column.

Even calling v.db.addcol ended in an error. This all happened in a hurry,
so I don't have the exact errors and cannot reproduce right now. Anyone
can confirm that this also happens when you try to add a column ? This was
with a grass6.4.3svn install (don't have the revision number).

Moritz

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.2
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hellik):

Replying to [comment:9 mlennert]:
> Replying to [comment:3 hamish]:
> > Hi,
> >
> > I can reproduce this in 6.5svn nightly build on Windows XP.
> >
> > steps as described in the orig report, add a new vector column, edit a
row, hit submit.
> >
> > error is now:
> > {{{
> > Error:
> > c:\docume~1\hamish\locals~1\temp\tmpuelgf4: Permission denied
> > }}}
>
> Working with a student yesterday, I saw a similar error trying to add a
new column.

still there by editing within the table manager, but not by querying the
vector in the map display and changing a table value there.

Helmut

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.4
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------
Changes (by hamish):

  * milestone: 6.4.2 => 6.4.4

Comment:

Hi,

editing the table on WinGrass was greyed-out in the release branch by
r50701, but that was lost in a bulk backport. The patch from comment:6 is
now reapplied with r55016. It doesn't do anything to fix the problem, but
makes it not-release critical since the user won't encounter breakage.

Leaving broken in the release branches in hope of a real fix one day;
severity of ticket can be lowered after some testing.

thanks,
Hamish

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------
Changes (by neteler):

  * priority: critical => blocker
  * milestone: 6.4.4 => 6.4.3

Comment:

I guess that http://trac.osgeo.org/grass/changeset/55106 will now
block any testing.

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hellik):

Replying to [comment:12 neteler]:
> I guess that http://trac.osgeo.org/grass/changeset/55106 will now
> block any testing.

yes.

Helmut

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hellik):

Replying to [comment:9 mlennert]:
[...]
>
> Even calling v.db.addcol ended in an error.

v.db.addcol works here (latest osgeo4w-nightly build)

Helmut

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hellik):

Replying to [comment:8 hellik]:
[...]
> but map display -> query raster/vector layer -> click on an activated
vector layer feature -> a little windows for updating attributes pops up
>
> there you can edit successfully the attribute for the selected feature
without any problem.

still working this way...

Helmut

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hamish):

Replying to [comment:12 neteler]:
> I guess that http://trac.osgeo.org/grass/changeset/55106 will now
> block any testing.

not really, just use devbr6 for testing, or open up dbmgr/manager.py in
notepad++ or TextPad or whatever favourite text editor under Windows and
comment-out the comment-out. The idea of r55106 is to have relbr64 ready
for release now, and to continue the debugging in the dev branches. aka
this doesn't look like it is being resolved in a hurry, and if we leave it
blocking 6.4.3 then the release may take a long time.

is there a wxPy way to grey-out entire tabs? the manage tables and manage
layers tabs don't give much feedback that they're disabled beyond "(read-
only)" in the window title super-tab. the connection info may still be
interesting to see, so fully blocking access to reading what's there
wouldn't be the ideal way to do that.. ?

with the r55185-512 6.4.3svn nightly build on Windows7 64bit running the
desktop icon wxGUI, I still get an error. Actually it froze with an
endless spinning circle hourglass thing when I tried to add a column in
the "show attribute data" manage tables tab, with the cursor over any of
the open grass windows. I had to kill it by clicking on the "X" in the
window, which took out all of grass except a zombie dbf.exe in the task
manager + the empty cmd.exe dosbox.

moreover, using v.db.addcol from the main db -> vect db conns menu to add
a column had this error:
{{{
v.db.addcol --verbose map=copyofbugs2@user1 columns=someint2 integer
DBMI-DBF driver error:
ERROR: Unable to open database <C:/Program Files (x86)/GRASS GIS
6.4.3svn/msys/Users/Hamish/Documents/GIS DataBase/spearfish60/user1/dbf/>
ERROR: Cannot continue (problem adding column).
}}}

Somehow ProgramFiles....msys (GISBASE) is sneaking into the GISDBASE. ??

and again there's a dbf.exe zombie in the task manager, so when you try to
quit the empty dos box lurking in the background won't exit without a `^C`
in it or to kill the dbf.exe in the task manager. No lockup this way
though.

running v.db.connect from the same menu has everything looking as it
should be:
{{{
v.db.connect -p map=copyofbugs2@user1
layer <1> table <copyofbugs2> in database </Users/Hamish/Documents/GIS
DataBase\spearfish60\user1\dbf\> through driver <dbf> with key <cat>
Vector map <copyofbugs2@user1> is connected by:
}}}

well, everything except the order of stderr and stdout, but I can forgive
that.

On a hunch I tried dragging a file into the dbf/ folder directly, but it
complied and didn't request that I do that as admin.

Hamish

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by neteler):

Replying to [comment:16 hamish]:
> Replying to [comment:12 neteler]:
> > I guess that http://trac.osgeo.org/grass/changeset/55106 will now
> > block any testing.
>
> not really, just use devbr6 for testing

... as per previous discussions (see ML archive) I doubt that devbr6
receives reasonable testing.

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hellik):

Replying to [comment:3 hamish]:
>
> suspect the attribute manager is holding the temp file open..

tested with

{{{
System Info
GRASS version: 6.5.svn
GRASS SVN Revision: 55167
GIS Library Revision: 50936 (2012-02-25)
GDAL/OGR: 1.9.2
PROJ4: Rel. 4.8.0, 6 March 2012
Python: 2.7.2
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
}}}

yes, it seems so.

the temp file is in C:\Users\xxxxxxx\AppData\Local\Temp, the file's
content is the sql update command, e.g.

{{{
UPDATE myhosp SET testc=2 WHERE cat=1;
}}}

any idea how to close the temp file?

Helmut

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

#1270: wingrass: Error in Attribute Table Manager
-----------------------------------------------+----------------------------
Reporter: antonioall | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-develbranch6
Keywords: wingrass, attribute table manager | Platform: MSWindows Vista
      Cpu: x86-32 |
-----------------------------------------------+----------------------------

Comment(by hellik):

Replying to [comment:16 hamish]:
[...]
>
> moreover, using v.db.addcol from the main db -> vect db conns menu to
add a column had this error:
> {{{
> v.db.addcol --verbose map=copyofbugs2@user1 columns=someint2 integer
> DBMI-DBF driver error:
> ERROR: Unable to open database <C:/Program Files (x86)/GRASS GIS
6.4.3svn/msys/Users/Hamish/Documents/GIS DataBase/spearfish60/user1/dbf/>
> ERROR: Cannot continue (problem adding column).
> }}}

tested with

{{{
GRASS version: 6.4.3svn
GRASS SVN Revision: 55185
GIS Library Revision: 50937 (2012-02-25)
GDAL/OGR: 1.9.2
PROJ4: Rel. 4.8.0, 6 March 2012
Python: 2.7.2
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
}}}

{{{
v.db.addcol map=myfires@user1 columns=someint2 integer
(Mon Feb 25 21:05:23 2013) Command finished (2 sec)
}}}

Helmut

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