Re: Extraction Crash

From: John Evans (evansj@HI-LINE.NET)
Date: 10/20/97


On Mon, 20 Oct 1997, Akuma/Chris Baggett/DOOMer wrote:

> since it IS a valid pointer to a memory address, you just are attempting to
> access it the wrong way.
>
> try doing a
> p *temp and send me (private mail)
> the output you get.
> you didn't do that. (it says its an obj_data ptr, but that's what its CAST as)
> i'm thinking you may be attempting an extract_obj() on a mob or character or
> something of the sort.
>
> At 12:26 PM 10/20/97 -0600, you wrote:
> >On Mon, 20 Oct 1997, Sean Butler wrote:
> >
> >> > Well, the best I can offer is that you do not test for
> >> > the null condition of temp->next.  Thus you are probably
> >> > seg faulting here. Try:
> >> >  while (temp && temp->next && (temp->next != obj))
> >> >
> >> > Not sure this is it, but its a good idea to always check
> >> > for the NULL condition anyway.
> >
> >I tried that as well. As soon as I try to access temp->next in ANY form,
> >the crash hits with a seg fault. :(
> >

Found it!
Had something like this in a room for zone commands:
Load a shopkeeper
   then give it a berry
Then give it a berry.

Since the second one was not linked to the first, the 'it' that it was
referring to was NULL. This meant that the obj was owned by nothing. For
some reason this really made things go funky, and cause a crash when
something was extracted and that object was the ->next item.

Everything seems to be working fine... Now... I just have to go into
Oasis and figure out a way of Preventing something like that happening
again since that was a tough nut to find and crack.

Thanks to all for their insight and ideas. :)


John Evans <evansj@hi-line.net>

May the source be with you.


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



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