[Freeciv-Dev] (PR#2318) consistent crash when playing games repeatedly
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients:; |
Subject: |
[Freeciv-Dev] (PR#2318) consistent crash when playing games repeatedly |
From: |
"Jason Short via RT" <rt@xxxxxxxxxxxxxx> |
Date: |
Tue, 12 Nov 2002 13:21:25 -0800 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
When I apply the attached patch (generated with diff -w) to CVS, and
then run an autogame using "./ser -r rc" with the attached rc file,
eventually civserver crashes.
The backtrace is as follows:
#0 0x400e3e81 in mallopt () from /lib/libc.so.6
(gdb) bt
#0 0x400e3e81 in mallopt () from /lib/libc.so.6
#1 0x400e2e81 in free () from /lib/libc.so.6
#2 0x080b28ea in ai_data_turn_done (pplayer=0x40006b69) at aidata.c:193
#3 0x080b293a in ai_data_get (pplayer=0x813325c) at aidata.c:206
#4 0x080b0f23 in ai_spend_gold (pplayer=0x813325c) at aicity.c:323
#5 0x080b15ec in ai_manage_cities (pplayer=0x813325c) at aicity.c:517
#6 0x080b368a in ai_do_last_activities (pplayer=0x813325c) at aihand.c:370
#7 0x0804d7d6 in end_turn ()
#8 0x080501c6 in main_loop ()
#9 0x080509b0 in srv_loop ()
#10 0x0805036d in srv_main ()
#11 0x0804a195 in main (argc=3, argv=0xbffff964) at civserver.c:153
This has been reproduced 4 times now.
It is possible this is unrelated to the server restarting; I haven't run
exhaustive autogames to check.
jason
Index: srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.104
diff -u -w -r1.104 srv_main.c
--- srv_main.c 2002/11/12 20:54:05 1.104
+++ srv_main.c 2002/11/12 21:02:47
@@ -1894,20 +1894,22 @@
/* accept new players, wait for serverop to start..*/
server_state = PRE_GAME_STATE;
+ /* Run server loop */
+ while (TRUE) {
/* load a script file */
if (srvarg.script_filename
&& !read_init_script(NULL, srvarg.script_filename)) {
exit(EXIT_FAILURE);
}
- /* Run server loop */
- while (TRUE) {
srv_loop();
+#if 0
if (game.timeout == -1) {
game_free();
close_connections_and_socket();
exit(EXIT_SUCCESS);
}
+#endif
send_game_state(&game.est_connections, CLIENT_GAME_OVER_STATE);
report_scores(TRUE);
set timeout -1
set aifill 7
set endyear -1000
hard
create Caesar
start
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#2318) consistent crash when playing games repeatedly,
Jason Short via RT <=
|
|