Re: Crashing on Show Shop [long]

From: George (greerga@CIRCLEMUD.ORG)
Date: 06/12/98

On Fri, 12 Jun 1998, Ghost Shaidan wrote:

>0  0x80a778a in special (ch=0x8c93bf0, cmd=4, arg=0x8102bef "")
>    at interpreter.c:1534
>1534        if (GET_MOB_SPEC(k) != NULL)

I think you will find, if you 'p *k', that your k->nr variable has become

Take the value of 'pfilepos' and 'nr' and print them as characters.

If your 'nr' variable is '12875845784'

(gdb) p/x 9742833
$2 = 0x94a9f1

Converts to hex.

(gdb) p (char)0x94
$3 = -108 '\224'
(gdb) p (char)0xa9
$4 = -87 'C'
(gdb) p (char)0xf1
$5 = -15 '<funny character that doesn't paste well>'

Takes each byte and prints the character.  You'll probably find that yours
come out to be valid letters. (Although they may not if you happened to
overwrite it with integers somehow like with a bad array access.)

Do the same with 'pfilepos' and anything else in the beginning of the
structure that doesn't look quite right. (Pointers that don't begin with
'0x8' or '0x48' for example, if you are using Linux like I think you are.)

George Greer, | Genius may have its limitations, but          | stupidity is not thus handicapped.    |                  -- Elbert Hubbard

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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