[Freeciv-tickets] [freeciv] #47992: server/advisors/autosettlers.c::929]: assertion 'recursion <= unit_list_size(pplayer->units)' failed.

アーカイブの一覧に戻る
OSDN Ticket System norep****@osdn*****
Tue May 9 08:03:32 JST 2023


#47992: server/advisors/autosettlers.c::929]: assertion 'recursion <= unit_list_size(pplayer->units)' failed.

  Open Date: 2023-05-08 00:21
Last Update: 2023-05-09 01:03

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/47992
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47992

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2023-05-09 01:03 Updated by: alain_bkr

Comment:

./ai/classic/classicai.c:665:  ai->funcs.settler_run = cai_auto_settler_run;
./ai/classic/classicai.c:411
/**********************************************************************//**
  Call default ai with classic ai type as parameter.
**************************************************************************/
static void cai_auto_settler_run(struct player *pplayer, struct unit *punit,
                                 struct settlermap *state)
{
  struct ai_type *deftype = classic_ai_get_self();

  dai_auto_settler_run(deftype, pplayer, punit, state);
}
ai/default/daisettler.c:1012: void dai_auto_settler_run(

try different stuff (build city, do something asked for by a city , take a boat, build a city 

line:1165
      if (best_tile != NULL
      && auto_settler_setup_work(pplayer, ...    )    <--- first call 
     && pcity != NULL) {

        clear_worker_tasks(pcity);
  }
../../../server/advisors/autosettlers.c :  991
/**********************************************************************//**
  Setup our settler to do the work it has found. Returns TRUE if
  started actual work.
**************************************************************************/
bool auto_settler_setup_work(struct player *pplayer, struct unit *punit,
...
    /* Mark the square as taken. */
    displaced = player_unit_by_number(pplayer,
                                      state[tile_index(best_tile)].enroute);
...
line:1044 
    if (displaced) {
....
      auto_settler_findwork(pplayer, displaced, state, recursion + 1);    <------ our line 1044, begins a recursion
      if (NULL == player_unit_by_number(pplayer, saved_id)) {
        /* Actions of the displaced settler somehow caused this settler
         * to die. (maybe by recursively giving control back to this unit)
         */
        return FALSE;
      }
../../../server/advisors/autosettlers.c:909
/**********************************************************************//**
  Find some work for our settlers and/or workers.
**************************************************************************/
#define LOG_SETTLER LOG_DEBUG
void auto_settler_findwork(...)

tasks asked for by cities
line 955 :   if (auto_settler_setup_work

Last try to find something again 
line 970:   if (unit_has_type_flag(punit, UTYF_SETTLERS)) {
line 981:     auto_settler_setup_work(
            }


---------------------------------------------------------------------
Ticket Status:

      Reporter: alain_bkr
         Owner: (None)
          Type: Bugs
        Status: Open
      Priority: 5 - Medium
     MileStone: (None)
     Component: Server
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Freeciv version 3.1.0-beta1+ (version bêta) (origin/S3_1 a37fd14dd HEAD afdfd4fbf (+10) ) 
I found this error in serv.log (run04_clang-15/loop.230507-100844.done/Sz1-Ai002-Lm59-230507_192610.done/serv.log)

1: [T055 - 2023/05/07 19:26:26] in auto_settler_findwork() [../../../server/advisors/autosettlers.c::929]: assertion 'recursion <= unit_list_size(pplayer->units)' failed.
1: [T055 - 2023/05/07 19:26:26] in auto_settler_findwork() [../../../server/advisors/autosettlers.c::929]: Please report this message at https://osdn.net/projects/freeciv/ticket/


-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/47992
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47992



More information about the Freeciv-tickets mailing list
アーカイブの一覧に戻る