Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2003:
[Freeciv-Dev] Re: (PR#4107) Client crash on start.
Home

[Freeciv-Dev] Re: (PR#4107) Client crash on start.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ChrisK@xxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4107) Client crash on start.
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Fri, 2 May 2003 09:34:23 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Fri, May 02, 2003 at 08:55:07AM -0700, Per I. Mathisen wrote:
> 
> On Thu, 1 May 2003, Gregory Berkolaiko wrote:
> > Believe it or not, the cause of this bug is the resent change to AI
> > government evaluation.
> ...
> > #0 send_unit_info (dest=0x813608c, punit=0x82e52e8) at unittools.c:2005
> > #10x080970a2 in city_support (pcity=0x833e668) at city.c:2070
> > #20x08097113 in generic_city_refresh (pcity=0x833e668,
> >   refresh_trade_route_cities=true) at city.c:2091
> > #30x080bc9ee in ai_best_government (pplayer=0x813608c) at aihand.c:360
> > #40x080bb955 in ai_data_turn_init (pplayer=0x813608c) at aidata.c:256
> ...
> > I think the best solution is to remove (or at least move) the
> > assess_danger_player from srv_loop. The comment says it will confuse the
> > AI, but I don't see why, as it will not _do_ anything, just do some
> > advisory stuff.
> 
> Right. This is the simplest solution. I couldn't find any problems with
> it, so I'll commit that so that cvs will be fine.
> 
> However, there are more problems here. What happened above shouldn't be a
> problem, but it is because generic_city_refresh() sends packets.
> 
> Why is a function (or set of functions) in common/ when they send packets
> to the client? These should either be generalised or moved to server/. 

> One way to generalising them, and presumably save some network
> traffic, would be to instead mark units as "dirty" when they need
> updating on the client, and then actually only do the
> send_unit_infos later.

I would rather add a new parameter "bool send_packets" for
generic_city_refresh.

        Raimar
-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "On the eigth day, God started debugging"




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