On Thu, 2003-02-27 at 16:24, John Hunter wrote:
>
> This is mostly working.  But occasionally my instance appears to be
> cast up, or something like that, because it loses all the attributes
> that I gave it at __init__ (eg self.x).  I cannot figure out what
> exactly is causing this to happen.
> 
> Has anyone seen something like this before.

I've run into this exact same bug: it seems pretty rare, but when it
pops up it is very repeatable.

As far as I can tell, the instances are getting finalized before the
refcount gets to zero.  By adding some debugging code in the __getattr__
method, I've seen something trying to call __del__ on a live instance.

This is in a heavily-threaded app, and the __del__ing comes out of a GC
run that is happening in a non-main thread.  I thought it might be some
obscure race condition.

I've got a hacky work-around for my code, but the whole thing makes me
nervous.  Does anyone have some tips on how to debug this?

Thanks,
-JT

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to