Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging an SWT application causes all GTK application to freeze

Tags:

java

eclipse

swt

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.

like image 654
Martin Thurau Avatar asked May 30 '11 16:05

Martin Thurau


1 Answers

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

like image 185
Paul Webster Avatar answered Oct 05 '22 23:10

Paul Webster