Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2006:
[Freeciv-Dev] (PR#16498) server crash while joining in pregame
Home

[Freeciv-Dev] (PR#16498) server crash while joining in pregame

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#16498) server crash while joining in pregame
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Apr 2006 14:23:57 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=16498 >

1.  Launch a client, click "start new game".  Keep it in pregame.
2.  Crash the client (killall -SEGV civclient).  The server will
auto-save and exit.
3.  Restart a client, click "load game", choose your 4000BC savegame.
4.  Pick your player.
6.  Start a second client and connect to the server with a new username.

There are two bugs here.

In step 4, when you connect the conn dialog is drawn incorrectly.  I see
players 0 and 5 (aifill was 5 of course) both as being my username.  I
think when you connect again a new player is created and the old one is
lost...but updated player info is not sent.

In step 6, when the second client connects the server crashes.

#0  0x0811fa00 in get_invention (pplayer=0x82a93e4, tech=66) at tech.c:72
#1  0x0811e736 in is_tech_in_range (target_player=0x82a93e4,
    range=REQ_RANGE_PLAYER, tech=66) at requirements.c:629
#2  0x0811eafe in is_req_active (target_player=0x82a93e4, target_city=0x0,
    target_building=0x0, target_tile=0x0, target_unittype=0x0,
    target_output=0x0, target_specialist=0x0, req=0x844f238)
    at requirements.c:806
#3  0x0811edf9 in are_reqs_active (target_player=0x82a93e4, target_city=0x0,
    target_building=0x0, target_tile=0x0, target_unittype=0x0,
    target_output=0x0, target_specialist=0x0, reqs=0x844eabc)
    at requirements.c:898
#4  0x080c1937 in get_player_city_style (plr=0x82a93e4) at city.c:1096
#5  0x080880d3 in package_player_common (plr=0x82a93e4, packet=0xafe364bc)
    at plrhand.c:864
#6  0x08087eb8 in send_player_info_c (src=0x0, dest=0x84e65e0) at
plrhand.c:817
#7  0x0807903d in establish_new_connection (pconn=0x81baee8)
    at connecthand.c:177
#8  0x0807960d in handle_login_request (pconn=0x81baee8, req=0x84edf38)
    at connecthand.c:279
#9  0x080556b3 in handle_packet_input (pconn=0x81baee8, packet=0x84edf38,
    type=4) at srv_main.c:1030
#10 0x08051b42 in handle_incoming_client_packets (pconn=0x81baee8)
    at sernet.c:389

(gdb) p pplayer->team
$3 = (struct team *) 0x0
$3 = (struct team *) 0x0
(gdb) p pplayer->player_no
$4 = 0
(gdb) p pplayer->name
$5 = "noname", '\0' <repeats 25 times>

So the bug is the player is not assigned a team.  I guess this could be
a bug in the save/reload process in pregame?

This is from the development version but likely affects 2.1 as well.

-jason




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#16498) server crash while joining in pregame, Jason Short <=