Tip: Avoid frozen X when debugging an UI

Today I came across this bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6714678 with JDK 1.6.12

In short descripton: when you stop at a breakpoint while a popup of your app is opened, then it might happen your whole X is frozen. To avoid this use this flag in your run/debug setting of your application:

-Dsun.awt.disablegrab=true


Thomas

PS: Probably worth to add to the knowledgebase

10 comments
Comment actions Permalink

Hi,
stumbled upon this issue today, added an comment to http://devnet.jetbrains.net/docs/DOC-1142

maybe someone has a hint for me? :)

cheers
Markus

0
Comment actions Permalink

Hi Markus,

Where have you defined the property? At the run configuration?

Denis

0
Comment actions Permalink

Hi, yes, in the run configuration. I also tried to set ist as a vmoption for inde itself.

jps also shows that the argument has been applied.

thanks
Markus

0
Comment actions Permalink

Strange, the setting helped me in the local ubuntu environment..

Is it possible to make a thread dump when the IJ is hanging?

Denis

0
Comment actions Permalink

hm....jstack gives me for the application-to-debug:

Deadlock Detection:

No deadlocks found.

Thread 15750: (state = BLOCKED)
Error occurred during stack walking:


Thread 15782: (state = BLOCKED)
Error occurred during stack walking:


Thread 15781: (state = BLOCKED)
Error occurred during stack walking:


Thread 15778: (state = BLOCKED)
Error occurred during stack walking:


Thread 15777: (state = BLOCKED)
Error occurred during stack walking:


Thread 15775: (state = BLOCKED)
Error occurred during stack walking:


Thread 15774: (state = BLOCKED)
Error occurred during stack walking:


Thread 15772: (state = BLOCKED)
Error occurred during stack walking:


Thread 15758: (state = BLOCKED)
Error occurred during stack walking:


Thread 15757: (state = BLOCKED)
Error occurred during stack walking:


Thread 15756: (state = BLOCKED)
Error occurred during stack walking:


The stack traces of IJ's  appmain aind main threads are fairly longer, so i attach them as txt files.

thank you for you help,
cheers
Markus



Attachment(s):
main.txt.zip
appmain.txt.zip
0
Comment actions Permalink

Hi Markus,

I googled the following - 6714678. It looks like there is a regression at the new jdk 1.6.x versions. Can you try with, say, 1.6.0_19 (I'm still using this version and haven't been experiencing the hangs since 'disablegrab' was set).

Denis

0
Comment actions Permalink

Hi,
just triedit with

java version "1.6.0_19"
Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Java HotSpot(TM) 64-Bit Server VM (build 16.2-b04, mixed mode)

and get the same behavior :(

thanks for the hint

Markus

0
Comment actions Permalink

One more approach - try to manually download target jdk (not from the repo) and instruct IJ to use it. People say that that may help.

Denis

0
Comment actions Permalink

Hi,
I already did the manual way to switch to another JDK - it was the qucikest way for me ;-)
Also tried 1.6.01 / 32bit now, no difference :(

Reading about the X11 Config switch (that was appearently disabled): Might this also be related to driver/screen setup ? I'm using an twin-view setup with external screen and a nvidia card with NV-CONTROL Version 1.24 ...

thanks for your help
Markus

0
Comment actions Permalink

I doubt the problem is related to the mentioned driver/screen setup as I have exactly the same (twin view and nvidia drivers).

Denis

0

Please sign in to leave a comment.