Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2000:
[Freeciv-Dev] Re: segmentation fault
Home

[Freeciv-Dev] Re: segmentation fault

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: segmentation fault
From: Corin Anderson <corin@xxxxxxxxxx>
Date: Thu, 3 Feb 2000 14:10:31 -0800 (PST)

On Thu, 3 Feb 2000, Jeff Mallatt wrote:

> Hum.  I just noticed that init_worklist() only initializes the first
> element of the worklist array to WORKLIST_END.  Shouldn't it initialize
> *all* elements of the worklist array to WORKLIST_END?

Theoretically, only the first entry _needs_ to be initialized.  All other
worklist operations should operate between element 0 and the element whose
value is WORKLIST_END.  We could init all entries to WORKLIST_END, but I
suspect that doing so would mask the real culprit to this bug.

I'll take a look at the save file and code, too, later today.  In the
meantime, here's a thought:  are any of the cities whose worklists are
corrupted captured from an AI?  Although I /think/ the codepath for
creating a city (and its worklist) is the same for both players and AIs, I
couldn't say so with certainty until I can glance through the code again.

Corey


[Prev in Thread] Current Thread [Next in Thread]