Re: [Pyobjc-dev] Crash when closing all documents
Brought to you by:
ronaldoussoren
From: Daniel M. <mil...@gm...> - 2009-11-27 18:50:29
|
On Nov 24, 2009, at 9:15 AM, Ronald Oussoren wrote: > On 24 Nov, 2009, at 4:01, Daniel Miller wrote: > >>> You seem to get a bus error, although the code looks fine at first >>> glance. Could you create a small self-contained project that >>> suffers from the same problem, that would make debugging a lot >>> easier for me. >> >> Sorry for the delay in getting this to you. The example is >> attached. I modified the TinyTinyEdit example found in PyObjC 1.4 >> (and updated it slightly to use the new subclassing mechanism >> rather than the old NibClassBuilder.AutoBaseClass). Anyway, this >> little program will reproduce the error I described in the first >> email in this thread. Instructions to reproduce the error (execute >> the following at the command line after unpacking the zip file): >> >> Dependencies (This is what's on my system. Other versions may also >> produce the same error. 10.4 with PyObjC 1.4 did NOT produce this >> error to my knowlege.): > > This is a rather annoying issue, and a instance where the Python<- > >ObjC bridge suddenly leaps into view to mess things up. > > I have committed a quick workaround in the repository, but that does > require a change to your code. To call the delegate method use: > > getattr(delegate, selector)(self, 1, context) > > rather than: > > perform_selector(delegate, selector, self, 1, context) > > Some notes: > > * You do not have to translate the selector name into a python > identifier, that's a hack but is supported behaviour (that is, if I > ever change PyObjC to be stricter about the names passed to > __getattr__ there will be a transition period) > > * This does require the very latest version of PyObjC that I'm in > the process of releasing. > > * My fix does not work with perform_selector and I don't know if I > can get that version to work without a lot of work. Thanks Ronald. It works now with PyObjC 2.2 ~ Daniel |