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 228813

Summary: NullPointerException at org.netbeans.modules.form.ResourceSupport.makeResource
Product: guibuilder Reporter: Exceptions Reporter <exceptions_reporter>
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 200112
Attachments: stacktrace

Description Exceptions Reporter 2013-04-21 12:49:27 UTC
This bug was originally marked as duplicate of bug 147647, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.3 Beta 2 (Build 201211062253)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_17-b02
OS: Windows 8

Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.form.ResourceSupport.makeResource(ResourceSupport.java:203)
   at org.netbeans.modules.form.RADComponent.resourcePropertyConvert(RADComponent.java:1782)
   at org.netbeans.modules.form.RADComponent$PropertyListenerConvertor.convert(RADComponent.java:1772)
   at org.netbeans.modules.form.FormProperty.convertValue(FormProperty.java:970)
   at org.netbeans.modules.form.FormProperty.setValue(FormProperty.java:296)
   at org.openide.explorer.propertysheet.SheetTable.checkEditBoolean(SheetTable.java:1269)
Comment 1 Exceptions Reporter 2013-04-21 12:49:28 UTC
Created attachment 133632 [details]
stacktrace
Comment 2 Tomas Pavek 2013-08-23 16:15:10 UTC
Really don't know how this happened. It looks like if there was a property sheet editing a form that is not opened (or a component from such a form), which is normally not possible.

The actions log shows some refactoring was done, and while I can see that the form closing and reopening that may happen during the refactoring is potentially suspicious for leading to such a state, I was not able to reproduce it. I remember some cases that allowed to let the explicitly opened Properties window stay opened after closing a form, but that was fixed already time ago. Also don't see how the main Properties window, that listens to global selection, could keep showing the old form properties after the form is reloaded in designer. I can see it to refresh reliably on form reloading. But it was probably something like that, the reloading due to refactoring is not obvious - the opened GUI form is still there, if the property sheet still edits the already closed form is definitely not visible.

So I'm seeing everything behave correctly, and while I can't say for sure if there is not some race condition bug, it could be on various places. I'm going to add a null check for this case, though if this happens other problems can be expected. Maybe the reason for this is not that serious (something I don't see) and then the check would be quite appropriate. In either case we have only one report from 7.3beta of this kind now.

http://hg.netbeans.org/jet-main/rev/d624dd6e271e