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 130354

Summary: NullPointerException at org.netbeans.spi.project.ui.support.NodeFactorySupport$DelegateChildren.addNotify
Product: projects Reporter: _ pcw <pcw>
Component: Generic Projects UIAssignee: Milos Kleint <mkleint>
Status: RESOLVED FIXED    
Severity: blocker CC: t_h
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=27861
Issue Type: DEFECT Exception Reporter: 27861
Bug Depends on: 193065    
Bug Blocks:    
Attachments: stacktrace

Description _ pcw 2008-03-18 02:00:25 UTC
Build: NetBeans IDE Dev (Build 080313)
VM: Java HotSpot(TM) Client VM, 10.0-b19
OS: SunOS, 5.10, x86

User Comments: 
Opened a project node that was closed.
Comment 1 _ pcw 2008-03-18 02:00:34 UTC
Created attachment 58534 [details]
stacktrace
Comment 2 Milan Kubec 2008-03-18 09:25:31 UTC
I don't know how the result could be null (lazy project loading?). Milosi, you know more about this code than I do. 
Comment 3 Milos Kleint 2008-03-18 09:54:51 UTC
the only way to get the NPE in this place is the situation when removeNotify() is called within the time the addNotify()
call is processing.
Comment 4 Milos Kleint 2008-03-18 11:34:18 UTC
fixed the immediate problem by synchronization. On a more general level, it's questionable if removeNotify() shall be
allowed to execute while addNotify() is running.
http://hg.netbeans.org/main/rev/1f70f13bd8f8