Re: Feature request regarding --g-fatals-warnings



On 28 Jul 2000, Martin Baulig wrote:

> Tim Janik <timj@gtk.org> writes:

> > > 2.) A way to ignore the first N fatal warnings on the command
> > >     line.
> > > 
> > >     This becomes useful when a program always displays N fatal
> > >     warnings on startup which you know about and which you want
> > >     to ignore (for instance, warnings about things being
> > >     deprecated).
> > 
> > 1.2.x is a bit dump here in calling abort() on fatal log levels,
> > you can really only escape that with catching abort() and
> > skipping over that function (gdb's "return" command).
> > for 2.0 however, we do raise (SIGTRAP); there if debugging
> > is enabled (this will simply produce a core dump if not ran
> > in gdb), which allowes you to simply quit over any number
> > of fatal levels with "continue", provided you know what you are
> > doing.
> 
> Yes, that's very nice in 2.0.
> 
> > note, that in many cases, successive warnings/criticals are
> > produced due to the first one failing, so often, if you don't
> > fix the first one, you get tons of bogus successors.
> 
> Well, I'm currently debugging gnome-libs 2.0 and every time I
> start a program I get this "you are using the devel branch of GTK+"
> warning and a couple more "foo() is deprecated" ones.

that's highly annoying i admit. we had that problem earlier for the canvas,
i had to s/g_warning/g_message/ on my own there. g_warning() is really
an inappropriate log-level for that, use g_message("WARNING:") instead if
you want to shout ;)
if you provide s/g_warning/g_message/ patches for such things in gtk,
i'll accept them in a second.

> I just want to be able to run `./selector_demo --g-fatal-crititals'
> or something like this and get a core dump when something goes
> really wrong.
> 
> Even when I run the thing in gdb, I'm a bit too lazy to hit 'c'
> several times when the program starts just to get over the deprecated
> warnings.

> > because of that, and because users really shouldn't have
> > the ability to simply skip over fatal situations, i.e.
> > where you'd call g_error() since that's often used to
> > catch invariant breakage and prevent further mess-ups,
> > i'll not introduce something like
> > --g-ignore-n-universe-screwups=13
> > and of course strongly discourage developers to do so
> > for gnome-libs or applications.
> 
> Also with stable versions of the libraries, you sometimes get warnings
> about the use deprecated functions.
> 
> This is extermely annoying if you want to debug something totally
> different than that deprecated function.
> 
> As soon as you get one such warning, --g-fatal-warnings is totally
> useless for you.

right, so the "shout this at the developer!" really has to be g_message(),
and not "break the devlopers knees!" with g_warning() ;)

---
ciaoTJ





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