Re: Some example code for a new crash handler



On Fri, 2002-01-11 at 23:18, Havoc Pennington wrote:
> 
> Hongl Lai <hongli telekabel nl> writes:
> > It is a workaround, to give the user time to save the document.
> 
> Sure, but it's a workaround that works unreliably, and may cause
> dangerous side effects. You're running a corrupted program; not a good
> idea.
> 
> Havoc

Most people don't write mission-critical programs using gnome-libs, so I
can't imagine that being such a big problem.
And most of the crashes I encounter are caused by passing invalid memory
addresses to function (i.e. strlen (NULL) or gtk_widget_show (100) and
such) or free already free'ed memory.
I played with several ways to cause segfaults and I have yet to discover
a way to *seriously* corrupt the program's memory so that the program
can't even save anymore.
Most GNOME programs are desktop programs, not something extremely
serious, so if the program becomes buggy after a crash then let it crash
again (and exit).

So I really can't see the point in denying the user a chance to try to
save, even if the program will be buggy.

BTW, if there's really no way to really fix the programs memory, then
how do tools such as Norton CrashGuard work?
And how do program wirtten in Delphi manage to protect their own memory?
(Delphi programs always show an error dialog when you try to overwrite
memory/devide by zero/free nonexisting memory/etc. but the program never
crash)





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