[GRASS-dev] [GRASS GIS] #3295: GRASS GIS fails to start without terminal
GRASS GIS
trac at osgeo.org
Mon Feb 20 13:06:01 PST 2017
#3295: GRASS GIS fails to start without terminal
-------------------------------------------------+-------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.4.0
Component: Startup | Version: unspecified
Keywords: gisset, wxGUI, init, grass.py, | CPU: Unspecified
nohup, terminal, shell, GUI, CLI, exec, g.gui |
Platform: Linux |
-------------------------------------------------+-------------------------
On Ubuntu (16.04):
* Do Ctrl+F2 (window to directly run commands - rather than desktop
applications)
* Type grass
* Fill the startup screen
* Start session
* Start fails
In 7.2 you get error about g.extension (#3253) and trunk you don't get
anything (it fails later on).
It is reproducible with nohup:
{{{
nohup grass
}}}
Using `less nohup.out` you can get the output which mainly reveals:
{{{
ERROR: Variable 'LOCATION_NAME' not set
}}}
followed by
{{{
Traceback (most recent call last):
File "/usr/lib/grass72/gui/wxpython/wxgui.py", line 158, in <module>
sys.exit(main())
File "/usr/lib/grass72/gui/wxpython/wxgui.py", line 145, in main
app = GMApp(workspaceFile)
File "/usr/lib/grass72/gui/wxpython/wxgui.py", line 48, in __init__
...
grass.exceptions.CalledModuleError: [it depends]
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
PyAssertionError: C++ assertion "GetEventHandler() == this" failed at
../src/common/wincmn.cpp(478) in ~wxWindowBase(): any pushed event
handlers must have been removed
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
wx._core.PyAssertionError: C++ assertion "GetEventHandler() == this"
failed at ../src/common/wincmn.cpp(478) in ~wxWindowBase(): any pushed
event handlers must have been removed
}}}
Workaround which assumes you have some default mapset already:
{{{
grass --exec g.gui
}}}
Answer to the "What did you expect to happen?" question:
* GRASS GIS should start using this method as other applications do (e.g.
QGIS or Gimp).
Other possible improvements:
* Message saying that the session is not started instead of "Variable
'LOCATION_NAME' not set"
* Some temporary location generated for the case where there is not 'last
location used' so that `grass --exec g.gui` (or `grass --tmp-loc --exec
g.gui`) works on a fresh machine (it seems that the demolocation is not
part of the Ubuntu distribution)
* The above point and code packed into just `grass`. This comes to the
discussion about role of location at startup from different side. However,
it is pretty far from the core of this ticket which deals with GRASS GIS
running without terminal.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3295>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list