-----Original Message----- From: lib2geom-devel-bounces@lists.sourceforge.net [mailto:lib2geom-devel-bounces@lists.sourceforge.net] On Behalf Of bulia byak Sent: vrijdag 27 juni 2008 18:26 To: MenTaLguY Cc: Jon A. Cruz; lib2geom-devel@lists.sourceforge.net; inkscape-devel@lists.sourceforge.net Subject: Re: [Lib2geom-devel] [Inkscape-devel] Crash in 2geom ellipse parsing
On Fri, Jun 27, 2008 at 2:24 AM, MenTaLguY <mental@...3...> wrote:
Without assertions, invariant failures still tend to
eventually result
in crashes, *especially* in C/C++. Removing assertions would certainly help to obscure the cause of a crash, but crashes
would not
be entirely prevented, only rendered less predictable (and
therefore
less likely to be caught by our sketchy developer-testing).
With the assert-crashes, on the other hand, right now I am forced to go back to an old build in order to complete a design project, because these constant crashes are really driving me nuts. Now whose win is that?
I am sorry for disturbing your project :-(
You can print a megabyte of debug dump. You can beep. You can flash. You can draw a big green monster on my screen. Just please, PLEASE don't crash, OK? Is it too much to ask for?
Let's try and group 2geoms exceptions like is done in exception.h: rangeerror and logicalerror. Range error = user mistake (Inkscape's code fault), logicalerror = 2geom's fault. There are some difficult cases, but at least it gives us some guideline. Then, when something goes wrong, we can catch only RangeErrors and handle it gracefully, and catch LogicalErrors with a popup dialog:
... happened ... bla bla...
< continue > < emergency save and exit >
Does that sound reasonable?
Cheers, Johan