Opened 5 years ago

Closed 5 years ago

#3897 closed defect (fixed)

d.mon errors when closing

Reported by: veroandreo Owned by: grass-dev@…
Priority: normal Milestone: 7.8.0
Component: Display Version: git-releasebranch78
Keywords: d.mon Cc:
CPU: Unspecified Platform: Unspecified

Description

When I close the wx monitor after displaying a raster and trying to display a raster legend, or only after displaying a raster or vector map, I get:

wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ../src/common/wincmn.cpp(477) in ~wxWindowBase(): any pushed event handlers must have been removed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/veroandreo/software/grass78_git/dist.x86_64-pc-linux-gnu/gui/wxpython/mapdisp/main.py", line 565, in OnExit
    for f in six.itervalues(monFile):
  File "/usr/lib/python3.7/site-packages/six.py", line 584, in itervalues
    return iter(d.values(**kw))
SystemError: <built-in method values of dict object at 0x7f730b192a00> returned a result with an error set

System info

GRASS version: 7.8.dev                                                          
Code revision: 223821e28                                                        
Build date: 2019-08-31                                                          
Build platform: x86_64-pc-linux-gnu                                             
GDAL: 2.3.2                                                                     
PROJ.4: 5.2.0                                                                   
GEOS: 3.7.1                                                                     
SQLite: 3.26.0                                                                  
Python: 3.7.4                                                                   
wxPython: 4.0.4                                                                 
Platform: Linux-5.2.8-200.fc30.x86_64-x86_64-with-fedora-30-Thirty  

Change History (6)

comment:1 by annakrat, 5 years ago

Should be fixed in master. Please test, needs backport.

comment:2 by neteler, 5 years ago

Yes, GH 383650806c3505fb677cc2d5474cd1325ac17cc9 solved it.

Still I see this bug when entering a wrong map name (just happened when testing, here I just a fun name):

GRASS 7.9.dev (nc_spm_08):~/software/grass_master > d.rast blabla
ERROR: Raster map <blabla> not found
Traceback (most recent call last):
  File "/home/mneteler/grassdata/nc_spm_08/landsat/.tmp/oboe/MONITORS/wx0/render.py", line 41, in render
    grass.run_command(cmd[0], env=env, **cmd[1])
  File "/home/mneteler/software/grass_master/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 441, in run_command
    return handle_errors(returncode, returncode, args, kwargs)
  File "/home/mneteler/software/grass_master/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 343, in handle_errors
    returncode=returncode)
grass.exceptions.CalledModuleError: Module run None d.rast map=blabla bgcolor=white ended with error
Process ended with non-zero return code 1. See errors in the (error) output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mneteler/grassdata/nc_spm_08/landsat/.tmp/oboe/MONITORS/wx0/render.py", line 141, in <module>
    render(cmd, mapfile)
  File "/home/mneteler/grassdata/nc_spm_08/landsat/.tmp/oboe/MONITORS/wx0/render.py", line 43, in render
    grass.debug(1, "Unable to render: {0}".format(e))
  File "/home/mneteler/software/grass_master/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 628, in debug
    if debug_level() >= debug:
TypeError: '>=' not supported between instances of 'int' and 'str'

comment:3 by neteler, 5 years ago

I have backported GH 383650806c3505fb677cc2d5474cd1325ac17cc9

comment:4 by veroandreo, 5 years ago

d.mon error at closing is gone, but I get the same error reported by Markus if the map does not exist.

comment:5 by annakrat, 5 years ago

Fix is in master now.

in reply to:  5 comment:6 by neteler, 5 years ago

Resolution: fixed
Status: newclosed

Replying to annakrat:

Fix is in master now.

Your fixes solve the remaining issue. I have backported it, works fine now in 7.8 (so it is for 7.8.1 then).

Thanks! & closing.

Note: See TracTickets for help on using tickets.