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 197982 - NullPointerException at org.netbeans.modules.form.RADComponent$8.run
Summary: NullPointerException at org.netbeans.modules.form.RADComponent$8.run
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-22 04:10 UTC by peijifeng
Modified: 2011-04-27 13:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 178459


Attachments
stacktrace (6.13 KB, text/plain)
2011-04-22 04:10 UTC, peijifeng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peijifeng 2011-04-22 04:10:06 UTC
Build: NetBeans Platform 7.0 (Build 201104080000)
VM: Java HotSpot(TM) Client VM, 19.1-b02, Java(TM) SE Runtime Environment, 1.6.0_24-b07
OS: Windows 7

User Comments:
peijifeng: rename the instance variable name




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.form.RADComponent$8.run(RADComponent.java:1454)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
   at java.awt.EventQueue.access$000(EventQueue.java:85)
   at java.awt.EventQueue$1.run(EventQueue.java:603)
   at java.awt.EventQueue$1.run(EventQueue.java:601)
Comment 1 peijifeng 2011-04-22 04:10:10 UTC
Created attachment 107895 [details]
stacktrace
Comment 2 Jan Stola 2011-04-22 13:10:37 UTC
I am sorry, I am not able to reproduce this problem and the stack-trace of the exception is not sufficient to track the problem down. Could you, please, provide more details? Thank you in advance.

Are you able to reproduce this exception reliably or it happened just once? Are you able to provide exact steps to reproduce? How did you rename the variable? Using GUI desginer's 'Change Variable Name' action or using 'Refactor > Rename' in Navigator? Did you have the file opened in the GUI designer?
Comment 3 Jan Stola 2011-04-26 08:56:03 UTC
Response from the reporter:

My step is :
1, select the source file,  right click the file, and click edit , go straight to source code .
2, Ctrl+R rename some Variable Name, e.g. " jButton1" to "jButtonOk".

After some investigation, I find the problem has related one costumed Swing component, 
If opened the file using GUI designer first, then go to source code mode,  Ctrl+R rename action is OK.
but if opened the file to source code directly, Ctrl+R rename action result in the problem.

And I check the problem in netbeans 6.9 using the same file,  no this problem report.
Comment 4 Jan Stola 2011-04-26 09:00:23 UTC
> I find the problem has related one costumed Swing component, ...

If I understand correctly then it is not a general problem. Does it happen with some specific form only? Are you able to reproduce this problem with some form reliably? If so, could you, please, attach some form (both .java and .form files) that I can use to reproduce this issue? Thank you in advance.
Comment 5 Jan Stola 2011-04-27 13:12:46 UTC
I was able to reproduce this issue with the test-case provided by the reporter. The form must contain a component that returns 'null' from getAccessibleContext(). Maybe there are some additional requirements (like no property modified), but the root of the problem is clear: we attempt to remove accessibility properties from propertySets that were not initialized yet.
Comment 6 Jan Stola 2011-04-27 13:23:32 UTC
Fixed.

Modified file: http://hg.netbeans.org/jet-main/rev/931453c8e47a