elunna / hackem

SlashEM forked Unto Evil with a Splice of X and a dash of THEM.
Other
23 stars 8 forks source link

Attempted to start duplicate rot_corpse timer, aborted. #302

Closed elunna closed 1 year ago

elunna commented 1 year ago

Reported by mobileuser.

22:30:48 < mobileuser> Attempted to start duplicate rot_corpse timer, aborted.--More-- 22:31:00 < mobileuser> Program in disorder! (Saving and reloading may fix this problem.) 22:31:29 < mobileuser> You feel less hassled. 22:31:39 < mobileuser> was the final message 22:32:08 < mobileuser> OK I went back to a level where I had put some gnome zombies in a box 22:32:19 < mobileuser> That may be related :-)

elunna commented 1 year ago

Trying to reproduce: Killed some orc and gnome zombies and locked in a box. Just getting the regular "You feel less hassled." message. Tried leaving the level too and coming back after 55 turns. The message displayed as soon as I re-entered the level with the boxed zombies, but no crash yet. Also tried coming back after ~1000 turns. No results yet.

elunna commented 1 year ago

Some places to look:

do.c: zombify_mon(arg, timeout)
    Can call rot_corpse

do.c: revive_mon(arg, timeout)  
    /* Revive the corpse via a timeout. */
    This might be related
    This is where the "less hassled" message occurs.

do.c: revive_corpse(struct obj *corpse, boolean moldy)

dig.c: rot_corpse(arg, timeout)
     * Called when a corpse has rotted completely away.
hothraxxa commented 1 year ago

I just got this while carrying a corpse that turned into a lichen. I was next to my stash box that had a couple of orc zombie corpses in it.

When I looked in the box I had an orc corpse and an orc zombie corpse.

elunna commented 1 year ago

I just got this while carrying a corpse that turned into a lichen. I was next to my stash box that had a couple of orc zombie corpses in it.

Do you remember if it was a zombie corpse that you were carrying?

hothraxxa commented 1 year ago

I can't be sure but I think it was.

elunna commented 1 year ago

I've been further attempts to reproduce this: killing large numbers of orc zombies and just letting them lie on the ground and carrying hobbit zombie corpses. No luck yet.

The rot_corpse timer can be started in these places:

elunna commented 1 year ago

Finally duplicated by loading a box with hobbit corpses and locking it. As I thought, it occurs on the second rot corpse timer in moldy_corpse. We will fix by adding a check for any existing rot timers there.

667---  VA_DECL(const char *, s)##############-----      |#.....|
(gdb) bt                                       #         --------
#0  impossible (s=0x0) at pline.c:667                         #
#1  0x0000555556241974 in start_timer (when=20, kind=2, func_index=1, arg=0x604000069030)
    at timeout.c:2541
#2  0x0000555555959d31 in moldy_corpse (arg=0x604000069030, timeout=9690) at do.c:2602
#3  0x00005555562415eb in run_timers () at timeout.c:25065m:22s
#4  0x0000555556233df3 in nh_timeout () at timeout.c:983
#5  0x0000555555788eb5 in moveloop (resuming=0 '\000') at allmain.c:406
#6  0x000055555649d8ce in main (argc=0, argv=0x7fffffffe628) at ../sys/unix/unixmain.c:353