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 121961 - Netbeans freezes with RegExp Highlighter
Summary: Netbeans freezes with RegExp Highlighter
Status: RESOLVED INCOMPLETE
Alias: None
Product: contrib
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: _ sandipchitale
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-15 07:36 UTC by bennyv
Modified: 2009-09-18 21:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The file with which highlighting works (5.22 KB, text/plain)
2007-11-15 07:37 UTC, bennyv
Details
The file on which Netbeans freezes (44.38 KB, text/plain)
2007-11-15 07:38 UTC, bennyv
Details
Stack trace (14.15 KB, text/plain)
2007-11-15 07:38 UTC, bennyv
Details
Stack trace (14.15 KB, text/plain)
2007-11-15 07:38 UTC, bennyv
Details
messages.log (50.09 KB, text/plain)
2007-11-15 07:40 UTC, bennyv
Details
New stack dump (52.80 KB, text/plain)
2007-11-15 12:08 UTC, bennyv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bennyv 2007-11-15 07:36:23 UTC
I am having problems when using the regexp highlighter plugin.
I am testing a regular exprssions (with more to come) to get a hand of patterns matching. I am using the following 
expression:

([cC][rR][eE][aA][tT][eE]\s*[tT][aA][bB][lL][eE])(\s*\w*)\s*(\(\s*(,?\s*\w*\s*(\w*(\(\d*,?\s*\d*\))?\s*(\w*\s*'?\w*'?)
*))*\s*\);)

on two files ( 6k resp 45k). When testing the 45k file Netbeans freezes.

The steps I tested:

1 Open the 6k file
2 Copy the regexp in the regexp field
3 Push the highlight button
4 The matches are highlighted just fine
5 Open the 45k file
6 Netbeans freezes

Only opening the 45k file and highlighting the matches shows the same behavior.

I will upload the files I am testing with, a stack dump (only partial, what I have been able to capture, please advise 
me on how to capture the complete dump), and the messages.log.
Comment 1 bennyv 2007-11-15 07:37:31 UTC
Created attachment 53022 [details]
The file with which highlighting works
Comment 2 bennyv 2007-11-15 07:38:01 UTC
Created attachment 53023 [details]
The file on which Netbeans freezes
Comment 3 bennyv 2007-11-15 07:38:50 UTC
Created attachment 53024 [details]
Stack trace
Comment 4 bennyv 2007-11-15 07:40:23 UTC
Created attachment 53026 [details]
messages.log
Comment 5 bennyv 2007-11-15 07:42:25 UTC
System information

Product Version: NetBeans IDE 6.0 RC1 (Build 200711111200)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Windows XP version 5.1 running on x86; Cp1252; nl_NL (nb)
Userdir: C:\Documents and Settings\it\.netbeans\6.0rc1
Comment 6 Vitezslav Stejskal 2007-11-15 09:47:18 UTC
Hi, thanks for the report. What plugin are you talking about? Re. thread dumps - you will have to increase the screen
buffer of your console. IIRC you can do that from its properties, it should be in that top-left-corner popup menu on the
cmd window. There is a description how to take full-thread-dumps on wiki.netbeans.org, but I can't get to the website at
the moment.
Comment 7 Vitezslav Stejskal 2007-11-15 10:10:46 UTC
The wiki page is http://wiki.netbeans.org/wiki/view/GenerateThreadDump.
Comment 8 bennyv 2007-11-15 12:02:15 UTC
This is where the plugin can be found in the Plugin Centre:
http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=1105
Comment 9 bennyv 2007-11-15 12:08:13 UTC
I have created a thread dump using jstack as described in the link. I will attach the output
Comment 10 bennyv 2007-11-15 12:08:53 UTC
Created attachment 53034 [details]
New stack dump
Comment 11 Vitezslav Stejskal 2007-11-15 12:58:48 UTC
Thanks for the threaddump. It looks like the IDE was not frozen, it was just performing the match or maybe there is
something wrong with the regex you used, because most of the code in AWT thread runs through java.util.regex.Pattern...
Anyway, the module is contrib/RegExpHighlighter maintained by Sandip, so I'm reassigning this report and CCing Sandip.
Comment 12 _ sandipchitale 2009-09-18 21:02:55 UTC
I will look into it.