Twisted + Gtk - 关机无法正常工作 [英] Twisted + Gtk - shutdown not working properly

查看:119
本文介绍了Twisted + Gtk - 关机无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用安装了最新的pygtk的Python 2.6,Twisted 10.1和GTK + 2.22,我在关闭时遇到问题。当我关闭应用程序并关闭反应堆(当然使用 gtk2reactor )时,应用程序会冻结。

我绕过了扭曲的源代码并添加了调试消息。最终发生的事情是调用'shutdown'事件触发器,调用 PortableGtkReactor.crash ,它调用 gtk.main_quit 。该事件在 ReactorBase.runUntilCurrent 结尾处理。当函数返回时,控制权转移到 ReactorBase.iterate ,它将控制权返回给 PortableGtkReactor.simulate , ... gtk.main()调用。它看起来像 gtk 只是不退出。



不幸的是,当我将一个非常简单的示例和gtkHello World示例,一切正常关闭。这一定是我的应用程序正在做的事情。直到我可以进一步了解它,虽然...



什么可能导致这种情况?像一个应用程序可以做什么,导致GTK不退出?该应用在Gtk 2.12上运行良好,使用Python 2.5和Twisted 8.1(如果有帮助的话)。

href =https://stackoverflow.com/questions/4326710/serious-instability-with-pygtk-2-22-and-python-2-6>这个问题它似乎来自导入 win32ui 模块。但我认为潜在的问题更深层次。编辑:似乎是我特别安装的Windows 7和其他任何地方的问题。


Using Python 2.6, Twisted 10.1, and GTK+ 2.22, with latest pygtk installed, I'm having problems on shutdown. When I close my application and shut down the reactor (using the gtk2reactor of course), the application simply freezes.

I've poked around the twisted source and added debug messages. What ends up happening is, the 'shutdown' event fires, PortableGtkReactor.crash is called, which calls gtk.main_quit. The event gets processed at the end of ReactorBase.runUntilCurrent. When the function returns, control goes to ReactorBase.iterate, which returns control to PortableGtkReactor.simulate, which goes back to... the gtk.main() call. It looks like gtk just doesn't quit.

Unfortunately, when I put together a very simple example with twisted and the gtk "Hello World" sample, everything shut down correctly. It must be something my application is doing. Until I can figure it out further, though...

What might be causing this? Like what could an app do that causes gtk to not quit? The app worked fine on Gtk 2.12, with Python 2.5 and Twisted 8.1, if that helps at all.

解决方案

As from this question it seems to come from importing the win32ui module. But I think the underlying problem is deeper..

EDIT: Seems to be a problem with my particular install of Windows 7 and whatever else is here.

这篇关于Twisted + Gtk - 关机无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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