Re: Problem...

From: Sammy (samedi@DHC.NET)
Date: 08/07/97


On Wed, 6 Aug 1997, Fili wrote:

> Any idea what causes this when someone drinks from a fountain?

You bet!

> Thu Aug  7 00:46:39 :: nusage: 2   sockets connected, 2   sockets playing

This is pretty worthless info for debugging purposes.

> Program received signal SIGSEGV, Segmentation fault.
> 0x80566b1 in do_drink (ch=0x8273a10, argument=0xbffff7e9 " fountain",
> cmd=72,
>     subcmd=2) at act.item.c:852
> 852         sprintf(buf, "$n drinks %s from $p.",
> drinks[GET_OBJ_VAL(temp, 2)]);
<snipped the useless stuff>

Aha!  Here's your problem right there for ya.  All you need is a little
thinking.  SIGSEGV is a memory fault, which is usually the result of an
invalid pointer or an out of bounds array element.  You're using two
pointers and an array here.  Without looking at your code it's not
obvious which one is bad, but you can easily figure it out using the gdb
"print" command.

I'm guessing your fountain liquid type is invalid.

Sam


     +------------------------------------------------------------+
     | 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