严重不稳定与pygtk 2.22和python 2.6 [英] Serious instability with pygtk 2.22 and python 2.6

查看:237
本文介绍了严重不稳定与pygtk 2.22和python 2.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人遇到这个?



我采用了GTK HelloWorld示例。运行正常但是,如果我 import win32ui ,那么它不会正常关闭(如这个问题)。



还有其他问题。在缩小我的应用程序以查看是什么导致它不能关闭的过程中,我来到了一个我解构一个我写的没有问题的记录器类的点。在构造函数中,我有一行:

  self.logger = logger 
pre>

我已经注释掉了其余的类,所以 self.logger 甚至没有被使用。如果我按原样离线,我会在点击Hello World按钮时收到此错误:

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

如果我将行更改为:

 code> self.logger = 0 

然后错误不会显示。这也发生在记录器类中的各种其他代码行。我怀疑它会发生在其他随机的代码位。但是无论如何 - 设置一个变量不能使用应该会导致任何问题。请注意,在这一点上,我仍然使用pygtk扭曲。我没有转载这个只是gtk。



这让我怀疑pygtk是真的不稳定吗?有谁遇到这个吗?有什么可以做的吗我从 gtk 2.12 更新的原因是因为我的应用程序会随机崩溃,但是这更糟。



更新:64位Windows 7上发生错误。我已尝试使用32位python与上面列出的版本,64位python与pygtk -2.17.1,pygobject-2.21.2,pycairo-1.8.8和pywin32-214。



到目前为止,Windows XP VirtualBox虚拟机上的相同安装不会发生 win32ui 错误。 p>

解决方案

我已经尝试过在不同的计算机上安装不同的Win7 64位,而且工作正常。所以在特定的计算机上的硬件/其他软件是一些奇怪的事情。可能没有gtk或win32相关。


Has anybody come across this?

I've taken the GTK HelloWorld sample. It runs fine. However, if i import win32ui, then it does not shutdown properly (as explained in this question ).

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.

解决方案

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.

这篇关于严重不稳定与pygtk 2.22和python 2.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