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 227405 - Class Copy and Paste-> Refactor hangs ui after refactoring - when the JPanel has specific border
Summary: Class Copy and Paste-> Refactor hangs ui after refactoring - when the JPanel ...
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.3
Hardware: PC Linux
: P2 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-13 10:30 UTC by honza.hubeny
Modified: 2013-06-05 09:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test case for the bug (13.03 KB, application/gzip)
2013-03-13 10:30 UTC, honza.hubeny
Details
thread-dump (23.82 KB, text/plain)
2013-03-19 17:48 UTC, Marian Mirilovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description honza.hubeny 2013-03-13 10:30:03 UTC
Created attachment 132551 [details]
test case for the bug

I have one class NewJPanel which extends javax.swing.JPanel. I change the  border of this panel from no border to CompoundBorder with InsideBorder set to EmptyBorder (insets 2,2,2,2) and OutsideBorder set to EtchedBorder. After adding border I Copy the class NewJPanel to clipboard and try to Paste -> Refactor Copy the class to the package javaapplication1. After clicking on the Refactor button in the dialog the new file NewJPanel1 is created and opened in the UI. However, the modal Refactor dialog hangs and the whole ui as well. After reopening the IDE, the refactored class in fully functional. 

In the attachment is the simple project on which you can reproduce the hang. The names in the problem description are used in the test case.

Further, this bug is probably duplicate of 186559 or 189977, but I am not sure.

This refactoring is not working on 7.3 and 7.2 as well.
Comment 1 Marian Mirilovic 2013-03-19 17:48:34 UTC
Created attachment 132795 [details]
thread-dump

I was able to 100% reproduce the hang with final NB 7.3 on Linux Ubuntu 12.10 x64 & JDK7u17
Comment 2 Tomas Pavek 2013-06-04 15:00:32 UTC
One cause of the deadlock is over-synchronized event firing on FormModel, the other cause is that some border properties are created in the "LAF block" (which needs AWT lock) out of EDT by the form refactoring support (to re-generate code).

http://hg.netbeans.org/jet-main/rev/90baf5870a59
Comment 3 Quality Engineering 2013-06-05 09:36:37 UTC
Integrated into 'main-golden', will be available in build *201306050626* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bc782b46fac7
User: Tomas Pavek <tpavek@netbeans.org>
Log: #227405: make sure border properties are created when loaded, not to get created during code generation (which may run out of EDT)