[GRASS-dev] [GRASS GIS] #2474: G7: vector network toolbox crash

#2474: G7: vector network toolbox crash
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-releasebranch70
Keywords: v.net | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
(copied here from trac comment:27:ticket:2326)

The vector network toolbox seems to lack some related update (trunk from
4th of Nov 2014). We tried to run v.net.alloc therein on roads_major:

{{{
Traceback (most recent call last):
   File "/home/matteo/software/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/lmgr/frame.py", line 788, in
OnVNet

self.GetMapDisplay().OnVNet(event)
   File "/home/matteo/software/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/mapdisp/frame.py", line
1420, in OnVNet

self.dialogs['vnet'] = VNETDialog(parent=self,
giface=self._giface)
   File "/home/matteo/software/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/vnet/dialogs.py", line 134,
in __init__

self._createInputDbMgrPage()
   File "/home/matteo/software/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/vnet/dialogs.py", line 448,
in _createInputDbMgrPage

self.inpDbMgrData['dbMgr'] = DbMgrBase()
   File "/home/matteo/software/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/dbmgr/base.py", line 669, in
__init__

self.dbMgrData['mapDBInfo'] =
VectorDBInfo(self.dbMgrData['vectName'])
   File "/home/matteo/software/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/dbmgr/vinfo.py", line 74, in
__init__

VectorDBInfoBase.__init__(self, map)
   File "/home/matteo/software/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/gui_core/gselect.py", line
723, in __init__

if not self._CheckDBConnection(): # -> self.layers
   File "/home/matteo/software/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/gui_core/gselect.py", line
731, in _CheckDBConnection

self.layers = grass.vector_db(map = self.map, stderr =
nuldev)
   File "/home/matteo/software/grass_trunk/dist.x86_64
-unknown-linux-gnu/etc/python/grass/script/vector.py", line
42, in vector_db

**args)
   File "/home/matteo/software/grass_trunk/dist.x86_64
-unknown-linux-gnu/etc/python/grass/script/core.py", line
420, in read_command

returncode=returncode)
grass.exceptions
.
CalledModuleError
:
Module run None v.db.connect --q -g stderr=<open file
'/dev/null', mode 'w+' at 0x7ffac45d8f60> sep=; ended with
error
Process ended with non-zero return code 1. See errors in the
(error) output.
}}}

A workaround has been submitted in r62614 as of trac trac
comment:28:ticket:2326

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

#2474: G7: vector network toolbox crash
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-releasebranch70
Keywords: v.net | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by wenzeslaus):

To clarify, r62614 is the fix for the traceback and allows the tool to
work, so you will not get this traceback anymore. The
comment:28:ticket:2326 notes the unpleasant true about most of the GUI
code, refactoring is needed and better (and explicit) error handling must
be introduced. So milestone of this would be 8.0.0 in my opinion.

In comment:29:ticket:2326, I was talking about other potential errors.
Sorry for confusion.

I'm suggesting to close this as fixed.

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

#2474: G7: vector network toolbox crash
--------------------------+-------------------------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-releasebranch70
Resolution: fixed | Keywords: v.net
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by annakrat):

  * status: new => closed
  * resolution: => fixed

Comment:

I changed again the exception handling in r62691. This can be closed.

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

#2474: G7: vector network toolbox crash
--------------------------+-------------------------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-releasebranch70
Resolution: fixed | Keywords: v.net, gselect
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by wenzeslaus):

  * keywords: v.net => v.net, gselect

Comment:

Backported to release 70 in r62789.

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