Re: Annoying Bug.......

From: Chris Jacobson (fear@ATHENET.NET)
Date: 12/18/97


On 12/18/97 4:52 PM, Chuck Carson (chuck@DIGMO.ORG) stated:

>#0  0x8073e5a in mobile_activity () at mobact.c:95
>Source file is more recent than executable.
>95            for (vict = world[ch->in_room].people ; vict && !found; vict =
>vict_next) {
>(gdb) back
>#0  0x8073e5a in mobile_activity () at mobact.c:95
>#1  0x8049e98 in heartbeat (pulse=400) at comm.c:699
>#2  0x8049e12 in game_loop (mother_desc=3) at comm.c:674
>#3  0x804949e in init_game (port=9999) at comm.c:267
>#4  0x8049430 in main (argc=2, argv=0xbffffb84) at comm.c:237
>#5  0x804915e in _start ()
>(gdb) quit

I'm quite familiar with this.  The problem is, the mob hit a DT, is
therefore immediately extracted, and is sitting in NOWHERE, plus having
been erased.  Therefore the ch pointer is no longer valid, nor is
ch->in_room, which will probably equal something like 16393.  (it seems
thats what ch->in_room ALWAYS is after it is extracted).

My solution, which I did to fix this and other problems (mine was being
cased by mobs that self-purged in mobprogs):

in every "instance" where it checks if it should do something (move,
assist, aggr attack, etc), always do a "continue" if it actually does
something.  This also makes the mob do only one thing: it will never walk
into a room and then pick up an object in one "beat" if it is a wandering
scavenger.

- Chris Jacobson


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