Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » WB causes Eclipse to hang after closing Preview window
WB causes Eclipse to hang after closing Preview window [message #1698739] Wed, 17 June 2015 14:35 Go to next message
Anirudh Bagde is currently offline Anirudh BagdeFriend
Messages: 3
Registered: June 2015
Junior Member
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 16:20 Go to previous messageGo to next message
Anirudh Bagde is currently offline Anirudh BagdeFriend
Messages: 3
Registered: June 2015
Junior Member
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 #1698807 is a reply to message #1698766] Thu, 18 June 2015 01:52 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
I seriously doubt this has anything to do with WB. The code you are referencing has not changed in many years and has worked just fine for tens of thousands of users. This appears to be an OpenJDK bug of some sort. The fact that it works in Oracle Java (e.g., official Java) pretty much demonstrates that. I don't see anything in the WB code that we would change here.
Re: WB causes Eclipse to hang after closing Preview window [message #1698883 is a reply to message #1698807] Thu, 18 June 2015 13:48 Go to previous message
Anirudh Bagde is currently offline Anirudh BagdeFriend
Messages: 3
Registered: June 2015
Junior Member
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.
Previous Topic:Window Builder causes a copy of the project to run, and it will not close?
Next Topic:WB Fails to render custom component with NoDefClassFoundException
Goto Forum:
  


Current Time: Thu Apr 25 01:55:26 GMT 2024

Powered by FUDForum. Page generated in 1.23511 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top