Posted by
| Zeno
USA (2,871 posts) Bio
|
Message
| Actually here's a reason it seems.
#0 to_channel (argument=0x0, channel=512, verb=0x81afb4d "Log", level=107) at act_comm.c:637
637 och = d->original ? d->original : d->character;
(gdb) bt
#0 to_channel (argument=0x0, channel=512, verb=0x81afb4d "Log", level=107) at act_comm.c:637
#1 0x080cbfbc in log_string_plus (str=0x8242340 "Closing link to Zeno.", log_type=0, level=107) at db.c:4213
#2 0x0816a5a5 in fread_pfile (fp=0x917c6f0, tdiff=265, fname=0xbff69ce0 "../player/k/Khalam", count=0 '\0') at pfiles.c:281
#3 0x0816a7de in read_pfile (dirname=0xbff69e20 "../player/k", filename=0x917eb8f "Khalam", count=0 '\0') at pfiles.c:360
#4 0x0816a90c in pfile_scan (count=0 '\0') at pfiles.c:413
#5 0x0816aaec in do_pfiles (ch=0x916caa8, argument=0xbff69ec0 "tar -cf ../player/pfiles.tar ../player/*") at pfiles.c:472
#6 0x080e6f90 in interpret (ch=0x916caa8, argument=0xbff6bb56 "") at interp.c:577
#7 0x080bc857 in game_loop () at comm.c:688
#8 0x080bc0f9 in main (argc=8, argv=0xbff6bf90) at comm.c:317
I installed the pfiles snippet, used the pfiles commmand, forced me linkdead (?) and there was a crash.
(gdb) p *d
$2 = {next = 0x0, prev = 0x0, snoop_by = 0x0, character = 0x0, original = 0x0, host = 0x0, port = 0, descriptor = 0,
connected = 0, idle = 0, lines = 0, scrlen = 0, fcommand = 0 '\0', inbuf = '\0' <repeats 1023 times>,
incomm = '\0' <repeats 1023 times>, inlast = '\0' <repeats 1023 times>, repeat = 0, outbuf = 0x0, outsize = 0,
outtop = 0, pagebuf = 0x0, pagesize = 0, pagetop = 0, pagepoint = 0x0, pagecmd = 0 '\0', pagecolor = 0 '\0', user = 0x0,
newstate = 0, prevcolor = 0 '\0'}
(gdb) p d
$3 = (DESCRIPTOR_DATA *) 0x18
This looks like a bug, if someone goes linkdead and a channel is used, it crashes.
for ( d = first_descriptor; d; d = d->next )
{
CHAR_DATA *och;
CHAR_DATA *vch;
och = d->original ? d->original : d->character;
vch = d->character;
So if both d->original and d->character are null, should I do this:
if ( !d->character && !d->original )
continue;
To prevent this? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|