调试SWT应用程序会导致所有GTK应用程序冻结 [英] Debugging an SWT application causes all GTK application to freeze

查看:119
本文介绍了调试SWT应用程序会导致所有GTK应用程序冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SWT应用程序,我通过eclipse远程调试进行调试。如果我在SWT应用程序的事件处理程序中设置断点,我的孔桌面冻结。我仍然可以通过 Strg + Alt + Fx 切换到文本控制台。如果我从控制台杀死SWT应用程序,一切都会继续工作。



由于这仅在断点位于事件处理程序中时发生,因此高度怀疑SWT在事件循环中阻止所有事情冻结。我的猜测是,SWT有一些魔术参数来分离应用程序,所以我可以正常调试,但是我无法找到它。

解决方案

这是一个已知的问题,本机部件具有X指针抓取并且不释放它。最常见的解决方法是在另一个显示器上运行你的内食。我使用 Xvnc ,因为我一直遇到这个问题,但其他例子是 XNest



看到的人尝试使用 -Dsun.awt.disablegrab = true 。我不知道是否有效。



请参阅 https://bugs.eclipse.org/bugs/show_bug.cgi?id=20006 对这个问题进行了漫长的讨论,以及人们尝试过的内容。



PW


I have an SWT application which I debug via remote debugging in eclipse. If I set a breakpoint inside an event handler of the SWT app my hole desktop freezes. I can still switch to a text console via Strg+Alt+Fx. If I kill the SWT app from the console everything continues to work.

Since this only happens when the breakpoint is inside an event handler I highly suspect SWT to block in the event loop causing everything to freeze. My guess is, that there is some magic parameter for SWT to "seperate" the applications, so I can debug properly, but I'm unable to find it.

解决方案

It's a known problem with a native widget having the X Pointer grab and not releasing it. The most common workaround is to run your inner eclipse on another display. I use Xvnc because I encounter this problem all the time, but other examples are XNest.

I've seen people try an use -Dsun.awt.disablegrab=true. I don't know if that works or not.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=20006 for a lengthy discussion of the problem and what people have tried.

PW

这篇关于调试SWT应用程序会导致所有GTK应用程序冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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