URL: <http://gna.org/bugs/?15456>
Summary: api_actions_change_gold() crash Project: Freeciv Submitted by: cazfi Submitted on: Monday 02/22/2010 at 19:22 Category: None Severity: 3 - Normal Priority: 1 - Later Status: None Assigned to: None Originator Email: Open/Closed: Open Release: Discussion Lock: Any Operating System: None Planned Release: _______________________________________________________ Details: Crash from 2.2.0 server running galactic ruleset 0.2.4 ( http://forum.freeciv.org/viewtopic.php?t=3900&start=90 ) Program terminated with signal 11, Segmentation fault. #0 0x00000000005b0203 in api_actions_change_gold (pplayer=0x0, amount=50) at server/scripting/api_actions.c:72 72 pplayer->economic.gold += amount; (gdb) bt full #0 0x00000000005b0203 in api_actions_change_gold (pplayer=0x0, amount=50) at server/scripting/api_actions.c:72 No locals. #1 0x00000000005ae1d7 in tolua_api_change_gold00 (tolua_S=0x16e4be0) at server/scripting/api_gen.c:1905 pplayer = 0x0 amount = 50 tolua_err = {index = 0, array = 0, type = 0x19ed900 "P8\215\001"} #2 0x00000000005b74e2 in luaD_precall (L=0x16e4be0, func=0x18d37a0, nresults=0) at dependencies/lua-5.1/src/ldo.c:319 ci = 0x19ed8d8 n = -609042528 cl = 0x1f37d90 funcr = 160 #3 0x00000000005cc796 in luaV_execute (L=0x16e4be0, nexeccalls=2) at dependencies/lua-5.1/src/lvm.c:587 b = 3 nresults = 0 i = 25182428 ra = 0x18d37a0 cl = 0x19f39a0 base = 0x18d3770 k = 0x19f3c70 pc = 0x19f3990 #4 0x00000000005b778d in luaD_call (L=0x16e4be0, func=0x18d3720, nResults=1) at dependencies/lua-5.1/src/ldo.c:377 No locals. #5 0x00000000005b2464 in f_call (L=0x16e4be0, ud=0x7fffdbb2c530) at dependencies/lua-5.1/src/lapi.c:800 c = 0x7fffdbb2c530 #6 0x00000000005b6700 in luaD_rawrunprotected (L=0x16e4be0, f=0x5b242f <f_call>, ud=0x7fffdbb2c530) at dependencies/lua-5.1/src/ldo.c:116 lj = {previous = 0x0, b = {{__jmpbuf = {16, -8085995675295295808, 4368480, 140736879316960, 0, 0, -8085995675261741376, 8086057090794378944}, __mask_was_saved = 0, __saved_mask = { __val = {27228920, 24005944, 140736879314016, 6061520, 140736879314176, 25197248, 140736879314128, 4368480, 140736879316960, 0, 0, 6044960, 26031904, 4, 6427900, 26366144}}}}, status = 0} #7 0x00000000005b7b97 in luaD_pcall (L=0x16e4be0, func=0x5b242f <f_call>, u=0x7fffdbb2c530, old_top=32, ef=16) at dependencies/lua-5.1/src/ldo.c:463 status = 26031888 oldnCcalls = 0 old_ci = 0 old_allowhooks = 1 '\001' old_errfunc = 0 #8 0x00000000005b250d in lua_pcall (L=0x16e4be0, nargs=1, nresults=1, errfunc=1) at dependencies/lua-5.1/src/lapi.c:821 c = {func = 0x18d3720, nresults = 1} status = 0 func = 16 #9 0x00000000005a8fab in script_call (L=0x16e4be0, narg=1, nret=1) at server/scripting/script.c:128 status = 0 base = 1 #10 0x00000000005a9493 in script_callback_invoke ( callback_name=0x19f3730 "hut_enter_callback", nargs=1, args=0x7fffdbb2c610) at server/scripting/script.c:250 nres = 32731920 res = false #11 0x00000000005a9f1a in script_signal_emit (signal_name=0x5e101d "hut_enter", nargs=1) at server/scripting/script_signal.c:258 myiter = 0x0 pcallback = 0x19f3930 hash = 0x1f37e90 signal = 0x19f7720 args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffdbb2c710, reg_save_area = 0x7fffdbb2c650}} #12 0x000000000044a18e in unit_enter_hut (punit=0x1799b60) at server/unittools.c:2377 pplayer = 0x981800 behavior = HUT_NORMAL #13 0x000000000044c00c in move_unit (punit=0x1799b60, pdesttile=0x1807b20, move_cost=3) at server/unittools.c:3038 saved_id = 162 pplayer = 0x981800 psrctile = 0x1807ac0 pcity = 0x0 ptransporter = 0x0 old_vision = 0x1f2c9c0 new_vision = 0x18c23c0 saved_id = 162 unit_lives = true __PRETTY_FUNCTION__ = "move_unit" #14 0x00000000004ce2b7 in unit_move_handling (punit=0x1799b60, pdesttile=0x1807b20, igzoc=false, move_diplomat_city=true) at server/unithand.c:1366 move_cost = 3 pplayer = 0x981800 pcity = 0x0 __PRETTY_FUNCTION__ = "unit_move_handling" #15 0x0000000000467f60 in ai_unit_move (punit=0x1799b60, ptile=0x1807b20) at ai/aitools.c:1089 bodyguard = 0x7fffdbb2c980 sanity = 162 pplayer = 0x981800 is_ai = false __PRETTY_FUNCTION__ = "ai_unit_move" __FUNCTION__ = "ai_unit_move" #16 0x00000000004659da in ai_unit_execute_path (punit=0x1799b60, path=0x18b3cd0) at ai/aitools.c:223 ptile = 0x1807b20 id = 162 is_ai = false i = 1 #17 0x0000000000466587 in ai_follow_path (punit=0x1799b60, path=0x18b3cd0, ptile=0x1807b20) at ai/aitools.c:436 old_tile = 0x0 activity = ACTIVITY_EXPLORE alive = false #18 0x000000000046689b in ai_unit_goto_constrained (punit=0x1799b60, ptile=0x1807b20, parameter=0x7fffdbb2ca80) at ai/aitools.c:510 alive = true pfm = 0x18afff0 path = 0x18b3cd0 #19 0x000000000045d2a8 in ai_explorer_goto (punit=0x1799b60, ptile=0x1807b20) at ai/aiexplorer.c:120 parameter = {start_tile = 0x1807ac0, moves_left_initially = 3, fuel_left_initially = 1, move_rate = 3, fuel = 1, owner = 0x981800, uclass = 0x97ac30, unit_flags = { vec = "\000\000\000\000\000\000\000"}, omniscience = false, turn_mode = TM_CAPPED, get_MC = 0x59827b <normal_move_unit>, unknown_MC = 6, get_TB = 0x45d1b3 <ai_explorer_tb>, get_EC = 0, can_invade_tile = 0x56c9af <player_can_invade_tile>, get_zoc = 0x578f3d <is_my_zoc>, is_pos_dangerous = 0, get_moves_left_req = 0, get_costs = 0, data = 0x7fffdbb2cb20} risk_cost = {base_value = 1.5118408762742144e-321, fearfulness = 1.9762625833649862e-323, enemy_zoc_cost = 0} #20 0x000000000045d956 in ai_manage_explorer (punit=0x1799b60) at ai/aiexplorer.c:357 pplayer = 0x981800 init_tile = 0x1807ac0 log_most_desirable = 11.354187613473229 max_dist = 3 best_tile = 0x1807b20 best_MC = 3 pfm = 0x1a1daf0 parameter = {start_tile = 0x1807ac0, moves_left_initially = 3, fuel_left_initially = 1, move_rate = 3, fuel = 1, owner = 0x981800, uclass = 0x97ac30, unit_flags = { vec = "\000\000\000\000\000\000\000"}, omniscience = false, turn_mode = TM_CAPPED, get_MC = 0x59827b <normal_move_unit>, unknown_MC = 6, get_TB = 0x598a59 <no_fights_or_unknown>, get_EC = 0, can_invade_tile = 0x56c9af <player_can_invade_tile>, get_zoc = 0x578f3d <is_my_zoc>, is_pos_dangerous = 0, get_moves_left_req = 0, get_costs = 0, data = 0x97ac30} logDF = -0.51082562376599072 logBPS = 11.71015205448437 __PRETTY_FUNCTION__ = "ai_manage_explorer" #21 0x000000000044996c in do_explore (punit=0x1799b60) at server/unittools.c:2191 owner = 0x981800 #22 0x0000000000444a08 in update_unit_activity (punit=0x1799b60) at server/unittools.c:703 pplayer = 0x981800 id = 162 unit_activity_done = false activity = ACTIVITY_EXPLORE ptile = 0x1807ac0 check_adjacent_units = false __PRETTY_FUNCTION__ = "update_unit_activity" #23 0x00000000004442dd in update_unit_activities (pplayer=0x981800) at server/unittools.c:482 punit = 0x1799b60 punit_numbers = 0x7fffdbb2cd60 punit_index = 4 punit_size = 13 #24 0x0000000000430630 in begin_phase (is_new_phase=true) at server/srv_main.c:761 MY_i = 28 pplayer = 0x981800 #25 0x00000000004339c5 in srv_running () at server/srv_main.c:2054 eot_timer = 0x1c60d40 save_counter = 10 is_new_turn = true need_send_pending_events = false __PRETTY_FUNCTION__ = "srv_running" #26 0x000000000043481b in srv_main () at server/srv_main.c:2464 No locals. #27 0x000000000042b5a1 in main (argc=17, argv=0x7fffdbb2cfe8) at server/civserver.c:362 inx = 17 showhelp = false showvers = false option = 0x163a800 "`\257\322\001" _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?15456> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev