Re: [Pyobjc-dev] crasher demo app
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2004-03-26 06:54:13
|
On 26-mrt-04, at 0:03, Bob Ippolito wrote: > > On Mar 25, 2004, at 4:23 PM, Ronald Oussoren wrote: > >> >> On 25-mrt-04, at 22:08, Burris T. Ewell wrote: >> >>> First off, I appreciate all of the help here... >>> >>> On Mar 25, 2004, at 12:19 PM, Ronald Oussoren wrote: >>>> If I remove those calls the application runs longer, e.g. it didn't >>>> crash yet :-) >>> >>> I don't think that's it... I tried that, holding a reference to the >>> cell, and also retaining the application delegate that holds >>> references to the controller objects. Still, inside the cell, the >>> controller attribute disappears inside drawInteriorWithFrame. Here >>> is a traceback from the full application, which is pretty much the >>> same as the demonstration. This shouldn't be possible since the >>> cell sets self.controller inside of init() and nowhere else is the >>> attribute removed. >> >> Hmm, doesn't NSTableView use -copy? That might explain why >> self.controller disappears. >> >> There's definitly something fishy going on, > > There's fishy things with threads in PyObjC in general.. try this, for > example (I just ran into this bug today): > > http://undefined.org/~bob/PyURLProtocol_broken.tgz > > My guess is that it doesn't release the GIL when doing the call, so > when it gets the callback it can't acquire the GIL and deadlocks. Yup, we don't release the GIL when calling into Objective-C, and we get a callback on another thread here. This won't be completely solved before the 1.1 release, I'd prefer to get that out soon (we should have released that long ago). Doing a 90% solution should be possible by releasing the GIL when calling ffi_call (libffi_support.m). That won't solve the problems with mcfoo. Ronald -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 |