Opened 15 years ago

Closed 15 years ago

#493 closed enhancement (fixed)

wxgui: segfault in g.region causes crash of GUI

Reported by: mlennert Owned by: martinl
Priority: minor Milestone: 6.4.0
Component: wxGUI Version: svn-trunk
Keywords: Cc: grass-dev@…
CPU: Unspecified Platform: Unspecified

Description

(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 ?

Change History (2)

comment:1 by martinl, 15 years ago

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

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

in reply to:  1 comment:2 by mlennert, 15 years ago

Resolution: fixed
Status: assignedclosed

Replying to martinl:

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

Thanks !

Note: See TracTickets for help on using tickets.