[GRASS-dev] [GRASS GIS] #3117: d.mon wx0: GtK issues

#3117: d.mon wx0: GtK issues
-------------------------+---------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Keywords: wx0, d.mon | CPU: Unspecified
Platform: Unspecified |
-------------------------+---------------------------------
I get a lot of warnings after having updated my laptop to Fedora 24:

{{{
d.mon wx0

# startup: tons of these warnings
(main.py:6274): Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion
'size >= 0' failed in GtkCheckButton
...

# window resize: tons of these warnings
(main.py:6274): Gtk-WARNING **: Allocating size to wxPizza 0x558b2ed9d9a0
without calling gtk_widget_get_preferred_width/height(). How does the code
know the size to allocate?
}}}

My system:
{{{
GDAL: 2.0.2
PROJ.4: 4.9.1
GEOS: 3.4.2
SQLite: 3.11.0
Python: 2.7.12
wxPython: 3.0.2.0
Platform: Linux-4.6.3-300.fc24.x86_64-x86_64-with-fedora-24-Twenty_Four
}}}

This clutters the terminal a lot. A fix would be appreciated.

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

#3117: d.mon wx0: GtK issues
--------------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by annakrat):

I found this:
https://bugzilla.redhat.com/show_bug.cgi?id=1323598

This is probably out of our scope.

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

#3117: d.mon wx0: GtK issues
--------------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: wontfix | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------
Changes (by neteler):

* status: new => closed
* resolution: => wontfix

Comment:

Replying to [comment:1 annakrat]:
> I found this:
> https://bugzilla.redhat.com/show_bug.cgi?id=1323598
>
> This is probably out of our scope.

Ok, I have opened a new "wxGTK3" ticket with Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1364580

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

#3117: d.mon wx0: GtK issues
--------------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------
Changes (by neteler):

* status: closed => reopened
* resolution: wontfix =>

Comment:

The Fedora wxGTK3 maintainer needs to know how to run GDB on d.mon.
I checked the process table and found that eventually mapdisp/main.py is
run but I am not able to bring it up myself:

{{{
GRASS 7.3.svn (nc_spm_08_grass7):~ > python
$HOME/grass73/gui/wxpython/mapdisp/main.py
$HOME/grass73/gui/wxpython/mapdisp/main.py wx0
/home/neteler/grassdata/nc_spm_08_grass7/landsat/.tmp/oboe.localdomain/MONITORS/wx0
640 480 0

@package mapdisp.main

@brief Start Map Display as standalone application

Classes:
  - mapdisp::DMonMap
  - mapdisp::Layer
  - mapdisp::LayerList
  - mapdisp::DMonGrassInterface
  - mapdisp::DMonFrame
  - mapdisp::MapApp

Usage:
python mapdisp/main.py monitor-identifier /path/to/map/file
/path/to/command/file /path/to/env/file

GRASS 7.3.svn (nc_spm_08_grass7):~ > l
$HOME/grassdata/nc_spm_08_grass7/landsat/.tmp/oboe.localdomain/MONITORS/wx0
total 12
-rw-rw-r-- 1 neteler neteler 3571 Aug 6 09:27 render.py
-rw-rw-r-- 1 neteler neteler 0 Aug 6 09:27 cmd
-rw-rw-r-- 1 neteler neteler 5 Aug 6 09:27 pid
-rw-rw-r-- 1 neteler neteler 310 Aug 6 09:27 env
}}}

How to manually start wx0 from cmd line?

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

#3117: d.mon wx0: GtK issues
--------------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by annakrat):

This should work:
{{{
d.mon wx0
python `g.gisenv GISBASE`/gui/wxpython/mapdisp/main.py wx0 `g.gisenv
GISDBASE,LOCATION_NAME,MAPSET sep=/`/.tmp/$HOSTNAME/MONITORS/wx0 640 480 0
}}}

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

#3117: d.mon wx0: GtK issues
--------------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by neteler):

Here the answer from the Fedora packager:

See https://bugzilla.redhat.com/show_bug.cgi?id=1364580

