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.
Show All Details action can easily consume all available heap ending with OutOfMemoryError. Simply create a large result set of Find in Files, e.g. by searching for "core" word in nb_all/core directory. So far so good. The memory consumption at this moment is reasonable, memory meter shows 26MB. Click Show All Details and wait a while. The action tries to populate Output window with entries for all the found occurences and quickly consumes all of the 96MB of heap space. After closing the exception dialog you can clear the output window and decrease the heap usage back to where it was. This action should be able to prevent OutOfMemoryError by detecting the issue early and stopping before all heap is consumed, or by limiting the output size some way...
Accepted.
It is not possible to substantially reduce memory consumption for the sole operation Show All Details without breaking API compatibility. So we will limit the size of a result set to maximum 500 found nodes.
Fixed in the trunk. Number of found objects is limited now - when 500 objects are found, searching is stopped and a the root node of the Search Results window contains a message that searching was stopped. The message needs to be polished.
Modified files: utilities/src/org/netbeans/modules/search/Bundle.properties (1.26) utilities/src/org/netbeans/modules/search/ResultModel.java (1.40) utilities/src/org/netbeans/modules/search/SearchTask.java (1.8)
On my mashine, the out of memory excetion pops up when showing details for a 500 entries search result. Please either lower the limit or find out another solution. Steps to reproduce: 1)Search DebuggerJDPA for "a" 2)After it reaches the 500 limit, invoke Show All Details result: exception is thrown, somtimes nothing is displayed in the output. --------------------------- Solaris 10 running on Sparc dev200507181000 JDK 1.5.0_01
Created attachment 23158 [details] exc trace
Fixed in the trunk. I made a change such that not only number of found nodes is limited (limit 500) but also number of found occurences is limited (limit 5000). If either of these limits is reached, the search is stopped. Modified files: /utilities/src/org/netbeans/modules/search/: ResultModel.java ResultTreeChildren.java Bundle.properties /utilities/src/org/netbeans/modules/search/types/: FullTextType.java Diffs: http://utilities.netbeans.org/source/browse/utilities/src/org/netbeans/modules/search/ResultModel.java?r1=1.49&r2=1.50&diff_format=u http://utilities.netbeans.org/source/browse/utilities/src/org/netbeans/modules/search/ResultTreeChildren.java?r1=1.12&r2=1.13&diff_format=u http://utilities.netbeans.org/source/browse/utilities/src/org/netbeans/modules/search/Bundle.properties?r1=1.32&r2=1.33&diff_format=u http://utilities.netbeans.org/source/browse/utilities/src/org/netbeans/modules/search/types/FullTextType.java?r1=1.49&r2=1.50&diff_format=u