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 6.0 Beta 2 (Build 200710212201) VM: Java HotSpot(TM) Client VM, 1.5.0_07-87 OS: Mac OS X, 10.4.10, i386 User Comments: I was doing a search and replace in all files in a Ruby on Rails project. After I clicked "Replace" the "Search Results" pane said: "The following issues were encountered while replacing:" but nothing else.
Created attachment 52301 [details] stacktrace
Marku can you evaluate for me? Thanks...
It looks like race condition. Unfortunately it is not possible to say what JList instance it is ie. who/what module is its owner. NPE comes from null ListModel. It can be caused either by creating JList with null input data or reseting ListModel to null later. Please is there any steps/situation how to reproduce this problem? This way we could identify responsible JList instance and its owner.
Was it action Edit -> Replace in Projects? Is it reproducible? What was filed in combo boxes? What project? Some nb project or your own?
It was actually "Edit" -> "Replace in Projects..." I was doing a search for 'potential_merchant' and replacing it with 'contact' (without the quotes, of course). File Name Patterns was blank (all files), none of the options (Whole Words, Case Sensitive, Regular Expression) were selected, and the scope was set to "Open Projects," though I only have one project open. It was reproducible at the time, and I was able to get it to work by entering a file pattern. Hope that helps.
Sorry that last statement wasn't very clear. The problem occurred consistently when I didn't use a file pattern. I was able to get the search and replace to work properly when I entered a file pattern. Note: I did a search for one file pattern at a time. Also, if it matters, there were some really large log files in my project (5MB+), though I don't think they were causing the problem.
Passing to utilities for evaluation if there is any JList used in Replace in Projects dialog.
I tried to patch JList to see who calls this JList constructor but I did not get any log ie. I did not go through this code even if I called Replace in Projects. So it seems it is not caused by this project? Can I ask you to patch JList compile it and run it with your IDE? I will send you detailed description is separate email. I do not see any other chance how we could find corresponding code which creates this JList.
Yes, I can still reproduce the problem, so go ahead and send me the info to patch JList.
With patched JList we was able to find out that utilities/search call JList(Object []) constructor with null input parameter. Read javadoc it is not allowed and results in this behavior. I attach call stack.
Created attachment 52635 [details] Call stack for JList(Object []) constructor with null input
Build: NetBeans IDE 6.0 (Build 200711261600) VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05 OS: Linux, 2.6.22-14-generic, i386 User Comments:
Created attachment 54428 [details] stacktrace
Created attachment 54429 [details] stacktrace
Build: NetBeans IDE 6.0 (Build 200711261600) VM: Java HotSpot(TM) Client VM, 1.6.0_01-b06 OS: Windows XP, 5.1, x86 User Comments:
Created attachment 54479 [details] stacktrace
Created attachment 54480 [details] stacktrace
Build: NetBeans IDE 6.0 (Build 200711261600) VM: Java HotSpot(TM) Client VM, 1.5.0_06-b05 OS: Windows XP, 5.1, x86 User Comments:
Created attachment 54491 [details] stacktrace
Created attachment 54492 [details] stacktrace
Build: NetBeans IDE 6.0 (Build 200711261600) VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05 OS: Windows XP, 5.1, x86 User Comments: error ocurred while replacing text in project.
Created attachment 54846 [details] stacktrace
Build: NetBeans IDE 6.0 (Build 200711261600) VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05 OS: Windows XP, 5.1, x86 User Comments:
Created attachment 54847 [details] stacktrace
Is anybody able to reproduce this reliably? Possibly describe the steps or send IDE log? Looking at the code, it seems the only way the JList with null data can be created is that the replace task is interrupted with an uncaught exception (i.e. ReplaceTask ends up with null 'resultStatus' and empty 'problems' which Manager.notifyReplaceFinished treats as finished with issues - a theory). We can easily avoid the problem with JList, but would be good to find the causing problem as well (which would remain ther otherwise). Meanwhile I've implemented a quick fix to avoid the JList problem. http://hg.netbeans.org/main/rev/41cbe8f7d532