Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] Re: (PR#10567) pubserver crash: ai-controlled unit has no
Home

[Freeciv-Dev] Re: (PR#10567) pubserver crash: ai-controlled unit has no

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10567) pubserver crash: ai-controlled unit has no goto destination
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sat, 16 Oct 2004 14:55:58 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10567 >

On Sat, 16 Oct 2004, Jason Short wrote:
> The role is ATTACK or DEFEND_HOME, but there is no goto destination set.
> So there's a crash.
>
> Does this mean the unit has arrived?For instance with DEFEND_HOME once
> we get there isn't the goto_dest cleared?In this case should we be
> looking at the current tile?Or should we not have cleared the goto
> dest?Or is a special case needed for DEFEND_HOME?
>
> This patch avoids the crash but may still be buggy.If the goto dest is
> null it's treated as the success case.However this may mean a unit can
> get locked into this role.I dunno.

I think we should replace the assert with an informative
freelog(LOG_ERROR, ...) instead. When we see enough of those, we may begin
to see a pattern, and figure out the problem. Assert in this case does not
help much, since the bug must have occured much earlier.

By the way, I think the same should be done about all the sanitycheck
asserts. They are useless for anyone other than patch writers to sanity
check their own changes. Everyone else is better off with freelogs.

  - Per




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