URL:
  <http://gna.org/bugs/?16573>

                 Summary: in team_number() [team.c::384]: assertion '((void
*)0) != pteam' failed.
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Saturday 08/28/10 at 23:54
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: trunk r17877
         Discussion Lock: Any
        Operating System: GNU/Linux
         Planned Release: 2.3.0

    _______________________________________________________

Details:

Getting this on trunk with savefiles from late in an autogame.

Of the attached savefiles, T0374 doesn't show it, T0375 does. (The savefiles
were generated with a patch I'm working on for bug #15510, and have some
extraneous entries in them, but I don't think that's relevant, and they load
fine into unpatched trunk, which is what I'm using throughout.)

Here's what the server output looks like for T0375:


Encodings: Data=UTF-8, Local=UTF-8, Internal=UTF-8
This is the server for Freeciv version 2.2.99-dev
You can learn a lot about Freeciv at http://www.freeciv.org/
2: loading savefile in new format ...
2: Loading rulesets
2: AI*1 has been added as Easy level AI-controlled player.
2: AI*2 has been added as Easy level AI-controlled player.
2: AI*3 has been added as Easy level AI-controlled player.
2: AI*4 has been added as Easy level AI-controlled player.
2: AI*5 has been added as Easy level AI-controlled player.
2: Removing player AI*1.
2: Removing player AI*2.
2: Removing player AI*3.
2: Removing player AI*4.
2: Removing player AI*5.
2: Caesar has been added as Hard level AI-controlled player.
2: Suppiluliumas has been added as Hard level AI-controlled player.
2: Thiras has been added as Hard level AI-controlled player.
2: Vishtapa has been added as Hard level AI-controlled player.
2: Tutankhamun has been added as Hard level AI-controlled player.
1: in team_number() [team.c::384]: assertion '((void *)0) != pteam' failed.
1: Please report this message at https://gna.org/projects/freeciv/
1: in team_number() [team.c::384]: assertion '((void *)0) != pteam' failed.
1: Please report this message at https://gna.org/projects/freeciv/
2: Filippos II has been added as Hard level AI-controlled player.
1: in team_number() [team.c::384]: assertion '((void *)0) != pteam' failed.
1: Please report this message at https://gna.org/projects/freeciv/
2: Agron has been added as Hard level AI-controlled player.
2: Henry Morgan has been added as Hard level AI-controlled player.
2: ... in 0.420 seconds
2: Now accepting new client connections.


A bit of analysis while I'm waiting for my autogame. Backtrace after changing
the assertion to abort():


#0  0x00007f6a59d8afb5 in raise () from /lib/libc.so.6
#1  0x00007f6a59d8cbc3 in abort () from /lib/libc.so.6
#2  0x0000000000571769 in team_number (pteam=<value optimized out>)
    at team.c:384
#3  0x0000000000570f2c in player_research_get (pplayer=<value optimized
out>)
    at research.c:66
#4  0x0000000000572b9d in player_invention_state (pplayer=0x1e53, tech=70)
    at tech.c:122
#5  0x000000000057bb0c in can_player_build_unit_direct (p=0x2b25df0,
    punittype=0x9f3200) at unittype.c:659
#6  0x0000000000452759 in ai_data_phase_init (pplayer=0x2b911c0,
    is_new_phase=false) at advdata.c:417
#7  0x0000000000452aed in ai_data_get (pplayer=0x2b911c0) at advdata.c:725
#8  0x00000000004a90ed in sg_load_players (loading=0x2706660)
    at savegame2.c:3120
#9  0x00000000004ab2dd in savegame2_load_real (file=<value optimized out>)
    at savegame2.c:606
#10 0x00000000004acc02 in savegame2_load (file=0x1ae9aa0) at savegame2.c:521
#11 0x000000000041526a in load_command (caller=<value optimized out>,
    filename=0xa2aa48
"../autogames/unit-forgiveness/trunk-git1/civgame-T0375-Y01893-auto.sav.bz2",
check=false) at stdinhand.c:3611
#12 0x000000000040c534 in srv_main () at srv_main.c:2168
#13 0x00000000004042a9 in main (argc=5, argv=0x7fffc7ec3028) at
civserver.c:376


Looking at the backtrace, I'm guessing the significant difference between the
savefiles is that the Egyptians completed the Manhattan Project. In
ai_data_phase_init(), the AI is checking each player for a nuclear threat,
and can_player_build_unit_direct() will get further after the MP is
complete.

I'm guessing (without much evidence) that the problem is something like at
the point of ai_data_get(), only the teams for players up to and including
the one currently being loaded will have been set up.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Saturday 08/28/10 at 23:54  Name: civgame-T0374-Y01892-auto.sav.bz2 
Size: 63kB   By: jtn
trunk r17877: T0374 has no assertion, T0375 has assertion.
<http://gna.org/bugs/download.php?file_id=10064>
-------------------------------------------------------
Date: Saturday 08/28/10 at 23:54  Name: civgame-T0375-Y01893-auto.sav.bz2 
Size: 63kB   By: jtn
trunk r17877: T0374 has no assertion, T0375 has assertion.
<http://gna.org/bugs/download.php?file_id=10065>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?16573>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to