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

Re: Two frequent crossfire-crashers....



On Tue, Jun 13, 2000 at 01:28:44PM -0700, Peter Mardahl wrote:
> #1:  Frequently, when there are chests about and monsters
> to open them, crossfire crashes with "trying to remove
> removed object".

Monster was killed, but the code continued with a freed object.  There
are lots of missing was_destroyed() checks in server/monster.c and
other places.

> #3  0x80c88c1 in remove_ob (op=0x8720278) at object.c:1063
> #4  0x8050079 in apply_treasure (op=0x8720278, tmp=0x8beed60) at apply.c:1533

Incidentally, there is an unrelated bug here.  The attached patch fixes
it.  It is already applied to the CVS tree.

> #2:  Frequently, crossfire will crash here:
> common/anim.c line 150:
> 
>   /* If object is turning, then max animation state is half through the
>      * animations.  Otherwise, we can use all the animations.
>      */
>     max_state=NUM_ANIMATIONS(op)/ NUM_FACINGS(op);
>     base_state=0;
> 
> NUM_FACINGS(op) will be zero, and there will be an FPE.

No idea what's causing this.  I've never had crashes here.  I'm
wondering what op's name, type and archetype's name are.

-- 
Jan
diff -ru orig/crossfire-0.95.5-cvs3-patch28/server/apply.c crossfire-0.95.5-cvs3/server/apply.c
--- orig/crossfire-0.95.5-cvs3-patch28/server/apply.c	Tue Jun 13 15:18:39 2000
+++ crossfire-0.95.5-cvs3/server/apply.c	Tue Jun 13 22:50:17 2000
@@ -1530,8 +1530,10 @@
     decrease_ob(tmp);
 
     /* Done to re-stack map with player on top? */
+    SET_FLAG (op, FLAG_NO_APPLY);
     remove_ob(op);
     insert_ob_in_map(op,op->map,NULL);
+    CLEAR_FLAG (op, FLAG_NO_APPLY);
 }