[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] GTK diagnostics
From: |
Greg Chicares |
Subject: |
Re: [lmi] GTK diagnostics |
Date: |
Sat, 7 May 2022 16:28:35 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
On 5/7/22 14:28, Vadim Zeitlin wrote:
> 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> 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 [...details snipped...]
Thanks. I've tested that, and confirmed that it prevents those two
"Debug" messages.
> 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?
I'm sure it's somewhere in the mailing-list history, but I'm not
inclined to spend any time looking for it. No end user has asked
a single question about it in over twenty years AFAIK, so it must
be perfect.
> 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)
No, not that...
> or about
> GtkSpinButton?
I saw seventy-one repeats of the GtkSpinButton diagnostic. In my
test of the XRC change above, it only occurred thirty times. I'd
speculate that it occurs once for each time a spin button is drawn.
> 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?
I guess it's better to pipe into 'less'. That way, I can look through
the diagnostics to see whether any others arise; and I can easily
enough pipe through an appropriate 'sed' command to filter out these
specific diagnostics.
GTKSuppressDiagnostics() seems too brutal: AIUI, it would inhibit any
new and interesting diagnostics that we'd really want to be aware of.
> 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.
Good, thanks.
> To summarize, I'd like to ask you several questions:
>
> 1. Could we replace lmi "Window" menu with the standard wx one?
If we touch it in any way, we may introduce a defect. I see no
upside, only downside.
> 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.
Thanks, but I've done it already.
> 3. Are you find with using GTKSuppressDiagnostics()
No, I'd much rather not turn off all GTK diagnostics.
> or would you
> prefer me to debug and hopefully fix individual GTK diagnostics?
Yes, thanks.