forumer at smartmobili.com
Fri Apr 24 12:49:31 PDT 2009
>----- Original Message ----
>From: Donny Viszneki <donny.viszneki at gmail.com>
>Subject: Re: [SDL] "Text has zero width" isn't an error.
>On Wed, Apr 8, 2009 at 3:03 PM, Mason Wheeler <masonwheeler at yahoo.com> wrote:
>> Not at all. By my definition, a well-designed library should make
>> errors easy to find and fix. A segfault that crashes the program and
>> (maybe) leaves you with a core dump is hardly an easy fix case.
>This is the *easiest* case to be fixed!
OK, now I'm curious. What sort of tools are you using, that you think
a core dump is an easy case to fix? To me, "easy fix" means the
1. An exception is raised. (Even for NPDs. Delphi, unlike C++,
catches runtime errors and translates them into exceptions.)
2. The debugger catches it and breaks to debug view, showing
the function that's currently running in the editor, (with the current
line highlighted,) plus a full stack trace, a list of the current state
of all local variables, and the class type and error message text
of the exception object.
3. Most of the time it's immediately obvious from the context what
the problem is, in which case you fix it and recompile. If not, you
can use the stack trace, the variable inspector, and a few other
tools to figure out where the bad data that's causing trouble came
from. Then you fix it and recompile.
How is digging around in a core dump easy?
More information about the SDL