I think I may have reproduced the server crash that has
been suspected.
I ran a server locally, and ran a table of ggzcards
with a single client, with the client running AI. Then
I exit with the client, and ggzd segfaulted.
This looks like some kind of threading problem,
although I have not examined it closely.
#0 seats_num (table=0x0) at seats.c:49
49
if (table->seat_types[i] == GGZ_SEAT_NONE)
(gdb) bt
#0 seats_num (table=0x0) at seats.c:49
#1 0x08050d45 in table_find_player (room=7, index=0,
name=0x8069028 "jason")
at table.c:946
#2 0x0804ef43 in player_transit (player=0x8069008,
opcode=2, index=0)
at players.c:766
#3 0x0804e6a4 in player_loop (player=0x8069008) at
players.c:320
#4 0x0804e46a in player_new (arg_ptr=0x8060dd0) at
players.c:229
#5 0x40036f87 in pthread_start_thread (arg=0xbf7ffc00)
at manager.c:284
Logged In: YES
user_id=5632
It looks like the only way this can occur is if a
player_transit() GGZ_TRANSIT_LEAVE event occurs on a
non-existant (already closed?) table. This shouldn't be
happening obviously, but the server should check for a NULL
table pointer in any event to prevent the crash and I'll
update it to do so.
NOTE: This doesn't mean that this won't cause a crash
somewhere else because of the root of the problem being the
actual event being triggered on a non-existant table, so
this bug is not being marked CLOSED.