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 147430 - IDE hangs when trying to code complete
Summary: IDE hangs when trying to code complete
Status: RESOLVED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2008-09-16 22:35 UTC by setdosa
Modified: 2008-09-22 13:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages log file (61.06 KB, text/plain)
2008-09-16 22:35 UTC, setdosa
Details
correct messages file (64.95 KB, text/plain)
2008-09-17 14:43 UTC, setdosa
Details
Thread dump (26.64 KB, text/plain)
2008-09-17 15:28 UTC, setdosa
Details
jsp file (4.43 KB, text/plain)
2008-09-17 20:06 UTC, setdosa
Details
Thread dump (25.76 KB, text/plain)
2008-09-19 17:42 UTC, setdosa
Details
There were 2 java processes running. this is the other one (27.42 KB, text/plain)
2008-09-19 17:43 UTC, setdosa
Details
messages log file (66.36 KB, text/plain)
2008-09-19 17:44 UTC, setdosa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description setdosa 2008-09-16 22:35:16 UTC
I was trying to insert <%@page import. I typed in <%@ and page showed in the drop down and then when I selected it the
IDE froze. It happened again when I killed the process and started it.

Have attached the messages.log file. It says something about Invalid Locks in the tags formatter
Comment 1 setdosa 2008-09-16 22:35:47 UTC
Created attachment 69986 [details]
messages log file
Comment 2 Petr Chytil 2008-09-17 07:28:24 UTC
reassigning to jsp editor for evalutation
Comment 3 Marek Fukala 2008-09-17 07:44:29 UTC
Can you please attach a threaddump if the issue is reproducible? BTW I do not see anything about locks in the messages.log.
Comment 4 setdosa 2008-09-17 14:43:33 UTC
Created attachment 70038 [details]
correct messages file
Comment 5 setdosa 2008-09-17 14:45:04 UTC
Mfukala, how do i attach the thread dump? Even so when the IDE is frozen. The issue is definitely reproducible.
Comment 6 Marek Fukala 2008-09-17 14:50:48 UTC
http://wiki.netbeans.org/GenerateThreadDump
Comment 7 setdosa 2008-09-17 15:28:18 UTC
Created attachment 70045 [details]
Thread dump
Comment 8 Marek Fukala 2008-09-17 18:29:13 UTC
The AWT thread is in runnable state and is reformatting the document. Does the reformatting ends after some time or is
it endless?

I cannot reproduce the issue in recent dev builds, there has been some changes to the reformatting done recently. OTOH
they shouldn't influence this problem. 

Is the problem reproducible on any JSP file in any context, or just in a specific file/place? If the second option is
true, can you attach the file and decribe where is the exact place in the document the problem happen? 

Thanks for your input.
Comment 9 setdosa 2008-09-17 20:06:59 UTC
Created attachment 70057 [details]
jsp file
Comment 10 setdosa 2008-09-17 20:18:41 UTC
I havent had it happen anywhere else. Even in the same file which I managed to write that code without invoking the auto
complete, if I leave that line and do the same thing on the next line it works. but when I delete the line and try it to
do it with the code complete it freezes. I will attach the file.
Comment 11 setdosa 2008-09-17 20:20:11 UTC
Its line number 9. Sorry, missed that information last time
Comment 12 Marek Fukala 2008-09-18 09:22:20 UTC
It works for me on latest dev build. 

My steps:
1) open the P15-expectationCV.jsp file
2) delete content of line 9
3) at the beginning of the line type <%@
=> completion opens
4) confirm the first item
=> code is completed, no CPU activity, do deadlock

Can you try it od a newer daily build please?
Comment 13 Tomasz Slota 2008-09-18 13:03:57 UTC
I am not able to reproduce either...
Comment 14 setdosa 2008-09-18 14:35:25 UTC
Is there a way to run netbeans 6.5 beta in debug mode or something. I can provide you guys with more information if you
want.
Comment 15 Marek Fukala 2008-09-18 15:07:01 UTC
setdosa, it would help if you download a daily build of 6.5 and check if the problem is still there.

tslota, maybe you could try to reproduce on 6.5 beta so you would at least know what 'was' the problem.
Comment 16 setdosa 2008-09-19 17:32:05 UTC
I am downloading the latest nightly build and am gonna run it. But before I forget I ran the test again on the beta and
this is what you have to do to reproduce the freeze
1. Open the file
2. go to first column or line 9, shift+end and delete. 
3. Press backspace which will take you to previous line.
4. press enter and then type <% and from the drop down select page. press enter and the IDE freezes 

Will attach the messages.log file which has the lock message
Comment 17 setdosa 2008-09-19 17:42:18 UTC
Created attachment 70163 [details]
Thread dump
Comment 18 setdosa 2008-09-19 17:43:38 UTC
Created attachment 70164 [details]
There were 2 java processes running. this is the other one
Comment 19 setdosa 2008-09-19 17:44:25 UTC
Created attachment 70165 [details]
messages log file
Comment 20 setdosa 2008-09-19 18:54:20 UTC
Doesnt seem to happen on the latest nightly build. You guys can close it if you feel so. Thanks for looking into it
Comment 21 Marek Fukala 2008-09-19 19:33:01 UTC
Thanks for the report. I still think it would be worthy to check the problem on beta since there still can be a bug in
the reformatter or lexer.
Comment 22 Tomasz Slota 2008-09-22 13:47:26 UTC
I was playing with this document for a long while in the current dev build and all seems fine. The original issue was probably caused by a perf problem in 
lexer/embedding, I dont remember the issue #, but it is already fixed.