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

                 Summary: Assertion failures and segfault removing player in
pregame
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sat Oct 19 13:46:24 2013
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: trunk r23595
         Discussion Lock: Any
        Operating System: GNU/Linux
         Planned Release: 2.6.0

    _______________________________________________________

Details:

Two players attached to server in pregame; one uses the menu in the client to
remove the other (but I expect '/remove' at the server prompt would break
too).

Works fine on current head of S2_5 or S2_4, so seems trunk-specific.


herp: '/remove "Derp"'
2: Removing player Derp.
2: AI*1 has been added as Easy level AI-controlled player (classic).
2: AI*1 has been added as Easy level AI-controlled player (classic).
1: in genlist_size() [genlist.c::233]: assertion '((void *)0) != pgenlist'
failed.
2: Backtrace:
2:     0: server/freeciv-server() [0x6207bb]
2:     1: server/freeciv-server(vdo_log+0x9b) [0x62428b]
2:     2: server/freeciv-server(do_log+0x7d) [0x62435d]
2:     3: server/freeciv-server(fc_assert_fail+0x9f) [0x62458f]
2:     4: server/freeciv-server(genlist_size+0x35) [0x622cf5]
2:     5: server/freeciv-server(server_remove_player+0x102) [0x49e402]
2:     6: server/freeciv-server() [0x44a565]
2:     7: server/freeciv-server(handle_chat_msg_req+0x45d) [0x4f06ed]
2:     8: server/freeciv-server(server_handle_packet+0x6d2) [0x495c22]
2:     9: server/freeciv-server(server_packet_input+0xbb) [0x43933b]
2:    10: server/freeciv-server(server_sniff_all_input+0x8b2) [0x4d6bd2]
2:    11: server/freeciv-server(srv_main+0x1ad) [0x43bb6d]
2:    12: server/freeciv-server(main+0x78a) [0x433f9a]
2:    13: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)
[0x7fc86347176d]
2:    14: server/freeciv-server() [0x4345f1]
1: Please report this message at http://gna.org/projects/freeciv/
[...]
1: in server_remove_player() [plrhand.c::1576]: assertion
'(player_index(pplayer)) >= 0 && (player_index(pplayer)) < (signed int)
sizeof((aplayer->real_embassy).vec) * 8' failed.
2: Backtrace:
2:     0: server/freeciv-server() [0x6207bb]
2:     1: server/freeciv-server(vdo_log+0x9b) [0x62428b]
2:     2: server/freeciv-server(do_log+0x7d) [0x62435d]
2:     3: server/freeciv-server(fc_assert_fail+0x9f) [0x62458f]
2:     4: server/freeciv-server(server_remove_player+0x2cb) [0x49e5cb]
2:     5: server/freeciv-server() [0x44a565]
2:     6: server/freeciv-server(handle_chat_msg_req+0x45d) [0x4f06ed]
2:     7: server/freeciv-server(server_handle_packet+0x6d2) [0x495c22]
2:     8: server/freeciv-server(server_packet_input+0xbb) [0x43933b]
2:     9: server/freeciv-server(server_sniff_all_input+0x8b2) [0x4d6bd2]
2:    10: server/freeciv-server(srv_main+0x1ad) [0x43bb6d]
2:    11: server/freeciv-server(main+0x78a) [0x433f9a]
2:    12: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)
[0x7fc86347176d]
2:    13: server/freeciv-server() [0x4345f1]
1: Please report this message at http://gna.org/projects/freeciv/
[...]
Segmentation fault (core dumped)


Backtrace of segfault:


#0  0x000000000049e5e7 in server_remove_player (pplayer=0x30c1ec0)
    at plrhand.c:1576
        aplayer = 0x236edb0
        _pslot = 0x1783160
        pslot = 0x1783168
        __FUNCTION__ = "server_remove_player"
#1  0x000000000044a565 in remove_player_command (check=false, 
    arg=0x7fff51a37840 "\"Derp\"", caller=0x949520) at stdinhand.c:1183
        match_result = <optimised out>
        pplayer = 0x30c1ec0
        name = "Derp", '\000' <repeats 20 times>"\357,
IC\000\000\000\000\000@\251\243Q\377\177\000\000\000\000\000\000\000\000\000"
#2  handle_stdin_input_real (caller=0x949520, str=<optimised out>, 
    check=false, read_recursion=<optimised out>) at stdinhand.c:4297
        command =
"remove\000\000\260\224\r\003\000\000\000\000\360|\243Q\377\177\000\000\340|\243Q\377\177\000\000\210~\243Q\377\177\000\000\305\\g\000\000\000\000\000\025\000\000\000\000\000\000\000̊Ic\310\177\000\000\000\000\000\000\000\000\000\000\314\\g",
'\000' <repeats 13 times>, "\001", '\000' <repeats 103 times>, " ", '\000'
<repeats 55 times>,
"\002\000\000\000\000\000\000\000\377\377\377\377\000\000\000\000\377\377\377\377\377\377\377\377",
'\000' <repeats 16 times>,
"@\001\000\000\000\000\000\000\313\\g\000\000\000\000\000\000\225\224\000\000\000\000\000\300x\243Q\377\177\000\000\016\000\000\000\000\000\000\000\340\205\243Q\377\177\000\000\001\000\000\000\000\000\000\000\374\261Ic\310\177\000\000\001",
'\000' <repeats 15 times>"\305, \\g", '\000' <repeats 13 times>,
"P\234\224\000\000\000\000\000\326\001", '\000' <repeats 14 times>...
        arg =
