bugFreeciv - Bugs: bug #21043, Segmentation fault in...

Show feedback again

bug #21043: Segmentation fault in dai_manage_caravan

Submitted by:  Andreas Røsdal <andreasr>
Submitted on:  Wed Aug 21 16:02:39 2013  
Category: freeciv-webSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open
Release: trunk? r23091Operating System: GNU/Linux
Planned Release: Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Wed Aug 21 21:22:16 2013, comment #1:

From the backtrace it seems that unit data is a bit inconsistent. It has been assigned to traderoute establishing or wonder building task, but it has no target city. To really understand what goes wrong we would need info about what happened to unit the turn before.

Marko Lindqvist <cazfi>
Project Administrator
Wed Aug 21 16:02:39 2013, original submission:

I get a segmentation fault in tile.c, called from dai_manage_caravan in aiunit.c. This is on the Freeciv-web server, running Freeciv server SVN revision 23091. Based on the backtrace, the error looks like a bug in the AI code.

Backtrace generated from coredump:

#0 tile_city (ptile=0x0) at tile.c:81
#1 0x0812185d in dai_manage_caravan (punit=0x91c5958, pplayer=0xa27b718, ait=0x82f30c0 <ai_types>)
at aiunit.c:2105
#2 dai_manage_unit (ait=ait@entry=0x82f30c0 <ai_types>, pplayer=pplayer@entry=0xa27b718,
punit=punit@entry=0x91c5958) at aiunit.c:2513
#3 0x08123771 in dai_manage_units (ait=ait@entry=0x82f30c0 <ai_types>, pplayer=pplayer@entry=0xa27b718)
at aiunit.c:2654
#4 0x0810e33d in dai_do_first_activities (ait=0x82f30c0 <ai_types>, pplayer=pplayer@entry=0xa27b718)
at aihand.c:725
#5 0x080df6a8 in cai_do_first_activities (pplayer=0xa27b718) at classicai.c:359
#6 0x08052272 in ai_start_phase () at srv_main.c:793
#7 begin_phase (is_new_phase=true) at srv_main.c:945
#8 srv_running () at srv_main.c:2267
#9 srv_main () at srv_main.c:2791
#10 0x0804c132 in main (argc=17, argv=0xbfb04194) at civserver.c:458

Note that after I added the fix from bug #21019, the number of segmentation faults has been greatly reduced.

Andreas Røsdal <andreasr>
Project Member


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by jtn (Updated the item)
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by andreasr (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Oct 2 20:07:21 2016cazfiPlanned Release2.6.0=>
    Tue Jul 15 21:26:37 2014jtnRelease=>trunk? r23091
      Planned Release=>2.6.0
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup