Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2006:
[Freeciv-Dev] Re: (PR#15447) pubserver crash in player_restore_units
Home

[Freeciv-Dev] Re: (PR#15447) pubserver crash in player_restore_units

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#15447) pubserver crash in player_restore_units
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 6 Feb 2006 10:24:25 -0800
Reply-to: bugs@xxxxxxxxxxx

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

(gdb) select 1
(gdb) p *punit
$2 = {type = 1075462296, id = 1075462296, owner = 4, tile = 0x4023fcc8,
   homecity = 381, moves_left = 0, hp = 0, veteran = 2, unhappiness = 2,
   upkeep = 1, upkeep_food = 0, upkeep_gold = 0, fuel = 1, bribe_cost = -1,
   ai = {control = false, ai_role = AIUNIT_NONE, ferryboat = 0, 
passenger = 0,
     bodyguard = 0, charge = 0, prev_struct = 0x4023fc28,
     cur_struct = 0x4023fc28, prev_pos = 0xa58c578, cur_pos = 0xa58c57c,
     target = 0, hunted = 0}, activity = ACTIVITY_GOTO, goto_tile = 
0x40237b18,
   activity_count = 0, activity_target = S_NO_SPECIAL,
   focus_status = FOCUS_AVAIL, ord_map = 0, ord_city = 0, foul = false,
   debug = false, moved = true, paradropped = false, done_moving = false,
   transported_by = -1, occupy = 0, client = {colored = false,
     color_index = 0}, has_orders = false, orders = {length = 0, index = 0,
     repeat = false, vigilant = false, list = 0x0}}

Very odd; this bug is not localized but is surely caused by either 
invalid data being initialized elsewhere, or a memory bug of some sort.

Incidentally, unit_name(punit->type) isn't necessary here; we could just 
call punit->name.

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#15447) pubserver crash in player_restore_units, Jason Short <=