Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] Re: (PR#5642) [BUG] resolve_unit_stacks crashes server
Home

[Freeciv-Dev] Re: (PR#5642) [BUG] resolve_unit_stacks crashes server

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory.Berkolaiko@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#5642) [BUG] resolve_unit_stacks crashes server
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 31 Aug 2003 09:33:36 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, 31 Aug 2003, Gregory Berkolaiko wrote:
> Error message:
>
> 0: Sancho I's Howitzer (id 281) left a unit stranded in the ocean without
> a transport at position (22, 30). Capacity on old tile is -5and 5 on new
> tile, which is at position (27, 36). ransport_units is false

> The problem:
>
> resolve_unit_stacks uses teleport_unit_to_city (via bounce_unit) which in
> turn uses move_unit.It is move_unit which crashes, if the transport was
> teleported before the passenger.There are two possible solutions:
>
> * change move_unit to not do the checks, possibly depending on a bool
> argument.
>
> * change resolve_unit_stacks to process all non-transports first.

Adding an error check to move_unit() was a mistake. move_unit() should not
contain such checks. Mea culpa.

  - Per




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#5642) [BUG] resolve_unit_stacks crashes server, Per I. Mathisen <=