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 202762 - AssertionError at org.netbeans.modules.nbform.FormDesignerTC.loadForm
Summary: AssertionError at org.netbeans.modules.nbform.FormDesignerTC.loadForm
Status: RESOLVED WORKSFORME
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0
Hardware: All All
: P4 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-28 05:10 UTC by MackSix
Modified: 2015-09-15 16:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 181448


Attachments
stacktrace (4.53 KB, text/plain)
2011-09-28 05:10 UTC, MackSix
Details
Project (20.99 KB, application/octet-stream)
2011-10-01 14:42 UTC, MackSix
Details
messages.log file (51.97 KB, text/plain)
2011-10-01 14:43 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2011-09-28 05:10:54 UTC
Build: NetBeans IDE Dev (Build 201109260601)
VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows Vista

User Comments:
MackSix: Created a JFrame Form in <Default Pacakage> by mistake and then drag and drop it to the correct package and recieved this AssertionError.




Stacktrace: 
java.lang.AssertionError
   at org.netbeans.modules.nbform.FormDesignerTC.loadForm(FormDesignerTC.java:271)
   at org.netbeans.modules.nbform.FormDesignerTC.access$300(FormDesignerTC.java:86)
   at org.netbeans.modules.nbform.FormDesignerTC$PreLoadTask$1.run(FormDesignerTC.java:263)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
   at java.awt.EventQueue.access$000(EventQueue.java:101)
Comment 1 MackSix 2011-09-28 05:10:59 UTC
Created attachment 111262 [details]
stacktrace
Comment 2 MackSix 2011-09-28 05:22:22 UTC
This is repeatable. Each time I create a new JFrame or JPanel form in <default package> and then drag and drop it to another package, I get this AssertionError.
Comment 3 Jan Stola 2011-10-01 14:04:17 UTC
I am sorry, I am not able to reproduce this problem. I must be doing something in a different way. Are you still able to reproduce it? If so, could you, please, describe _exact_ steps to reproduce. Thank you in advance.

Do you use refactoring when you are "correcting" the package? Do you leave the form opened? If so, do you leave it with Design or Source shown? etc.
Comment 4 MackSix 2011-10-01 14:40:33 UTC
Use the project I uploaded.

If I do not have any existing project files open in editor, the error does not occur.

1. Open attached project.

2. Open both JavaApplication4.java and  NewJFrame.java source files in editor. (Leave the NewJFrame.java open in design view.)

3. Right click on "Source Packages" in Projects Window and then New>>JFrame Form.

4. Change Class Name to NewJFrame2 and click "Finish". (NewJFrame2 should now be open in design view.)

5. Drag and Drop NewJFrame2 from <default package> to javaapplication4 package.

6. Choose "Refactor" button on pop-up.

If I restart NetBeans before moving NewJFrame2, it pops up the exception dialog box very fast and I can hardly see it, but it records it in messages.log.

I will upload messages.log file.
Comment 5 MackSix 2011-10-01 14:42:18 UTC
Created attachment 111397 [details]
Project
Comment 6 MackSix 2011-10-01 14:43:07 UTC
Created attachment 111398 [details]
messages.log file
Comment 7 Jan Stola 2011-10-01 15:25:16 UTC
I am sorry, I am still not able to reproduce this issue. I used Windows and NetBeans build from September 26th (i.e., the environment that you used when you reported this exception for the first time).

I did the following steps:
1. Downloaded and expanded the attached project.
2. Deleted non-portable nbproject/private directory.
3. Started the mentioned NetBeans build with a new user directory.
4. Opened the mentioned project.
5. Double-clicked JavaApplication4.java to open it.
6. Double-clicked NewJFrame.java to open it.
7. Created NewJFrame.java in a default package according to
   point 3 of your description.
8. Selected the newly created form and invoked Refactor > Rename,
   entered NewJFrame2 and pressed Refactor.
9. Moved NewJFrame2 into javapplication4 according to
   points 5 and 6 of your description.

Everything worked fine. Could you, please, tell me what steps
are you doing in a different way to obtain the exception?
Comment 8 MackSix 2011-10-01 17:42:51 UTC
I found the culprit.

ESET Smart Security 4.2.71.2 real-time file system protection running causes it to happen. I disable it, and no error.

There is no problem with NetBeans 7.0.1 with it running.
Comment 9 Tomas Pavek 2015-09-15 16:11:03 UTC
I guess this bug can be closed.