Re: Think I found another bug in gtk.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 23 Aug 2004, muppet wrote:

using a $SIG{__WARN__} handler that ignores warnings will suppress the
messages, yes, but it's a very bad idea.  the presence of these assertions
means there is a bug, and just making the messages go away doesn't make the
bug go away ;-).  we route the glib log messages through warn() so that the
message will pick up the nearest perl line number, since you often wind up
triggering them with bad perl code; the fact that you can suppress them is a
"side effect".

Well, or redirect them.

I'm using a $SIG{__WARN__} handler that opens a MessageDialog to display
warning messages, a handy tool, especially for users who may not always
want to read .xsession-errors every day. However, near the beginning, it
has:
  die $message if ( $message =~ /Gtk-CRITICAL/ );
as a safety valve (since most Gtk-CRITICAL errors are caused by me making
a fairly serious mistake). The result, of course, when this bug cropped
up, was that every time I opened a FileChooserDialog, the program
mysteriously exited.

Baffled me for a little while. I began to wonder if I'd been sleepwalking
and coding at the same time. :)

So I had to install a workaround inside the handler, to prevent exits.
- -- 
GnuPG public key available from
http://homepage.mac.com/danflemming/gnupg_key.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBKgg1ER493M5r4PIRAhXRAJ9nnKhgcacI46aDPtTb0Pn+NqNPYACfQxKd
Bks/SLmfGWWa92PNtr4eejw=
=BhAA
-----END PGP SIGNATURE-----



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