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


(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/", line 1592, in <module>
  File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/etc/wxpython/", line 1585, in main
    app = GMApp(workspaceFile)
  File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/etc/wxpython/", line 1507, in __init__
    wx.App.__init__(self, False)
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/", line 7836, in __init__
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/", line 7433, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/etc/wxpython/", line 1523, in OnInit
    workspace = self.workspaceFile)
  File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/etc/wxpython/", line 175, in __init__
  File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/etc/wxpython/", 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/", 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/", line 259, in __init__
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.