lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] GTK diagnostics


From: Vadim Zeitlin
Subject: Re: [lmi] GTK diagnostics
Date: Sat, 7 May 2022 16:28:31 +0200

On Sat, 7 May 2022 08:55:50 +0000 Greg Chicares <gchicares@sbcglobal.net> wrote:

GC> Lots of GTK diagnostics appear if I run lmi's GUI for pc-linux-gnu
GC> in a fairly up-to-date 'bookworm' chroot...
GC> 
GC> lmipath=/opt/lmi/gcc_x86_64-pc-linux-gnu/build/ship; 
LD_LIBRARY_PATH=$lmipath:/opt/lmi/local/gcc_x86_64-pc-linux-gnu/lib/ 
$lmipath/lmi_wx_shared --ash_nazg --data_path=/opt/lmi/data 2>&1 |less
GC> 
GC> ...and do some useful work, like loading an input file and running it.
GC> I copy them below in case they're useful. Perhaps they're not: I've
GC> been seeing them for years, and I see similar diagnostics with 'meld'.
GC> 
GC> 08:40:19: Debug: "Ctrl+Tab" is not supported as a keyboard accelerator with 
GTK
GC> 08:40:19: Debug: "Ctrl+Shift+Tab" is not supported as a keyboard 
accelerator with GTK

 These come from wxGTK and were added relatively recently (wx 3.1.3)
because we thought it would be useful to know about the accelerators that
don't work because GTK explicitly forbids such keys from being used as
accelerators.

 Of course, the intention was that after seeing these messages, the
accelerators would be changed to avoid them, so I think it would be better
to do it in lmi rather than seeing these intentionally annoying messages
all the time. The simplest would be to just use platform="msw" for the menu
item with the accelerators using Tab and platform="unix | mac" (it would be
actually nice to be able to say platform="!msw", and it would be easy to
add to wx, but it's not supported just yet) for the same items without
these accelerators.

 But beyond this I wonder why does lmi use its own "Window" menu at all
instead of relying on the standard one managed by wxWidgets? I'm almost
sure that we must have already discussed this, but I don't remember the
answer. Was it to work around some wxWidgets bug or was there some deeper
reason for this?


GC> [...this appears 71 times in succession...]

 Just to be sure, do you see 71 messages about the accelerators (which
would be surprising and possibly need to be investigated) or about
GtkSpinButton?

GC> (lmi_wx_shared:3263143): Gtk-CRITICAL **: 08:40:26.405: 
gtk_box_gadget_distribute: assertion 
GC> 'size >= 0' failed in GtkSpinButton

 This one is harmless, but definitely annoying. It happens because the
windows are created with a rather small default size in wx and spin buttons
in GTK are so big that they don't fit this size, so they always complain
about not being big enough at first, even though they're resized to their
correct size later.

 In recent (i.e. more recent than the one currently used by lmi) versions
of wx there is wxApp::GTKSuppressDiagnostics() which can be used to
suppress this and all the other GTK messages entirely, but it's a bit of a
blunt instrument, so I'm not sure if we want to use it. OTOH I do find such
messages annoying myself and if there are 71 of them, they must be even
more so. Should I try to look at some way of avoiding just these messages,
or do you think GTKSuppressDiagnostics() would be good enough?

GC> (lmi_wx_shared:3263143): Gtk-WARNING **: 08:40:36.299: Drawing a gadget 
with negative dimensions. Did you forget to allocate a size? (node tab owner 
GtkNotebook)
GC> 
GC> (lmi_wx_shared:3263143): Gtk-CRITICAL **: 08:40:36.317: gtk_widget_event: 
assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
GC> 
GC> (lmi_wx_shared:3263143): Gtk-CRITICAL **: 08:40:36.318: 
gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
GC> 
GC> (lmi_wx_shared:3263143): Gtk-CRITICAL **: 08:40:36.445: gtk_widget_event: 
assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed

 Those ones are suspicious, we shouldn't be using non-realized widgets and
I'd like to debug this to see what's really going on here. Of course,
again, if you decide to use GTKSuppressDiagnostics() anyhow, it's probably
not very useful to do it.


 To summarize, I'd like to ask you several questions:

1. Could we replace lmi "Window" menu with the standard wx one?
2. If not, should I make a patch using platform="win" avoiding the
   warnings under GTK? And, if yes, would you like it now or can it
   wait until the wx upgrade, as I'd like to add support for "!msw"
   too then.
3. Are you find with using GTKSuppressDiagnostics() or would you
   prefer me to debug and hopefully fix individual GTK diagnostics?

 Thanks!
VZ

Attachment: pgpRWdYcEVFx8.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]