[crossfire] plugin crash on metalforge.

Mark Wedel mwedel at sonic.net
Thu Feb 15 01:42:41 CST 2007


  Looking at some of the crashes on metalforge, which is latest 1.x as of a week 
ago.  Saw 2 crashes wit the same cause.  From the logfile:

[Debug]   ********** EVENT HANDLER **********
[Debug]    - Who am I      :Moneygoose
[Debug]    - Activator     :reaper
[Debug]    - Event code    :1
[Debug]    - Event plugin  :Python
[Debug]    - Event hook    :/python/casino/platinumslots.py
[Debug]    - Event options :event_apply
/home/crossfire/share/crossfire/maps/python/CFItemBroker.py:23: 
DeprecationWarning: integer argument expected, got float
   self.object.Quantity=tmp
[Debug]   ********** EVENT HANDLER **********
[Debug]    - Who am I      :event_destroy
[Debug]    - Event code    :13
[Debug]    - Event plugin  :Python
[Debug]    - Event hook    :cfpython_auto_hook
[Debug]    - Event options :event_destroy
[Error]   Trying to remove removed object.
arch event_destroy
name event_destroy
name_pl event_destroy
title Python
slaying cfpython_auto_hook
nrof 53
type 116
subtype 13
end

  the offending code is Crossfire_Player_dealloc() in 
plugins/cfpython/cfpython_object.c:

static void Crossfire_Player_dealloc(PyObject *obj)
{
     Crossfire_Player *self;
     self = (Crossfire_Player *)obj;
     if(self) {
         if (self->obj && self->valid) {
             free_object_assoc(self->obj);
             if (self->del_event) {
                 cf_object_remove(self->del_event);
                 cf_free_object(self->del_event);
             }
         }
         self->ob_type->tp_free(obj);
     }
}

  In this particular case, self->obj == self->del_event, which is why I think 
this may be getting freed twice, but not 100% sure of that.  Can someone with 
more plugin exp look at this?




More information about the crossfire mailing list