On Mar 29, 2006, at 3:28 PM, Saggau wrote: > Hi folks. I've done a load of googling after getting SIG(variable) > errors > when adding and removing objects to/from an arrayController in > pyobjc and can't seem > to figure this one out. I've tried the pyobjc list and have no > response so far. > > Apologies for cross-posting and please let me know if I'm asking > the question poorly, vaguely, > or on the wrong mailing list. > > I set Signals.dumpStackOnFatalSignal() as well as > Debugging.installVerboseExceptionHandler > () and then I start adding python > (subclassing NSObject) objects to my NSArrayController. After a > variable > number of additions and/or subtractions, I get the stack trace > below. (there > are no other errors, including those related to KVC compliance, etc) > > > Intuition is telling me that I may be in trouble because I'm > instantiating > python singleton objects (subclassing the class directly below) as > attributes of the object that I'm adding to the NSArrayController, > but I > > could be way off here. > > *Update: I removed all singletons from my code and have the same > behavior. > *Update: this happens whether or not I have the objects delete on > removal from the > controller. > > class scAbstractSingleton(object): > > def __new__(cls, *args, **kwds): > it = cls.__dict__.get("__it__") > if it is not None: return it > cls.__it__ = it = object.__new__(cls) > it.init(*args, **kwds) > return it > > > def init(self, *args, **kwds): > pass > > Is there a way post-mortem to get the object that *was* at > 0x114d740 in the > trace below? Is there a way to recursively enumerate all > attributes of a > given object to do a print(theAttribute) on instantiation? That > could be > > crazy... Any cool pdb tricks I should know? > > I assume that figuring out which object (0x114d740 in the trace > below) was > freed is a good place to start, but I don't know if that's possible in > retrospect, as that object is freed. I can see the memory > referenced in > > gdb, but I don't see anything that would help...at least not to my > inexperienced eyes. Who knows the proper voodoo?
Use NSZombieEnabled. http://developer.apple.com/technotes/tn2004/tn2124.html -bob _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig