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 142504 - IDE Freezes using the JSP Editor
Summary: IDE Freezes using the JSP Editor
Status: RESOLVED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP Parser (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker with 1 vote (vote)
Assignee: Tomas Mysik
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2008-08-01 00:56 UTC by tlangehaug
Modified: 2008-10-08 10:12 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump taken freeze (30.80 KB, text/plain)
2008-08-01 00:57 UTC, tlangehaug
Details
Thread Dump from Development Release (39.95 KB, text/plain)
2008-08-06 18:05 UTC, tlangehaug
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tlangehaug 2008-08-01 00:56:00 UTC
Whenever I am inside the JSP Editor attempting o use the expression languages to get the value of an Object's attribute
the IDE completely freezes.  I am using version 6.1 and had this problem constantly in 6.0.  This is the first time that
this error occurred for me in 6.1, but now it happens continuously.
Comment 1 tlangehaug 2008-08-01 00:57:06 UTC
Created attachment 66232 [details]
Thread dump taken freeze
Comment 2 Vitezslav Stejskal 2008-08-01 11:22:00 UTC
Looks like "JSP Parsing" has not finished and is blocking all the other things. TagLibParseSupport is also suspicious.
The code completion should either say 'Scanning in progress...' or return results, but it should not block AWT until the
scanning is done. Or maybe I'm completely off the track.
Comment 3 Marek Fukala 2008-08-06 13:13:38 UTC
You are right Vito, the EL completion should not be blocked by the parser. OTOH under normal circumstances the parser
result is almost fully cached and the query for parser results shoul not take more then hundret milliseconds.

This issue seems to be about the jsp parsing taking too long time. There were/are some issues regarding this problem.
Tomas Mysik knows more.
Comment 4 Tomas Mysik 2008-08-06 13:31:16 UTC
Not sure Marku, I don't know anything about code completion...

To reporter:
Is it reproducible in the NB development build please? Thanks.
http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/artifact/nbbuild/dist/zip/

What are the exact steps to reproduce - does it apply for all the Web projects or only for some of them? Are you able 
to attach some sample project I can play with? Thanks.
Comment 5 tlangehaug 2008-08-06 18:04:22 UTC
I was able to reproduce the error in the development build and will attach a thread dump immediately following this message.

I am unable to post a sample project at the moment because a lot of it is involved with work, but here's the gist of
what specifically I am doing that causes the error.  Maybe later this week I can re-create the problem in a sample project.

1) I have a custom bean that I created to store information.
2) I have a custom tag that I wrote which puts that bean into existence on the JSP page.
3) I am trying to access that bean following it's creation using the EL. I.e. I will say "${basicHealth." and then it
freezes

This happens regardless of whether I use the <jsp:useBean> tag to declare that the bean or not.
Comment 6 tlangehaug 2008-08-06 18:05:19 UTC
Created attachment 66721 [details]
Thread Dump from Development Release
Comment 7 Tomas Mysik 2008-08-06 20:51:51 UTC
Thanks, I will look at it.
Comment 8 Marek Fukala 2008-08-07 08:43:07 UTC
>Not sure Marku, I don't know anything about code completion...
The point was that the completion waits for the parser result which seems to take too long time (which is I belive your
area).
Comment 9 Marek Fukala 2008-08-07 08:45:54 UTC
"JSP Parsing" daemon prio=10 tid=0x039d9800 nid=0x14a4 runnable [0x3312e000..0x3312fa94]
   java.lang.Thread.State: RUNNABLE
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:114)
	at java.util.jar.JarFile.<init>(JarFile.java:133)

Tomasi - isn't it the same issue you were solving at the beginning of this week by reverting the classloader change?
AFAIR the  stack was the same. Now the user just have slightly different usecase. Maybe I am completely wrong, just
trying to help...
Comment 10 Tomas Mysik 2008-08-07 09:20:50 UTC
> Tomasi - isn't it the same issue you were solving at the beginning of this week by reverting the classloader change?
> AFAIR the  stack was the same. Now the user just have slightly different usecase. Maybe I am completely wrong, just
> trying to help...

I hope that it's the same issue - but reporter is able to reproduce in NB dev builds. Anyway I need to reproduce and 
investigate what happens. My comment was regarding TagLibParseSupport Vita mentioned.
I appreciate your help, Marku, really.
Comment 11 Tomas Mysik 2008-08-12 12:36:41 UTC
Would it be possible to create a sample project I could play with? Thanks a lot.
Comment 12 Jindrich Sedek 2008-08-15 14:16:31 UTC
I'm trying to create a simple project with few beans and invoking the cc for the attributes as described by reporter, 
but it works well and fast for me. 

Reporter, how big project are you using? how many libraries, do you have? do you use JSF for managing beans? Thanks for 
any suggestion that would help us to reproduce the problem.
Comment 13 tlangehaug 2008-08-15 19:20:50 UTC
I do not use JSF for managing beans.

The project which I am using has approximately 80 JSP files and is making use of 3 custom tag libraries.

Additionally, it looks like there are about 10 libraries which are included.  JSP Editor does not fail on all of my
pages only on some :\.  I wish I had more time to work on getting a broken sample project out, but I am extremely busy
with work.

I tried recreating my netbeans project from just the sources in case it was corrupted, but the JSP editor still crashes
in the new project.
Comment 14 Tomas Mysik 2008-08-16 09:10:13 UTC
tlangehaug, I'm afraid that if the issue is not reliable reproducible for us and if the problem is visible for you 
only in some pages, then we really need some sample project. Otherwise it is really hard to investigate what is 
wrong...

Just to be sure - is the issue reproducible for you in NB 6.5 Beta?
Thanks a lot for your cooperation.
Comment 15 Tomas Mysik 2008-08-20 12:18:03 UTC
Sorry, I have to mark this issue as INCOMPLETE because we really need some sample project. But we will try to 
reproduce your issue using some real, existing project (with similar setup, if possible) - Jindro, thanks a lot for 
doing that.
Comment 16 Jindrich Sedek 2008-10-07 13:49:53 UTC
I've tried project with about 5 tag libraries, 20 tags and few beans, but I'm not able to reproduce any deadlock.
Comment 17 Tomas Mysik 2008-10-08 10:12:21 UTC
Closing this issue because we are not able to reproduce the problem. Feel free to reopen if you have an example 
project we can use to reproduce. Thanks a lot for reporting.