Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] Re: (PR#4331) Bug in cm.c
Home

[Freeciv-Dev] Re: (PR#4331) Bug in cm.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4331) Bug in cm.c
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Fri, 6 Jun 2003 11:06:45 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Sat, May 31, 2003 at 05:12:35AM -0700, Per I. Mathisen wrote:
> 
> On Fri, 30 May 2003, Per I. Mathisen wrote:
> > I am trying to add support for CM in server now, and I'm getting
> > buggered by a hard to find bug in cm.c. Raimar, please help out.
> 
> To make it easier to duplicate, I've attached a savegame to do so. Take
> over 'a' and find transport at (72,2), then make a city with its engineer
> at (70,1). This always cores the server.
> 
> Also, I added some debug info into the assert place, this is what I got:
> 
> 1: Grokgak: using 1,0 (city map position)
> 2: print_city(city='Grokgak'(id=139))
> 2:   size=1, entertainers=1, scientists=0, taxmen=0
> 2:   workers at:
> 2: print_result(result=0xbfffeaf0)
> 2: print_result:  found_a_valid=1 disorder=0 happy=0
> 2: print_result: -www-
> 2: print_result: .....
> 2: print_result: .wc..
> 2: print_result: .....
> 2: print_result: -...-
> 2: print_result:  people: W/E/S/T 1/0/0/0
> 
> This is where it goes wrong: CM attempts to place three more workers than
> we have (this is a new size 1 city) outside the map. It looks like
> city_map_iterate does not have any problems iterating over non-existent
> tiles. This is bad.

With cm3.diff and this savegame I this core dump:

civserver: timing.c:241: start_timer: Assertion `t != ((void *)0)' failed.

With some extra debug output I get:
$ ./ser -f civgame+1360.sav.gz 
srv_init
cm_init
This is the server for Freeciv version 1.14.1-devel
You can learn a lot about Freeciv at http://www.freeciv.org/
Loading saved game: civgame+1360.sav.gz...
cm_free
server_game_free
2: Loading rulesets
2: Now accepting new client connections.

For introductory help, type 'help'.
> st
Starting game.
> 
Player 'a' now has AI skill level 'hard'.
Player 'b' now has AI skill level 'hard'.
civserver: timing.c:241: start_timer: Assertion `t != ((void *)0)' failed.

So CM is used after cm_free got called. Bad.

With cm4.diff I have problems taking "a".

I take
  take hawk a
  ai a
  ai b
  list
and get:
List of players:
------------------------------------------------------------------------------
a (user hawk, AI, difficulty level hard, nation Latvians) 1 connection:
  hawk from localhost.localdomain (command access level ctrl), bufsize=40kb
b (user Unassigned, Human, nation Swedes)
------------------------------------------------------------------------------

If I than start the game it just runs. Without waiting for my
turn-done. Weird.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "brand memory are for windows users that think their stability
   problems come from the memory"
    -- bomek in #freeciv




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