Re: [Pyobjc-dev] the mysterious attribute error
Brought to you by:
ronaldoussoren
From: Burris T. E. <bu...@gi...> - 2004-03-28 16:37:22
|
Another clue: *** malloc[5538]: error for object 0x5b9f00: Double free Somewhere, memory management is going awry. burris On Mar 27, 2004, at 11:24 PM, Ronald Oussoren wrote: > > On 28-mrt-04, at 4:11, Burris T. Ewell wrote: > >> Okay, I've removed all of the threads from my application. It's >> completely kosher. I use NSTasks for the workers, and DO for >> callbacks. It works just fine most of the time. When I click around >> between rows, especially when one or more rows are getting frequent >> updates, I get the weird crash with the disappearing attribute when >> the cell is redrawing. A race condition that causes objects to get >> decref'd? > > From Subclassing NSCell at > http://developer.apple.com/documentation/Cocoa/Conceptual/ControlCell/ > index.html#//apple_ref/doc/uid/10000015i: > > <quote> > If the subclass contains instance variables that hold pointers to > objects, consider overriding copyWithZone: to duplicate the objects. > The default version copies only pointers to the objects. > </quote> > > You should implemented copyWithZone: unless you subclass has > '__slots__ = ()', otherwise the copy of a cell will share its __dict__ > with the original, without updating the reference count. That will > give problems later on. > > Ronald > -- > X|support bv http://www.xsupport.nl/ > T: +31 610271479 F: +31 204416173 > |