WB causes Eclipse to hang after closing Preview window [message #1698739] |
Wed, 17 June 2015 10:35  |
Eclipse User |
|
|
|
Almost without fail (about 90% of the time), after closing the preview window in design mode, I find that Eclipse has completely frozen. I used jstack to attach to the eclipse process and figure out what's going on. It seems that WB's SwingImageUtils class calls java.awt.Window.dispose on the preview window, which eventually calls java.awt.EventQueue.invokeAndWait. Then it gets stuck at lock.wait() in that method. For some reason, that lock object in EventQueue never gets notified, and so Eclipse's main thread hangs forever. I have no idea how to fix this problem.
I'm running Eclipse Luna with WB 1.7.0r44 on Ubuntu. Everything appears to be fully updated. I have two thread dumps (java and mixed) showing where Eclipse gets stuck. Previously I had tried WB 1.8.0 and had the same issue, but I didn't take any thread dumps with that so I'm not sure if it's the exact same issue. I've tried both the GTK and Metal LAFs and both have the same issue (the GTK one also has the additional issue of sometimes causing Eclipse to abort due to some problem with xcb, but that's probably another issue).
Any ideas on what I can do to fix this? Or should I file a bug report somewhere?
|
|
|
Re: WB causes Eclipse to hang after closing Preview window [message #1698766 is a reply to message #1698739] |
Wed, 17 June 2015 12:20   |
Eclipse User |
|
|
|
One thing to note is that the AWT-EventQueue-0 thread seems to be missing from the thread dumps. I think the problem is that somehow, the event dispatch thread is exiting before the lock is being notified, but after the actual window is disposed, since the window does close despite Eclipse being hung. So, some sort of race condition is going on.
This all happened when I was running on OpenJDK. The issue seems to be gone with Oracle Java. There's probably a bug that needs to be reported somewhere, but I'm not sure where. Is this a bug in the way WB deals with showing preview windows, or a bug with OpenJDK? For the record, the image of the window in the Design tab works fine, and clicking the refresh button works fine too, without causing any issues. The problem only happens when opening the preview window, and then trying to close it.
|
|
|
|
Re: WB causes Eclipse to hang after closing Preview window [message #1698883 is a reply to message #1698807] |
Thu, 18 June 2015 09:48  |
Eclipse User |
|
|
|
All right, I'll try verifying the problem exists on OpenJDK 8 and then file a bug report. I was just wondering because I've only seen this issue pop up when using WB so I thought maybe WB was doing something unusual with window disposal to cause this. If that code has been the same for a while, then it does sound like an OpenJDK bug.
|
|
|
Powered by
FUDForum. Page generated in 0.37081 seconds