Re: deliberate crashes in Gnome libraries ?



On Sun, 2007-01-21 at 16:38 +1100, Rod Butcher wrote:
[...]
> To me "debug mode" means the ability to step through the standard code 
> as it executes, nothing about changing the way errors are handled. A 
> program should run the exact same code in debug as in normal mode, 
> including error handling. For a module to pre-empt or second-guess 
> potential errors is mission-creep - it is sanity checking, not 
> debugging, and should only be performed in a testing environment, not on 
> released apps.
> We get the situation where naughtily-coded released apps (in this case a 
> Boinc gui manager) do naughty things and continue to get away with it 
> because distros like Mandriva apparently turn debug off in their glib 
> and gtk builds. But when we run these apps in a debug gnome environment 
> they crash. When the purpose of the debug gnome environment is to test 
> and debug Gnome itself, i.e. all the Gnome components I've built with 
> debugging on, rather than the apps I'm running like Boinc, I end up with 
> the apps themselves being crashed by the gnome modules - tail wagging dog.
> Seems what is needed is something like "strict mode' which is something 
> different to "debug mode".
> 
> I found this strange section on the developer.gnome website for glib & 
> gtk :-
> --enable-debug.  Turns on various amounts of debugging support. Setting 
> this to 'no' disables g_assert(), g_return_if_fail(), 
> g_return_val_if_fail() and all cast checks between different object 
> types. Setting it to 'minimum' disables only cast checks. Setting it to 
> 'yes' enables runtime debugging. The default is 'minimum'. Note that 
> 'no' is fast, but dangerous as it tends to destabilize even mostly 
> bug-free software by changing the effect of many bugs from simple 
> warnings into fatal crashes. Thus --enable-debug=no should not  be used 
> for stable releases of GLib.
> 
> What if lots of stuff won't run unless debug=no ? Then what's the use of 
> debug ?
> 
> Or have I missed the point here ?

I think its safe to say that it is what it is, gtk+ provides an nice
api for multiple purposes and levels of debugging and tracing your
app, sometimes software with critical errors seep out of the woodworks
somehow, maybe the errors were ignored or not considered harmfull,
then others go compiling "strict" and get crashes from sloppy code 
segments (or code that was in need of love) you summed it up pretty
well.

So whats the problem ? how can we improve the situation ?

Maybe its best to just address this at the distro-level, bleeding
edge distros may have crashes, strict distros might run fast on
hand held devices and have a slimmer variety of apps that pass
the test.

Cheers,
                -Tristan





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