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

                 Summary: Trouble when barbarian player is revived but no
leader names available
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sat 28 Nov 2015 21:28:49 UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: In Progress
             Assigned to: jtn
        Originator Email: 
             Open/Closed: Open
                 Release: 2.5.1
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 2.5.2, 2.6.0, 3.0.0

    _______________________________________________________

Details:

From bug #24126:
> pick_random_player_name() may return NULL. I think this can lead 
> to AI, civil war, etc players called "Player No. 3".
> * I think create_barbarian_player() can crash in this situation.

Reproduced: not a crash, but an assertion failure and a barbarian with an
empty name, in the case where an existing dead barbarian player is revived.


1: in fc_strlcpy() [support.c::589]: assertion '((void *)0) != src' failed.
2: Backtrace:
2:     0: inst/bin/freeciv-server() [0x6319eb]
2:     1: inst/bin/freeciv-server(vdo_log+0x8b) [0x63541b]
2:     2: inst/bin/freeciv-server(do_log+0x7d) [0x6354cd]
2:     3: inst/bin/freeciv-server(fc_assert_fail+0x8e) [0x6356be]
2:     4: inst/bin/freeciv-server(fc_strlcpy+0x85) [0x643ca5]
2:     5: inst/bin/freeciv-server(create_barbarian_player+0x35a) [0x48953a]
2:     6: inst/bin/freeciv-server(summon_barbarians+0x9f2) [0x48aba2]
2:     7: inst/bin/freeciv-server(srv_main+0x1953) [0x43ae23]
2:     8: inst/bin/freeciv-server(main+0x21e) [0x431b7e]
2:     9: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)
[0x7f586cf0eec5]
2:    10: inst/bin/freeciv-server() [0x43258f]





    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to