lmi
[Top][All Lists]
Advanced

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

Re: [lmi] GTK warnings


From: Vadim Zeitlin
Subject: Re: [lmi] GTK warnings
Date: Fri, 1 Jul 2022 19:32:37 +0200

On Fri, 1 Jul 2022 16:00:30 +0000 Greg Chicares <gchicares@sbcglobal.net> wrote:

GC> On 7/1/22 15:16, Vadim Zeitlin wrote:
GC> > On Thu, 30 Jun 2022 19:47:11 +0000 Greg Chicares 
<gchicares@sbcglobal.net> wrote:
GC> [...]
GC> > GC> (lmi_wx_shared:79710): Gtk-WARNING **: 19:32:24.395: Drawing a gadget 
with negative dimensions. Did you forget to allocate a size? (node tab owner 
GtkNotebook)
GC> > 
GC> >  I don't see this one, using GTK 3.24.34. Could you please tell me what do
GC> > I need to do to see it?
GC> 
GC> To reproduce:
GC>   File | New | Illustration
GC>   OK
GC> That gives me ten instances of the warning quoted above,

 I'm really sorry, I do see it now. I was somehow sure that I had tried
this, but apparently not.

 Anyhow, now that I see them, I also see that they happen when
status_alert() is called, i.e. from wxStatusBar::SetStatusText(). But the
problem is that the status bar itself has a perfectly fine size (1185*22 in
my case) and it's when drawing GtkNotebook that we have this problem. So
there really seems to be something wrong with resizing the notebook used by
wxMDIParentFrame in wxGTK and I'll try to find out what it is and fix it if
possible (FWIW I did already fix the remaining gtk_notebook_get_tab_labe
assertion when closing a wxMDIChildFrame).

GC> I have the impression that GTK might be sending messages to someplace
GC> like /dev/tty .

 Strange, I don't see this here, i.e. if I do

        % ./lmi_wx 2>err.log

I see Gtk-CRITICIAL and other messages in the err.log file.

 And I also don't see anything that could explain such behaviour in
g_log_writer_standard_streams(), which is the function that ends up being
called to do the actual logging nor in g_log_writer_default() which decides
which function to call. The only possibility to do something other than
simply outputting the message to stderr (or stdout, depending on the
message severity and whether g_log_writer_default_set_use_stderr() was
called) is to log the message to systemd journal, but this should only
happen when running the process from systemd unit file.


GC> My conclusion is that these GTK messages might be useful if they
GC> indicate actual problems in code I write, to the extent that it's
GC> possible to fix them; but otherwise, GTK is just defectively noisy.

 I completely agree, but its noisiness can sometimes become annoying enough
to really want to do something about it. The ability to totally suppress
these messages has been requested quite a few times on wx mailing list,
which is why wxApp::GTKSuppressDiagnostics() was finally added in 3.2.

 Regards,
VZ

Attachment: pgpVYnNnlIJ1M.pgp
Description: PGP signature


reply via email to

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