Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: Bug on my compilation of the thing



>On Tue, 13 Aug 1996, murray@indigo2.scri.fsu.edu (John R. Murray) wrote:
>> What timing! It just happened again. Here's the stack dump out of dbx:
>[...]
>>    5 _sigtramp(0x3145, 0x6, 0x7fffab10, 0x0) ["sigtramp.s":59, 0xfad5958]
>>    6 change_abil(0xfabf1e4, 0x7fffaa60, 0x2, 0x1019fb8c) ["living.c":421, 0x48b328]
>
>This crash seems to be caused by a temporary improvement which expires (i.e.
>you drank a potion of immunity to fire, or you cast a spell of protection
>from poison, then the effect expires after some time).  The source of the
>bug can come from what you did when you drank the potion or read the scroll,
>instead of what you are doing when the game crashes.
>
>> Hmm.. but in the stack trace.. The first parameter of change_abil looks fishy;
>> it's out of range. (compare with other pointers).. (I gather from looking
>> at the typedef of object in struct.h that op->env (line 127 in server/time.c)
>> is supposed to point to another object (or NULL), unless there's some
>> deliberate funny business going on somewhere).
>
>Could this be a pointer to an area located on the program's stack?  Could you
>compare with other pointers and see if that apparently incorrect pointer is
>pointing to the stack or if it is just invalid?

Urf, well, actually, 0xfabf1e4 is pointing below the stack, which on this
machine begins around 0x10000000 (+ statically allocated variables) and grows
upward (and the heap begins around 0x7fffffff and grows downward). However,
the SEGV did *not* happen at the first reference (see change_abil source, the
SEGV in this case happened at line 421: op->path_repelled&=~tmp->path_repelled,
after 5 other similar assignments), which causes me to wonder if something
else (maybe a signal handler?) is stepping on the stack. Everything else
in the source around that point seems pretty straightforward.

>Also, if this bug is caused by a spell, could you say which spell was used and
>how (from a scroll, rod, wand, potion, or is it a "known" spell?)

To the best of my knowledge, the char wasn't under a spell. This char has
too many difficulties using scrolls (can you say, "Stoopid"? I knew you
could! :-), and generally doesn't use protection, etc, spells anyway because
he's got a whole bagful of rings (about the only non-wearable magic he uses
at all is stat-raising potons, and the occasional offensive wand or rod against
something really nasty). Unless god-granted protections fall under the
category of temporary spell? He got, hmm, draining and... (gotta go check..)
depletion from praying to (I think) God. (hey! he's also got protection from
poison! I'm not sure where that came from.. are there racial intrinsic
resistances? This is a barbarian)

In any case, it crashed again last night, in a different spot. I don't
remember exactly what was going on during this crash (most of the crashes
seem to happen when there's some big fight going on, so it's hard to keep
track of all events and keystrokes). Here's the stack dump from that crash:

>  0 _kill(0x5320, 0x6, 0x7fffa9e0, 0x0) ["kill.s":15, 0xfae25d4]
   1 raise(0x6, 0x6, 0x7fffa9e0, 0x0) ["raise.c":22, 0xfae3928]
   2 abort(0x5320, 0x6, 0x7fffa9e0, 0x0) ["abort.c":37, 0xfb17354]
   3 fatal_signal(0x1, 0x1, 0x7fffa9e0, 0x0) ["init.c":516, 0x4329fc]
   4 rec_sigbus(0xa, 0x6, 0x7fffa9e0, 0x0) ["init.c":499, 0x4328f8]
   5 _sigtramp(0x5320, 0x6, 0x7fffaaa0, 0x0) ["sigtramp.s":59, 0xfad5958]
   6 remove_ob(0x7fffaa60, 0x1d, 0x3a, 0x7) ["object.c":901, 0x487128]
   7 move_object(0x7fffaa60, 0x7, 0x3a, 0x7) ["monster.c":1054, 0x444c74]
   8 move_monster(0x7fffaa60, 0x1d, 0x3a, 0x7) ["monster.c":289, 0x441588]
   9 process_object(0x7fffaa60, 0x1d, 0x3a, 0x7) ["time.c":653, 0x477000]
   10 process_events(0x0, 0x1d, 0x3a, 0x7) ["main.c":683, 0x43f8c0]
   11 main(0x2, 0x7fffaf4c, 0x7fffaf58, 0x7) ["main.c":866, 0x4402cc]
   12 __start() ["crt1text.s":133, 0x4114ac]

The pointers on the stack look ok this time, near as I can tell.

--
John R. Murray murray@indigo2.scri.fsu.edu     http://www.scri.fsu.edu/~murray/
FSU Aikido Club/North Florida Aikikai       home of Miko's Aikido MPEGs and the
Tallahassee, FL                            WWW Aikido online calendar of events

Politics, n: from "poly ticks", short for "many small bloodsucking insects"
    -- Henry Spencer