{{{
---------- Forwarded message ----------
From: <bugzilla@redhat.com>
Date: Sep 8, 2016 1:10 AM
Subject: [Bug 1364580] wxGTK3 warnings "flooding" the terminal

--- Comment #5 from Scott Talbert ---
(In reply to markusN from comment #0)
> At startup of a wx window (graphical output): tons of these warnings
appear:
>
> (main.py:6274): Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion
'size
> >= 0' failed in GtkCheckButton

This error can be avoided by making the window wider, e.g.:
d.mon wx0 width=700

It is complaining that there isn't enough space for the checkbox.

I'm not sure yet about the wxPizza errors.
}}}

Looks like an error on our part (and the new wxGTK3 is more picky about
the size)?

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

#3117: d.mon wx0: GtK issues
--------------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by neteler):

Replying to [comment:5 neteler]:
...
> ---------- Forwarded message ----------
> --- Comment from Scott Talbert ---
...
> > (main.py:6274): Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion
'size
> > >= 0' failed in GtkCheckButton
>
> This error can be avoided by making the window wider, e.g.:
> d.mon wx0 width=700
>
> It is complaining that there isn't enough space for the checkbox.

I have set the width to 720 pixel in 7.0.svn 7.2.svn and trunk (r69485,
r69486, r69487).

Remains the wxPizza error...

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

#3117: d.mon wx0: GtK issues
--------------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by neteler):

Replying to [comment:6 neteler]:
> Remains the wxPizza error...

In the Fedora tracker I got notified that the new "wxGTK3-3.0.2-29" no
longer shows this "wxPizza" error. I'll make tests as soon as I get that
package.

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

#3117: d.mon wx0: GtK issues
--------------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.1
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by neteler):

Replying to [ticket:3117 neteler]:
> I get a lot of warnings after having updated my laptop to Fedora 24:
>
>
> {{{
> d.mon wx0
>
> # startup: tons of these warnings
> (main.py:6274): Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion
'size >= 0' failed in GtkCheckButton
> ...
> }}}

Further analysis showed that this is a GTK and not a wxGTK error which
also appears elsewhere.

It seems to be this one:

https://bugzilla.gnome.org/show_bug.cgi?id=765700

-->
https://github.com/GNOME/gtk/commit/ddcf47026dbbe58dca3b34c7bb1ec63bb50a861a

and here a workaround I found for meld:
https://bugzilla.gnome.org/attachment.cgi?id=335456&action=diff

Would a similar fix also help here (where to apply)?

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

#3117: d.mon wx0: GtK issues
--------------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.4
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by neteler):

Probably there is some hope (and it appears to be a GTK bug/non-feature:

https://bugzilla.redhat.com/show_bug.cgi?id=1411165

   --> https://bugzilla.redhat.com/show_bug.cgi?id=1488249

     --> https://bugzilla.gnome.org/show_bug.cgi?id=767136#c2

       --> 17 Mar 2018:
https://gitlab.gnome.org/GNOME/gtk/commit/eb01ba8573bec47e02c8fc4eaf10e2f7cff522dd

One day it will be released with a new GTK version :slight_smile:

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

#3117: d.mon wx0: GtK issues
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by neteler):

* version: svn-releasebranch72 => svn-trunk
* milestone: 7.2.4 => 7.8.0

Comment:

The annoying terminal "spam" problem remains...

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

#3117: d.mon wx0: GtK issues
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by veroandreo):

Both in Fedora and Ubuntu...

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

#3117: d.mon wx0: GtK issues
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by mlennert):

Replying to [comment:16 veroandreo]:
> Both in Fedora and Ubuntu...

+Debian proper.

The amount of clutter really depends on the the window size. In French
locale, I have to enlargen the Map Display, for example, for the warnings
to disappear. So, it seems that there is some issue with window sizes
apparently calibrated for a specific locale, or for specific screen
geometry.

Using a tiling windows manager makes it even worse for me as windows float
less, but are rather adapted to existing screen real estate.

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

#3117: d.mon wx0: GtK issues
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: wx0, d.mon
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by mlennert):

Replying to [comment:17 mlennert]:
> Replying to [comment:16 veroandreo]:
> > Both in Fedora and Ubuntu...
>
> +Debian proper.
>
> The amount of clutter really depends on the the window size. In French
locale, I have to enlargen the Map Display, for example, for the warnings
to disappear. So, it seems that there is some issue with window sizes
apparently calibrated for a specific locale, or for specific screen
geometry.
>
> Using a tiling windows manager makes it even worse for me as windows
float less, but are rather adapted to existing screen real estate.

This comment should actually have gone to #3348, although I think the two
are pretty much the same so could probably be merged.

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