Re: Making GNOME crash



Seg, 2005-11-07 às 17:39 +0100, Christian Fredrik Kalager Schaller
escreveu:
> On Mon, 2005-11-07 at 15:17 +0000, Gustavo J. A. M. Carneiro wrote:
> > Seg, 2005-11-07 às 01:36 -0500, Matthias Clasen escreveu:
> > > On Sun, 2005-11-06 at 17:39 +0100, Vincent Untz wrote:
> > > > Hey,
> > > > 
> > > > The next releases of glib (HEAD and glib-2-8) will support a new debug
> > > > flag for the G_DEBUG environment variable: fatal_criticals. This make
> > > > the program crash on critical warnings.
> > > > 
> > > > I propose to use this nice feature during the development cycles to help
> > > > eradicate all these critical warnings. I made a simple patch for
> > > > gnome-session:
> > > > 	http://www.gnome.org/~vuntz/tmp/gnome-session.diff
> > > > 
> > > > Why? Well, we currently have critical warnings in a lot of modules. And
> > > > we don't care since we don't notice them. With this, we could easily
> > > > notice them and have nice stack traces to fix them. This should result
> > > > in less bugs.
> > > > 
> > > > Does it make the desktop unusable? Well, the wncklet-applet crashes [1],
> > > > it seems bug-buddy crashes on Fedora [2] and, err, I can't use
> > > > evolution ;-) More crashes are expected, but I think the sooner we fix
> > > > the critical warnings, the better.
> > > > 
> > > > What do you think?
> > > > 
> > > > [1] http://bugzilla.gnome.org/show_bug.cgi?id=149326 with a patch
> > > > [2] http://bugzilla.gnome.org/show_bug.cgi?id=320062
> > > > 
> > > > Vincent
> > > > 
> > > 
> > > I'm not convinced that making HEAD unusable for everybody by enforcing
> > > this in gnome-session is the way forward. For one thing, it will
> > > drastically reduce the amount of testing that HEAD gets. I think making
> > > this the focus of a Gnome love day can have the same results without
> > > affecting the testability of HEAD for everybody else.
> > 
> >   I completely agree.  This reminds me of some modules in the past
> > having hardcoded -Werror in CFLAGS.  Some people just want to compile
> > and run GNOME, not be forced into fixing every module in the way.
> > 
> Actually GStreamer do this, include -Werror, and it is in my opinion
> something which has worked out very well for us. Yes, it was a bit
> painful to get it working to begin with and it was a bit painful
> when gcc4 came out, but in general it means that we keep our code
> warning free, which I think has kept a lot of bugs from creeping in
> which would otherwise have been drowned in a sea of 'harmless' warnings.

  Oh, this is all fine for _GStreamer_, but bad for _GNOME_, because
this sends away potencial GNOME contributors since it's simply too
difficult to build it.  Sorry to be so blunt, but I think it was selfish
of the GStreamer project to have -Werror in the makefiles.

> 
> It isn't painful today as we catch new compile warnings right away, so
> fixing those isn't more painful than making sure your code follows
> module conventions and is acceptable in general.
> 
> I don't know how this crash thing would turn out/work, but if it means
> we will have 3-4 painful weeks and after that have a GNOME with a lot of
> crasher bugs fixed then I am all for it. Cause after that new crashers
> will be caught as they are introduced which probably also is the time
> when its easy to fix them. (probably me being to naive though)

  This could also mean that developers start thinking twice before
adding a g_warning, and start using g_message instead, thus defeating is
purpose.  g_warning is for reporting real problems, but no critical
ones; for critical problems we have g_error.

  It's so easy to turn on abort on warnings, just run your program with:
	$ G_DEBUG=all ./myprogram
or even:
	$ ./myprogram --g-fatal-warnings

  Only lazy developers let g_warnings go on indefinitely.  We need to
educate developers, that's all.

-- 
Gustavo J. A. M. Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>
The universe is always one step beyond logic.




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