"\"Derp\"\000\000\200\212\243Q\377\177\000\000\001\000\000\000\000\000\000\000\312\333V\000\000\000\000\000multiplayer\000test\000\000\000\000\000\000\000\000\260\364h\003\000\000\000\000\300x\243Q\377\177\000\000\000\020\000\000\000\000\000\000\b\000\000\000\000\000\000\000\002",
'\000' <repeats 23 times>"\260, \364h\003", '\000' <repeats 11 times>,
"\023\000\b\000s\023\000\002\005", '\000' <repeats 375 times>
        allargs = "\"Derp\"", '\000' <repeats 66 times>, "\001", '\000'
<repeats 15 times>"\320, \003", '\000' <repeats 14 times>,
";\000\000\000>\000\000\000\\\000\000\000n\000\000\000w\000\000\000|", '\000'
<repeats 11 times>, "
\207\200c\310\177\000\000\202\314g\000\000\000\000\000\240\003\000\000\000\000\000\000\331Jn\000\000\000\000\000\240\003\000\000\000\000\000\000\035\000\000\000\000\000\000\000\305/Mc\310\177\000\000\331Jn\000\000\000\000\000\240\003\000\000\000\000\000\000\202\314g\000\000\000\000\000\022\001\000\000\000\000\000\000\331Jn\000\000\000\000\000\322Qb\000\000\000\000\000\240\003",
'\000' <repeats 30 times>,
"`\031C\000\000\000\000\000\365Rb\000\000\000\000\000P\234\224\000\000\000\000\000m\001",
'\000' <repeats 14 times>"\241"...
        full_command = "remove \"Derp\"", '\000' <repeats 91 times>"\360,
|\243Q\377\177\000\000\300\342\223\000\000\000\000\000\340}\243Q\377\177\000\000\001\000\000\000\000\000\000\000\210~\243Q\377\177\000\000\377\002\000\000\000\000\000\000\305\\g\000\000\000\000\000\300\342\223\000\000\000\000\000\220\215Uc\310\177\000\000\001\200\255\373\000\000\000\000\300\342\223\000\000\000\000\000\300\342\223\000\000\000\000\000\300\342\223\000\000\000\000\000\300\342\223\000\000\000\000\000\326\342\223\000\000\000\000\000\277\345\223\000\000\000\000\000\300\342\223\000\000\000\000\000\277\345\223",
'\000' <repeats 49 times>,
"\004\000\000\000\364}\243Q\377\177\000\000\000\000\000\000\000\000\000\000\300\345\223",
'\000' <repeats 22 times>,
"\002\000\000\000\000\000\000\000ͳ\271o\005\243\301", '\000' <repeats 16
times>"\300,
\345\223\000\000\000\000\000\000\004\000\000\000\000\000\000\200\067Oe\310\177\000\000\001\000\000\000\000\000\000\000\326"...
        cptr_s = <optimised out>
        cptr_d = <optimised out>
        i = <optimised out>
        cmd = <optimised out>
        level = <optimised out>
#3  0x00000000004f06ed in handle_chat_msg_req (pconn=0x949520, 
    message=<optimised out>) at handchat.c:343
        real_message = "/remove \"Derp\"", '\000' <repeats 538 times>"\233,
-c", '\000' <repeats 14 times>,
"ͳ\271o\005\243\301\f\000\000\000\000\000\000\000T\213\243Q\377\177\000\000\001\000\000\000\000\000\000\000P\234\224\000\000\000\000\000@\251\243Q\377\177\000\000\253\062I\000\000\000\000\000\f\000\000\000alien",
'\000' <repeats 59 times>, "civ1", '\000' <repeats 49 times>,
"ͳ\271o\005\243\301\000\000\000\000civ2\000\000\000\000\000\000\000\000P\234\224\000\000\000\000\000@\211\243Q\377\177\000\000\000\000\000\000\000\000\000\000\200\212\243Q\377\177\000\000\200\211\243Q\377\177\000\000\201&^\000\000\000\000\000P\234\224",
'\000' <repeats 14 times>, "rw\001\000\000\000\000m\246H", '\000' <repeats 13
times>, "P\211\243Q\377\177\000\000\002"...
        cp = <optimised out>
        double_colon = <optimised out>
#4  0x0000000000495c22 in server_handle_packet (type=<optimised out>, 
    packet=<optimised out>, pplayer=<optimised out>, pconn=<optimised out>)
    at hand_gen.c:40
No locals.
#5  0x000000000043933b in server_packet_input (pconn=0x949520, 
    packet=<optimised out>, type=26) at srv_main.c:1633
        pplayer = <optimised out>
        __FUNCTION__ = "server_packet_input"
#6  0x00000000004d6bd2 in incoming_client_packets (pconn=<optimised out>)
    at sernet.c:447
        command_ok = <optimised out>
        packet = {data = 0x20795e0, type = PACKET_CHAT_MSG_REQ}
#7  server_sniff_all_input () at sernet.c:830
        pconn = 0x949520
        nb = <optimised out>
        i = <optimised out>
        s = <optimised out>
        max_desc = 7
        readfs = {fds_bits = {64, 0 <repeats 15 times>}}
        writefs = {fds_bits = {0 <repeats 16 times>}}
        exceptfs = {fds_bits = {0 <repeats 16 times>}}
        tv = {tv_sec = 0, tv_usec = 777650}
        __FUNCTION__ = "server_sniff_all_input"
#8  0x000000000043bb6d in srv_main () at srv_main.c:2836
        __FUNCTION__ = "srv_main"
#9  0x0000000000433f9a in main (argc=<optimised out>, argv=0x7fff51a3b138)
    at civserver.c:454
        inx = 1
        showhelp = <optimised out>
        showvers = <optimised out>
        option = <optimised out>
        __FUNCTION__ = "main"





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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