Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] Re: (PR#4760) take, observe, detach
Home

[Freeciv-Dev] Re: (PR#4760) take, observe, detach

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4760) take, observe, detach
From: "Mike Kaufman" <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Aug 2003 07:56:04 -0700
Reply-to: rt@xxxxxxxxxxxxxx

observing AI players causes the exit, where observing humans does not:

the cause is: tech.c:build_required_techs_helper()

  if (advances[tech].req[0] == goal || advances[tech].req[1] == goal) {
    freelog(LOG_FATAL, _("tech \"%s\": requires itself"),
            advances[goal].name);
    exit(EXIT_FAILURE);
  }

when goal=0 "None". This is Jason's commit revision 1.66. Jason?

here is a backtrace of AI observation:

#0  build_required_techs (pplayer=0x81bb00c, goal=0) at tech.c:128
#1  0x080db4db in update_research (pplayer=0x81bb00c) at tech.c:210
#2  0x0806819e in set_client_state (newstate=CLIENT_GAME_RUNNING_STATE)
    at civclient.c:687
#3  0x080765e4 in handle_game_state (packet=0x846d7f0) at packhand.c:289
#4  0x08067c08 in handle_packet_input (packet=0x846d7f0, type=-1)
    at civclient.c:341
#5  0x0806b3cb in input_from_server (fd=6) at clinet.c:333
#6  0x40287de2 in gdk_io_invoke (source=0xffffffff, condition=4294967295,
    data=0x8430b80) at gdkevents.c:946
#7  0x403ea15f in g_io_unix_dispatch (source=0x1, callback=0x8430b80,
    user_data=0xffffffff) at giounix.c:159
#8  0x403c8ca5 in g_main_dispatch (context=0x8275598) at gmain.c:1653
#9  0x403c9d18 in g_main_context_dispatch (context=0x8275598) at
gmain.c:2197
#10 0x403ca02d in g_main_context_iterate (context=0x8275598, block=1,
    dispatch=1, self=0x8247098) at gmain.c:2278
#11 0x403ca72f in g_main_loop_run (loop=0x842c7a8) at gmain.c:2498
#12 0x400eff3f in gtk_main () at gtkmain.c:1092
#13 0x0809ce08 in ui_main (argc=1, argv=0xbffffc84) at gui_main.c:1186
#14 0x08067564 in main (argc=1, argv=0xbffffc84) at civclient.c:244
#15 0x40437fa4 in __libc_start_main (main=0x8067320 <main>, argc=1,
    ubp_av=0xbffffc84, init=0x8062344 <_init>, fini=0x40015640
<_rtld_local>,
    rtld_fini=0x1, stack_end=0x81bb00c) at
../sysdeps/generic/libc-start.c:144

and a backtrace of human observation:

#0  build_required_techs (pplayer=0x81bb00c, goal=0) at tech.c:128
#1  0x080db4db in update_research (pplayer=0x81bb00c) at tech.c:210
#2  0x08078366 in read_player_info_techs (pplayer=0x81bb00c, 
    inventions=0x8466498 "1", '0' <repeats 88 times>) at packhand.c:1251
#3  0x0807883a in handle_player_info (pinfo=0x8466228) at packhand.c:1366
#4  0x08067ba9 in handle_packet_input (packet=0x8466228, type=1)
    at civclient.c:301
#5  0x0806b3cb in input_from_server (fd=6) at clinet.c:333
#6  0x40287de2 in gdk_io_invoke (source=0x1, condition=G_IO_IN,
data=0x8430aa0)
    at gdkevents.c:946
#7  0x403ea15f in g_io_unix_dispatch (source=0x1, callback=0x8430aa0, 
    user_data=0x1) at giounix.c:159
#8  0x403c8ca5 in g_main_dispatch (context=0x8275598) at gmain.c:1653
#9  0x403c9d18 in g_main_context_dispatch (context=0x8275598) at
gmain.c:2197
#10 0x403ca02d in g_main_context_iterate (context=0x8275598, block=1, 
    dispatch=1, self=0x8247098) at gmain.c:2278
#11 0x403ca72f in g_main_loop_run (loop=0x842c7a8) at gmain.c:2498
#12 0x400eff3f in gtk_main () at gtkmain.c:1092
#13 0x0809ce08 in ui_main (argc=1, argv=0xbffffc84) at gui_main.c:1186
#14 0x08067564 in main (argc=1, argv=0xbffffc84) at civclient.c:244
#15 0x40437fa4 in __libc_start_main (main=0x8067320 <main>, argc=1, 
    ubp_av=0xbffffc84, init=0x8062344 <_init>, fini=0x40015640
<_rtld_local>, 
    rtld_fini=0x1, stack_end=0x81bb00c) at
../sysdeps/generic/libc-start.c:144

so players observing AI do not get a tech update. Why this should cause the
exit is beyond me. The initial values should avoid this.

-mike



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