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.
This bug was originally marked as duplicate of bug 154894, 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.2 (Build 201207171143) VM: Java HotSpot(TM) Client VM, 20.8-b03, Java(TM) SE Runtime Environment, 1.6.0_33-b05 OS: Windows 7 User Comments: GUEST: Searching in all projects with regular expression: count(\n|.)*order GUEST: Searching all projects with regular expression: count(\n|.)*order GUEST: alterando propriedades do projeto, bibliotecas GUEST: Testing this regex on find: "for(\n|.)*" Stacktrace: java.lang.StackOverflowError at org.netbeans.modules.search.matcher.BufferedCharSequence$Sink$Buffer.access$1000(BufferedCharSequence.java:712) at org.netbeans.modules.search.matcher.BufferedCharSequence$Sink.charAt(BufferedCharSequence.java:662) at org.netbeans.modules.search.matcher.BufferedCharSequence.getCharAt(BufferedCharSequence.java:443) at org.netbeans.modules.search.matcher.BufferedCharSequence.charAt(BufferedCharSequence.java:297) at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366) at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
Created attachment 129452 [details] stacktrace
The StackOverflowError is caused by regexp matcher, which probably tries to find occurrences of the pattern in a very long string. I think that catching this exception is quite risky and it's better to display it. As a workaround, try using reluctant quantifiers, e.g. count(\n|.)*?order. You can also try to increase java stack size (in netbeans.conf change -J-Xss2m to -J-Xss4m, for example). Thanks for understanding.