#979: WxGUI fails to display vector attribute table
--------------------------------------+-------------------------------------
Reporter: marisn | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: blocker | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Keywords: wxgui, windows, database | Platform: MSWindows Vista
Cpu: x86-32 |
--------------------------------------+-------------------------------------
Displaying attribute data for Spearfish roads (and any other vector map)
fails. Most likely another spaces issue. Files are present in
C:\Users\Maris\Documents\GIS DataBase\Spearfish60\PERMANENT\dbf
As paths are set up by default in installer, rising this as an blocker.
{{{
(Mon Mar 01 20:19:05 2010)
v.info map=roads@PERMANENT
+----------------------------------------------------------------------------+
| Layer: roads@PERMANENT
|
| Mapset: PERMANENT
|
| Location: Spearfish60
|
| Database: C:/Users/Maris/Documents/GIS DataBase
|
| Title: Output from Vpatch
|
| Map scale: 1:24000
|
| Map format: native
|
| Name of creator: youngs
|
| Organization: US Army Const. Eng. Rsch. Lab
|
| Source date: 1961
|
|----------------------------------------------------------------------------|
| Type of Map: vektors (level: 2)
|
|
|
| Number of points: 0 Number of areas: 0
|
| Number of lines: 825 Number of islands: 0
|
| Number of boundaries: 0 Number of faces: 0
|
| Number of centroids: 0 Number of kernels: 0
|
|
|
| Map is 3D: No
|
| Number of dblinks: 1
|
|
|
| Projection: UTM (zone 13)
|
| N: 4928063.39801461 S: 4914006.33783702
|
| E: 609527.21021496 W: 589434.85646865
|
|
|
| Digitization threshold: 18.288
|
| Comments:
|
| new roads at 1:24000 for Spearfish database
|
+----------------------------------------------------------------------------+
(Mon Mar 01 20:19:05 2010) Command finished (0 sec)
Traceback (most recent call last):
File "C:/Program
Files/GRASS-64-SVN/etc/wxpython/wxgui.py", line 1197, in
OnShowAttributeTable
item=layer, log=self.goutput)
File "C:\Program
Files\GRASS-64-SVN\etc\wxpython\gui_modules\dbm.py", line
558, in __init__
self.__createManageLayerPage()
File "C:\Program
Files\GRASS-64-SVN\etc\wxpython\gui_modules\dbm.py", line
950, in __createManageLayerPage
parentDialog=self)
File "C:\Program
Files\GRASS-64-SVN\etc\wxpython\gui_modules\dbm.py", line
2202, in __init__
raise gcmd.DBMError(_('Unable to determine default DB
connection settings. '
gui_modules.gcmd
.
DBMError
Indeed this seems to be a space issue in wxgui, as gis.m works just fine.
Maybe gis.m code can be used as an example:
source:grass/branches/develbranch_6/gui/tcltk/gis.m/vector.tcl@38296#L273
it is unclear to me how you are triggering the bug. Vector -> Reports and
stats -> Basic vector metadata ?? (which works for me)
* query in map display window works
* right click on map name in layer manager and start attribute table
manager works
I'd be more suspicious that this is due to db.select being used instead of
v.db.select.
(db.select only works on maps in the current mapset, while v.db.select
accepts @othermapset. see v.db.* scripts for workaround)
Replying to [comment:2 hamish]:
> it is unclear to me how you are triggering the bug.
As I'm using WxGUI for first time, I was not aware of so many options.
Start GRASS, Location=Spearfish6 Mapset=user
>Vector -> Reports and stats -> Basic vector metadata ?? (which works for
me)
It's v.info and not WxGUI. Still it reports wrong database, but prints out
correct column names.
> * query in map display window works
It's v.what and not WxGUI. Works fine, as it doesn't fiddle with db
settings.
> * right click on map name in layer manager and start attribute table
manager works
This is WxGUI specific. '''Fails''' in same way as pressing button "Show
attribute table"
You are right about this. Attribute data works fine, if I launch wxgui
within PERMANENT mapset.
> I'd be more suspicious that this is due to db.select being used instead
of v.db.select.
>
> (db.select only works on maps in the current mapset, while v.db.select
accepts @othermapset. see v.db.* scripts for workaround)
>
>
>
> Hamish
Replying to [comment:3 marisn]:
> Replying to [comment:2 hamish]:
> > it is unclear to me how you are triggering the bug.
>
> Start GRASS, Location=Spearfish6 Mapset=user
... then what?
It is still very unclear to me: what buttons do you press in the GUI to
trigger this?
> It's v.info and not WxGUI. Still it reports wrong database,
> but prints out correct column names.
... are you running v.info from the Cmd> prompt in the wxGUI layer
manager? v.info called by itself without extra flags will not print out
column names.
This looks like an Heisenbug. When I wanted to post a reply for first
time, I was unable to reproduce problem anymore. Then during lab work
WxGUI attribute displaying failed on 15 Windows XP and my Vista computer
too (all running same GRASS version). (Unfortunately that wasn't the only
moment when I felt embarrassment because I choose to show new gui) If
anyone has instructions how to run WxGUI with Valgrind on Windows Vista, I
would like to hear it to provide info about probable memory corruption.
Replying to [comment:5 marisn]:
> As my verbal skills are too poor, I created video to display all steps.
For textual output see my previous comments.
> http://www.gisnet.lv/ggmlinux/grass_01.avi
>
> This looks like an Heisenbug. When I wanted to post a reply for first
time, I was unable to reproduce problem anymore. Then during lab work
WxGUI attribute displaying failed on 15 Windows XP and my Vista computer
too (all running same GRASS version). (Unfortunately that wasn't the only
moment when I felt embarrassment because I choose to show new gui) If
anyone has instructions how to run WxGUI with Valgrind on Windows Vista, I
would like to hear it to provide info about probable memory corruption.
Seems to be, unable to reproduce with r41310 (GRASS 6.4 MS Window Server
2008). Downgrading the ticket priority. Martin
Something similar happened to me. I reported it a couple weeks back.
Trying running v.db.connect on this to explicitly set a db driver and db
connection to a specific dbf file. Something I'm also wondering about is
if this works better with sqlite now.
pop up window at the start of it:
{{{
__Attribute table manager error__
(X) Unable to determine default DB connection settings. Please define DB
connection using db.connect module.
}}}
that error comes from gui/wxpython/gui_modules/dbm.py after running
`db.connect -p` if driver: or database: has no value.
What does `db.connect -p` say from the MSys command line? (or from the
Cmd> prompt)
does the drosmins mapset have a valid VAR file in it?
(we are reading a vector+table from another mapset in this example, so I'm
not sure how useful what db.connect tells us is going to be, but...)
do you see the same error if you g.copy the vector into the current mapset
first?
following the same actions work for me in Windows XP.
Hamish
ps- your English is really fine, the problem is that there are twenty ways
for the common commands to be called as part of different work-flow areas,
so knowing which one it is takes a lot of describing. the video was super
clear, thanks.
First step to reproduce issue is "Create new mapset in wxgui startup
screen".
When I created new mapset in wxgui startup screen, it's directroy had only
"WIND" file and ".tmp" folder. No "VAR" files. Missing "VAR" file in new
mapsets is discussed in #7
Still wxgui should NOT fail if default DB connection is missing (or is
incorrect etc.), as only selected vector map connection matters.
When I copy vector map from PERMANENT to newMapset with g.copy, there is
message, that ~"Default db connection is created" and also afterwards
there is an "VAR" file in mapset. Then displaying attribute data for
current mapset or PERMANENT works just fine.
#979: WxGUI fails to display vector attribute table if default db connection is
missing
------------------------------+---------------------------------------------
Reporter: marisn | Owner: martinl
Type: defect | Status: assigned
Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords: wingrass, database
Platform: MSWindows Vista | Cpu: x86-32
------------------------------+---------------------------------------------
Comment (by hamish):
Martin:
> Hopefully fixed in r41403.
yes, works for me. (tested in 6.5svn on linux)
but now I get a bunch of warnings in the terminal
{{{
(gui:6256): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to
allocate widget with width -5 and height 17
}}}
#979: WxGUI fails to display vector attribute table if default db connection is
missing
------------------------------+---------------------------------------------
Reporter: marisn | Owner: martinl
Type: defect | Status: assigned
Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords: wingrass, database
Platform: MSWindows Vista | Cpu: x86-32
------------------------------+---------------------------------------------
Comment (by martinl):
Replying to [comment:11 hamish]:
> Martin:
> > Hopefully fixed in r41403.
> but now I get a bunch of warnings in the terminal
> {{{
> (gui:6256): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to
allocate widget with width -5 and height 17
> }}}
it has been already reported in bug-tracker. Just low priority. Martin