This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 197675 - Freezing (deadlock) when entering a GUI builder
Summary: Freezing (deadlock) when entering a GUI builder
Status: RESOLVED INVALID
Alias: None
Product: guibuilder
Classification: Unclassified
Component: App Framework (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P2 normal with 1 vote (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 19:52 UTC by supuhstar
Modified: 2011-05-27 10:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of where NetBeans freezes (199.15 KB, image/png)
2011-04-12 19:52 UTC, supuhstar
Details
A freezing form (23.49 KB, application/zip)
2011-04-13 15:56 UTC, supuhstar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description supuhstar 2011-04-12 19:52:58 UTC
Created attachment 107697 [details]
Screenshot of where NetBeans freezes

NetBeans won't open certain GUI builder forms, but instead freezes on the Designer's "Loading..." screen. It allows me to use other GUI designers, but once I use that one, it will freeze. Several of my projects are now uneditable due to this bug. It also freezes when rename-refactoring any component declared with the GUI builder. Tried using NetBeans 6.9.1 and 7.0, and tried reinstalling and using on other computers. I blame an improperly saved .from file, but I always allow for ample save and compile time.
Comment 1 Tomas Pavek 2011-04-13 08:24:34 UTC
So the IDE is not frozen, just the GUI builder does not finish loading, right? Or is it a deadlock (all frozen)?
If the first case, can you attach the IDE log from a session where this happened (Menu View | IDE Log)? Best would be if you could attach here (or send) a sample project where the freeze can be reproduced.
Comment 2 supuhstar 2011-04-13 15:56:24 UTC
Created attachment 107725 [details]
A freezing form

It is a full deadlock, and it now encompasses ALL premade forms. It now only does not freeze on new ones. Attached is my latest toy, which I can't work with, anymore. It won't compile, because I haven't sent my library with it, but you should still be able to play with the GUI builder
Comment 3 Tomas Pavek 2011-04-14 08:25:45 UTC
If it is a deadlock, then it is likely bug #187697, i.e. a JDK bug. What is your JDK version? It's in Java 6 u21 and u22. It should be fixed since u23. If you have u23 or newer, then it is something else and we'd need a thread dump. See http://wiki.netbeans.org/GenerateThreadDump.
Comment 4 supuhstar 2011-04-15 06:45:28 UTC
I use Java JDK 1.6_23, and sometimes 1.7.0 just to see if there are any forwards-compatibility issues
Comment 5 supuhstar 2011-04-18 19:50:37 UTC
(In reply to comment #3)
> See http://wiki.netbeans.org/GenerateThreadDump.

I have attempted a Thread Dump before and during deadlock. No anomalies before deadlock, but after, I get this message:

Found one Java-level deadlock:
=============================
"BHFrame.initComponents():  Setting up custColorsEditDialog":
  waiting to lock monitor 0x089178d4 (object 0x1ae148f8, a javax.swing.MultiUIDefaults),
  which is held by "AWT-EventQueue-1"
"AWT-EventQueue-1":
  waiting to lock monitor 0x0868f6ec (object 0x1a310f18, a java.awt.Component$AWTTreeLock),
  which is held by "BHFrame.initComponents():  Setting up custColorsEditDialog"
Comment 6 Jan Stola 2011-04-20 16:59:22 UTC
I am sorry, I am still not able to reproduce this issue. The attached project is not useful without the library that is uses. The GraphicalUserInterface form there can be opened with the only obvious problem - GUI Builder complains that it cannot find BHFrame class. While the deadlock seems to be specific to BHFrame class, the attached project doesn't provide any clues on where the problem is.

The information about the deadlock are also insufficient. Please, provide a full thread dump of the deadlocked application.

It would be ideal to attach a reproducible test-case. Thank you in advance.
Comment 7 supuhstar 2011-04-22 17:56:40 UTC
Through analyzation of the deadlock, I came to the conclusion that it originated from a thread I started within the initComponents() method of the BHFrame class (which was also built with the GUI builder) in order to decrease program startup time. The thread waits for AWT-EventQueue-1 to complete, but AWT-EventQueue-1 is waiting for it to complete. The problem was solved by removing the thread.
Comment 8 origin_of_symmetry 2011-05-27 09:41:25 UTC
I'm havin the same problem. Nearly all the GUI forms built with 6.9 can't be opened in 7.0 any more. The IDE just freezes on loading the form.

Is there any default way to fix this? I have no custom threads in there, just plain "normal" TopComponents, so I guess it's some kind of problem with backwards- compatibility of GUI- forms?!
Comment 9 Jan Stola 2011-05-27 09:55:56 UTC
> I'm havin the same problem.

No, you don't have the same problem. This issue was about deadlock caused by  supuhstar's custom code/component which I doubt you are using ;o). Please, don't reopen this issue, fill a separate issue for your problem instead.

> Nearly all the GUI forms built with 6.9 can't be opened in 7.0 any more.
> The IDE just freezes on loading the form.

Please, attach a thread dump showing the details of the freeze. It would also help to mention what JDK you are using. There was one regression in JDK that caused this kind of problems, see issue 187697 (and its duplicates).