[GRASS-dev] [GRASS GIS] #3253: Main GUI fails to start when g.extension fails when fetching the addons

#3253: Main GUI fails to start when g.extension fails when fetching the addons
-------------------------------------------------+-------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.2.1
Component: wxGUI | Version: svn-
Keywords: toolboxes, g.extension, startup, | releasebranch72
  addons | CPU: Unspecified
Platform: Unspecified |
-------------------------------------------------+-------------------------
The GUI fails to start when `g.extension` fails during ''Addons'' toolbox
creation in `core/toolboxes.py`. GUI should continue just with an empty
''Addons'' toolbox.

After hitting OK, there is no further error or window visible. It does not
matter what if it is during GRASS start or with `g.gui` with or without
`-f`, same for 72 branch and trunk.

This is the error message in a dialog. The `g.extension` error is in the
command line which is not ideal because it should be at the same place as
the traceback.

{{{
List of addons cannot be obtained because g.extension failed.

Reason: Process ended with non-zero return code 1. See errors in the
(error) output.

Traceback (most recent call last):
   File ".../gui/wxpython/core/toolboxes.py", line 507, in _getAddons
     output = gcore.read_command('g.extension', quiet=True,
flags='qwertyuiopag')
   File ".../etc/python/grass/script/core.py", line 474, in read_command
     return handle_errors(returncode, stdout, args, kwargs)
   File ".../etc/python/grass/script/core.py", line 330, in handle_errors
     returncode=returncode)
CalledModuleError: Module run None ['g.extension', '--q', '-qwertyuiopag']
ended with error
Process ended with non-zero return code 1. See errors in the (error)
output.
}}}

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

#3253: Main GUI fails to start when g.extension fails when fetching the addons
-------------------------+-------------------------------------------------
  Reporter: wenzeslaus | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.1
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: toolboxes, g.extension, startup,
       CPU: | addons
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by wenzeslaus):

In [changeset:"70461" 70461]:
{{{
#!CommitTicketReference repository="" revision="70461"
wxGUI/toolboxes: store warning/error messages for later (see #3253)

GError and other message boxes during startup prevent
its completion unless OK is clicked quickly.
Messages are now stored and retrived later by the menu builder object.
lmgr stores them again and then shows them at the end of
init when everything is ready.

Messages (which are non-critical errors or warnings) are written as errors
to the Console output window. Console may flash during startup
but then Layers tab is shown anyway which seems like okay behavior
(careful user sees something happen but can ignore it).

Details of the exception are included into the message.
}}}

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