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 69062 - [50cat] Leaving error on jsp page causes netbeans to use 100% CPU
Summary: [50cat] Leaving error on jsp page causes netbeans to use 100% CPU
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 5.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2005-11-21 17:50 UTC by ahagopian
Modified: 2005-11-28 19:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
jsp with incomplete tag - warning will probably cause your netbeans to freak out! (1.00 KB, text/plain)
2005-11-21 17:53 UTC, ahagopian
Details
The stack dump (8.97 KB, text/plain)
2005-11-22 14:55 UTC, Petr Pisl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ahagopian 2005-11-21 17:50:49 UTC
[ BUILD # : 200511151900 ]
[ JDK VERSION : 1.5.0_05 ]

When editing a jsp page I used a <jsp:userBean> tag and was able to cause netbeans to completely freak out.  The CPU runs at 100% and netbeans starts using more and more memory.

How it happened was I typed:

<jsp:userBean id="

and forgot the name I was using for a specific id so I went to open a different file.  I noticed after only a few seconds that netbeans was becoming extremely sluggish.  I then looked and netbeans heap (memory gui) was cycling constantly and my cpu was running at 100%.

I then removed the tag and all was fine.

It looks like it can be any tag but it must be right before a jsp scriplet
<c:set var="
<%
int i = 0;
%>


It also looks like if I close the file with the error still there I can never get netbeans to quit running wild.

I noticed that this:

ins3 = java.awt.Insets[top=0,left=0,bottom=0,right=0]

shows up a bunch of times on the console during this error.

Also if I close the file then try to quit netbeans, it takes a very long time for the ide to shutdown.

I will attache a file to reproduce.
Comment 1 ahagopian 2005-11-21 17:53:32 UTC
Created attachment 27110 [details]
jsp with incomplete tag - warning will probably cause your netbeans to freak out!
Comment 2 ahagopian 2005-11-21 18:03:12 UTC
sorry typo:

should read <jsp:useBean>
Comment 3 Miloslav Metelka 2005-11-22 10:15:10 UTC
Reassigning to web module for evaluation.
Comment 4 Petr Pisl 2005-11-22 14:49:14 UTC
This must be a stupid regression.
Comment 5 Petr Pisl 2005-11-22 14:55:43 UTC
Created attachment 27157 [details]
The stack dump
Comment 6 Petr Pisl 2005-11-22 14:56:18 UTC
Marek, I was able to reproduce and I attached the stack dump. According the
stack  it's connected with folding.
Comment 7 Marek Fukala 2005-11-22 15:35:39 UTC
Likely introduced by the JSP folding code redesign (the code has been completely
rewritten).
Comment 8 Marek Fukala 2005-11-22 15:46:55 UTC
This is neither deadlock nor dataloss - its about performance degradation. User
can save his data and restart netbeans. It is also possible to edit the "nasty"
JSP file.
Comment 9 Marek Fukala 2005-11-22 15:51:43 UTC
Minimal version to reproduce:

<jsp:x a="
<%%>"/>

The problem is caused by a problem in JSP's SyntaxElement-s where the next SE
after Tag's SE returns the previous SE as next element => cycle.
Comment 10 Marek Fukala 2005-11-22 16:48:20 UTC
fixed

Checking in JspSyntaxSupport.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JspSyntaxSupport.java,v
 <--  JspSyntaxSupport.java
new revision: 1.77; previous revision: 1.76
done
Comment 11 ahagopian 2005-11-28 19:19:36 UTC
Seems to be running as expected now. Thanks