Re: [Pyobjc-dev] crasher demo app
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2004-03-25 19:18:09
|
On Mar 25, 2004, at 1:33 PM, Bob Ippolito wrote: > > On Mar 25, 2004, at 12:09 PM, Bob Ippolito wrote: > >> On Mar 25, 2004, at 1:18 AM, Burris T. Ewell wrote: >> >>> Okay, here is a bare bones implementation of what I was describing. >>> >>> http://www.gigagig.org/BT/mcfoo.tgz >>> >>> Start this up. It helps to click on the cells, try to drag them. >>> Sometimes it will hang. Sometimes it will crash like this: >>> >>> *** malloc[1540]: Deallocation of a pointer not malloced: 0x726df0; >>> This could be a double free(), or free() called with the middle of >>> an allocated block; Try setting environment variable MallocHelp to >>> see tools to help debug >>> *** malloc_zone_malloc[1540]: argument too large: 4294967292 >>> >>> mcfoo has exited due to signal 10 (SIGBUS). >> >> Bill brought this to my attention off-list. I haven't looked at your >> problem, however it's relatively safe to say that it's one of two >> things: >> >> (1) Reference counting. Some of Cocoa doesn't retain things (like >> the table data source, I think). So you will have to keep a >> reference to things like this somewhere on your own. This sucks, >> most of us think it's a bug in Cocoa, and we have filed reports in >> radar. If this does turn out to be your problem, I suggest filing a >> duplicate bug. > > Try retaining the cell, I did this, and it doesn't crash for me: > > class mcfooAppDelegate(NibClassBuilder.AutoBaseClass): > def init(self): > self.workers = [] > self.cells = [] > return self > > def awakeFromNib(self): > cols = self.table.tableColumns() > cell = MyCell.alloc().init() > self.cells.append(cell) > cols[0].setDataCell_(cell) > > In any case, YMMV with Python threads. Have fun debugging them :P Never mind, it did crash.. eventually. -bob |