Re: Olc, ASCII pfile, player char data... :P

From: Emil Nilimaa (kyos_overlord@hotmail.com)
Date: 11/24/99


>From: "Daniel A. Koepke" <dkoepke@CALIFORNIA.COM>
>Reply-To: Circle Discussion List <CIRCLE@post.queensu.ca>
>To: CIRCLE@post.queensu.ca
>Subject: Re: Olc, ASCII pfile, player char data... :P
>Date: Tue, 23 Nov 1999 19:36:03 -0800
>
>
>In gdb, switch to the frame where this call is made (e.g., "frame 0" to
>switch to #0 in the backtrace, "frame 1" to switch to #1, etc.) and "print
>*plr_index".  Also do, "print line".
>
> > int fbgetline(FBFILE *fbfl, char *line)
> > {
>
>Switch to the frame where we're in this function (it's the line with the
>crash, yes?) and try:
>
>     print *fbfl
>     print line
>     print r
>     print fbfl->buf
>     print fbfl->size
>     print w
>
>Look for anything that seems wrong.  For instance, when printing the
>contents of a character array, junk characters *before* a '\0'; for a
>pointer, a NULL address (0x0); if fbfl->size is considerably longer than
>fbfl->buf, etc.


Hmm,
After totally wiping pfiles.
creating a new character Zeuron  works perfect, no crash whatsoever.
doin the same with "Zoo" gives this core dump:
----------------------------------------------------------
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0  0x80a6f8d in fbgetline (fbfl=0x4015ffe8, line=0xbffffa24 "@")
    at diskio.c:23
diskio.c:23: No such file or directory.

(gdb) bt
#0  0x80a6f8d in fbgetline (fbfl=0x4015ffe8, line=0xbffffa24 "@")
    at diskio.c:23
#1  0x807603c in build_player_index () at db.c:461
#2  0x8075cb6 in boot_db () at db.c:326
#3  0x807133c in init_game (port=4000) at comm.c:344
#4  0x80712e5 in main (argc=3, argv=0xbffffc04) at comm.c:320
#5  0x4005ecb3 in __libc_start_main (main=0x8071080 <main>, argc=3,
    argv=0xbffffc04, init=0x80491fc <_init>, fini=0x80aa51c <_fini>,
    rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffbfc)
    at ../sysdeps/generic/libc-start.c:78
(gdb)
(gdb) print line
$1 = 0xbffffa24 "@"
(gdb) print w
$2 = 0xbffffa25 ""
(gdb) print r
$3 = 0x410ad000 <Address 0x410ad000 out of bounds>
(gdb) print *fbfl
$4 = {
  buf = 0x410acfe8 "1 zoo 34 0 943445718\n~\n@"... <Address 0x410ad000 out
of bounds>, ptr = 0x410acfff "@"... <Address 0x410ad000 out of bounds>, size
= 23,
  flags = 1, name = 0x410aefec "pfiles/plr_index"}
(gdb)

First, the part:
diskio.c:23: No such file or directory.
is really bugging me, its in the same directory as the other
c files. Something i gotta do? :P

hmm, should line really be "@" ?


The plr_index looks like:
----------------------------------------
1 zoo 34 0 943445718
~
----------------------------------------

hrms..

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST