Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2005:
[Freeciv-Dev] (PR#14514) segmentation fault when using /rulesetdir from
Home

[Freeciv-Dev] (PR#14514) segmentation fault when using /rulesetdir from

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#14514) segmentation fault when using /rulesetdir from client
From: "Curtis" <cwarren89@xxxxxxxxx>
Date: Mon, 31 Oct 2005 17:27:52 -0800
Reply-to: bugs@xxxxxxxxxxx

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

When sending the the command '/rulsetdir [whatever]' from the server 
segmentation faults due to a bad pointer. The following is the gdb 
session of the server during said events. As I do not know much about 
this particular area of code, I will leave the fix to someone else.

(gdb) run
Starting program: /home/bytecoder/Storage/src/freeciv/server/civserver
This is the server for Freeciv version 2.0.99-devel
You can learn a lot about Freeciv at http://www.freeciv.org/
2: Loading rulesets
2: Now accepting new client connections.

For introductory help, type 'help'.
 >
2: Connection request from bytecoder from localhost
2: c1 has client version 2.0.99-devel
2: bytecoder has connected from localhost.
 >
bytecoder: '/rulesetdir custom'
2: Loading rulesets

Program received signal SIGSEGV, Segmentation fault.
0x080a2bce in get_player_city_style (plr=0x8268dc8) at city.c:1117
1117      while ((replace = city_styles[prev].replaced_by) != -1) {
(gdb) bt
#0  0x080a2bce in get_player_city_style (plr=0x8268dc8) at city.c:1117
#1  0x0807981e in package_player_common (plr=0x8268dc8, packet=0xbffb5de0)
    at plrhand.c:892
#2  0x080796e0 in send_player_info_c (src=0x0, dest=0x8387fd0) at 
plrhand.c:846
#3  0x08083b3f in reset_player_nations () at ruleset.c:3067
#4  0x08083ba2 in load_rulesets () at ruleset.c:3083
#5  0x08058560 in set_rulesetdir (caller=0x8189440, str=0xbffb6d60 "custom",
    check=false) at stdinhand.c:3313
#6  0x08058ac0 in handle_stdin_input (caller=0x8189440,
    str=0x5 <Address 0x5 out of bounds>, check=false) at stdinhand.c:3552
#7  0x080730ed in handle_chat_msg_req (pconn=0x8189440,
    message=0x8427000 "/rulesetdir custom") at handchat.c:175
#8  0x0805090c in handle_packet_input (pconn=0x8189440, packet=0x0, type=19)
    at srv_main.c:971
#9  0x0809188e in handle_incoming_client_packets (pconn=0x8189440)
    at sernet.c:368
#10 0x08091ced in sniff_packets () at sernet.c:688
#11 0x08051f45 in srv_loop () at srv_main.c:1750
#12 0x080518c6 in srv_main () at srv_main.c:1685
#13 0x0804a9eb in main (argc=1, argv=0xbffb8cb4) at civserver.c:242
(gdb) p city_styles
$1 = (struct citystyle *) 0x0
(gdb)





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#14514) segmentation fault when using /rulesetdir from client, Curtis <=