Re: [Pyobjc-dev] crasher demo app
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2004-03-26 16:32:02
|
On 26-mrt-04, at 14:55, Bob Ippolito wrote: > > On Mar 26, 2004, at 1:54 AM, Ronald Oussoren wrote: > >> >> 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. > > I spent a few minutes playing with that, but it gets complicated > really fast and about 24 of the tests start crashing or deadlocking ;) I noticed the crashing/deadlocking part :( and I wonder if these have anything to do with the problems we're seeing with mcfoo, to be honest I'm afraid they are related. Just releaseing the GIL around calls to ffi_call is not too complicated, it adds less then 20 lines of code to libffi_support.m. More fine-grained releasing of the GIL will be a lot of work. Ronald > > -bob > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 |