[Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
Freeciv Developers <freeciv-dev@xxxxxxxxxxx> |
Subject: |
[Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert) |
From: |
"Per I. Mathisen" <per@xxxxxxxxxxx> |
Date: |
Sun, 15 Sep 2002 11:08:54 +0000 (GMT) |
On Fri, 13 Sep 2002, Raimar Falke wrote:
> Just to confirm that I understand you correctly: you want to replace
> the 673 asserts we have now with something which dumps a
> core/backtrace (this is easy) AND continue normal afterwards (this is
> hard)?
No.
> Note that it is also hard to save a game if an assert condition was
> triggerd. You just don't know what went wrong. And saving a game
> requires some non-small number of functions.
Correct.
The new call shouldn't replace all instances of assert, just do so in
cases where we believe that we can safely recover the error, like in
void bad_function(struct unit *punit)
{
if (error(punit == NULL || punit->id == 0)) {
return;
}
/* do stuff */
return;
}
> The OS can do the job of preserving the state quite good. This was the
> reason why core files were implemented.
Reading core files from another computer / another platform is quite hard,
AFAIK. Backtraces help a lot.
Yours
Per
"I don't see why people are so upset about cloning sheep. American
television networks have been doing that to their audiences for years." --
Jello Biafra
- [Freeciv-Dev] Re: concerning the use of assert, (continued)
- [Freeciv-Dev] Re: concerning the use of assert, Raimar Falke, 2002/09/06
- [Freeciv-Dev] Re: concerning the use of assert, Per I. Mathisen, 2002/09/08
- [Freeciv-Dev] Re: concerning the use of assert, Raimar Falke, 2002/09/09
- [Freeciv-Dev] Re: concerning the use of assert, Per I. Mathisen, 2002/09/09
- [Freeciv-Dev] autobacktrace (was: concerning the use of assert), Reinier Post, 2002/09/10
- [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert), Ross W. Wetmore, 2002/09/13
- [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert), Reinier Post, 2002/09/13
- [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert), Per I. Mathisen, 2002/09/13
- [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert), Jason Short, 2002/09/13
- [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert), Raimar Falke, 2002/09/13
- [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert),
Per I. Mathisen <=
- [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert), Per I. Mathisen, 2002/09/15
- [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert), Reinier Post, 2002/09/16
- [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert), Reinier Post, 2002/09/16
- [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert), Ross W. Wetmore, 2002/09/22
|
|