Serious instability with pygtk 2.22 and python 2.6
Question: Has anybody come across this?

I've taken the GTK [HelloWorld
sample](http://www.pygtk.org/pygtk2tutorial/examples/helloworld.py). It runs
fine. However, if i `import win32ui`, then it does not shutdown properly (as
explained in [this
question](http://stackoverflow.com/questions/4308346/twisted-gtk-shutdown-not-
working-properly) ).

There are other problems. In the process of narrowing down my application to
see what caused it to not shutdown, I came upon a point where I was
deconstructing a logger class I had written that I had no problems with. In
the constructor I had the line:

    
    
    self.logger = logger
    

I had commented out the rest of the class so `self.logger` was not even used.
If I left the line as-is, I would get this error upon clicking the "Hello
World" button:

    
    
    c:\python26\lib\site-packages\twisted\internet\gtk2reactor.py:350: GtkWarning: gtk_widget_destroy: assertion `GTK_IS_WIDGET (widget)' failed
      gtk.main()
    

If I change the line to:

    
    
    self.logger = 0
    

then the error would not show up. This happened with various other lines of
code in the logger class as well. I suspect it would happen with other random
bits of code, too. But in any case - setting a variable that **isn't even
used** should **not** cause any kind of problem. Note that at this point I was
still using twisted with pygtk. I haven't reproduced this yet with just gtk.

This makes me suspect pygtk is being really unstable... has anybody come
across this before? Is there anything I can do? The reason I updated from `gtk
2.12` was because my application would crash randomly, but this is far worse.

UPDATE: The bugs happen on 64-bit Windows 7. I've tried both with 32-bit
python with the versions listed above, and 64-bit python with pygtk-2.17.1,
pygobject-2.21.2, pycairo-1.8.8 and pywin32-214.

So far the `win32ui` bug does not happen with the same install on a Windows XP
VirtualBox virtual machine.


Answer: I've tried this on a different install of Win7 64-bit on a different computer,
and it worked fine. So it's some strange thing with the hardware/other
software on a particular computer. Probably nothing gtk or win32 related.

