[GRASS-dev] [GRASS GIS] #493: wxgui: segfault in g.region causes crash of GUI

#493: wxgui: segfault in g.region causes crash of GUI
-------------------------+--------------------------------------------------
Reporter: mlennert | Owner: grass-dev@lists.osgeo.org
     Type: enhancement | Status: new
Priority: minor | Milestone: 6.4.0
Component: wxGUI | Version: svn-trunk
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
(related to #492)

When g.region segfaults in a location, the wxGUI crashes at startup with
the following traceback:

{{{
Traceback (most recent call last):
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
gnu/etc/wxpython/wxgui.py", line 1592, in <module>
     sys.exit(main())
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
gnu/etc/wxpython/wxgui.py", line 1585, in main
     app = GMApp(workspaceFile)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
gnu/etc/wxpython/wxgui.py", line 1507, in __init__
     wx.App.__init__(self, False)
   File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7836, in __init__
     self._BootstrapApp()
   File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7433, in _BootstrapApp
     return _core_.PyApp__BootstrapApp(*args, **kwargs)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
gnu/etc/wxpython/wxgui.py", line 1523, in OnInit
     workspace = self.workspaceFile)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
gnu/etc/wxpython/wxgui.py", line 175, in __init__
     self.NewDisplay(show=False)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
gnu/etc/wxpython/wxgui.py", line 1161, in NewDisplay
     auimgr=self._auimgr, showMapDisplay=show)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
gnu/etc/wxpython/gui_modules/wxgui_utils.py", line 106, in __init__
     Map=self.Map, auimgr=self.auimgr)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
gnu/etc/wxpython/gui_modules/mapdisp.py", line 259, in __init__
     self.MapWindow.ZoomHistory(self.Map.region['n'],
KeyError: 'n'
}}}

I can imagine that the GUI cannot function without a functional g.region,
but would it be possible to create a more graceful exit/error message ?

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

#493: wxgui: segfault in g.region causes crash of GUI
--------------------------+-------------------------------------------------
  Reporter: mlennert | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: minor | Milestone: 6.4.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by martinl):

  * status: new => assigned
  * owner: grass-dev@lists.osgeo.org => martinl
* cc: grass-dev@lists.osgeo.org (added)

Comment:

Sure - done in trunk (r35852), devbr6 (r35853) and relbr64 (r35854).

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

#493: wxgui: segfault in g.region causes crash of GUI
--------------------------+-------------------------------------------------
  Reporter: mlennert | Owner: martinl
      Type: enhancement | Status: closed
  Priority: minor | Milestone: 6.4.0
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by mlennert):

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

Comment:

Replying to [comment:1 martinl]:
> Sure - done in trunk (r35852), devbr6 (r35853) and relbr64 (r35854).

Thanks !

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