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.
Build: NetBeans IDE Dev (Build 071102) VM: Java HotSpot(TM) Client VM, 1.5.0_12-b04 OS: Linux, 2.6.22-14-generic, i386 User Comments: Just closed a couple of projects.
Created attachment 52399 [details] stacktrace
Looks like a race condition introduced by fix of issue #106082. I would recommend simplifying code: private final PropertyChangeSupport support; LS(...) { // ... support = new PropertyChangeSupport(this); searchScopeRegistry.addChangeListener(WeakListeners.change(this, searchScopeRegistry)); enabled = searchScopeRegistry.hasApplicableSearchScope(); } void addPCL(l) { support.addPCL(l); } void removePCL(l) { support.removePCL(l); } Besides the race condition, the current code looks like it could be a memory leak anyway, if FIFA.LS.rPCL is never called for whatever reason.
I will try to fix this for NB 6.0.
Fixed in the trunk. I did not do the suggested changes because: a) field 'support' is also used as an indication whether there is some listener registered b) I am sure FIFA.LS.rPCL is called - the NullPointerException would never be thrown if it was not called The change I made just changes the code such that when stateChanged() is called, the list of currently registered listeners is stored and this list is later used for actual notification. This guarantees that the NullPointerException is never called and that the correct list of listeners is called. Modified file: utilities/src/org/netbeans/modules/search/FindInFilesAction.java (1.9) Diff: http://deadlock.netbeans.org/fisheye/browse/netbeans/utilities/src/org/netbeans/modules/search/FindInFilesAction.java?r1=1.8&r2=1.9