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.
Sorry for reporting this as a single issue - things seem to be so broken that I don't even know how to sensibly split this up. Editing JSPs seems to be severely broken (I am using NB 6.0 dev build - 200709280000). I am trying to edit JSP's for test4u project and here are the problems I am encountering: - automatic indentation does not work correctly - I am getting pieces of the JSP's underlined as if they were erroneous although there is no error - e.g. line like this is underlined saying there is an unexpected character/syntax error: <body onload="loadPage('messages=true&restart=true', 8000);"> - there are some yellow boxes (marking usages??) placed at random positions (even whitespaces) throughout the whole file - matching curly brackets works incorrectly - code completion mostly does not work at all - from time to time I am getting assertion errors and NPEs - the only way to get rid of the AssertionErrors is to close the file and reopen it - editing and especially scrolling through the file with the caret gets deadly slow I am attaching my IDE log and a few screenshots of what I am seeing. - The first screenshot shows where the caret is placed (wrongly indented) after hitting Enter at the end of the previous line. You can also see a weird marking of an error (which is not an error at all) on the line above the caret (underlined quotation mark in a purple box, with no corresponding annotation in the editor annotation bar on the left). - The second one shows more weird error marks where there is no error and the random yellow boxes I mentioned. One thing that could be relevant to this is that I am on Windows and the files I am editing have unix line breaks.
Created attachment 49785 [details] IDE log file
Created attachment 49786 [details] Screenshot 1
Created attachment 49787 [details] Screenshot 2
It's just totally unusable. Attaching IDE log after another hour of struggling, trying to edit a single jsp. I was getting IllegalStateExceptions and AssertionErrors after almost every keystroke. In the end, IDE got completely frozen (in a deadlock probably) - unfortunately I was not able to take a thread dump easily as I did not start IDE with the console window. I am also attaching the file I was trying to edit.
Created attachment 49793 [details] Another IDE log
Created attachment 49794 [details] JSP I was trying to edit
I found a very similar situation (IllegalStateExceptions, unreadable JSP files. frozen IDE) in the JSP view of the VisualWeb projects. I believe it's the same editor, isn't it? Product Version: NetBeans IDE 6.0 Beta 1 (Build 200709141330) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 System: Windows 2000 version 5.0 running on x86; Cp1252; de_DE (nb)
Thans for the feedback, I am sorry for such unusable editor there were some bigger changes in indentation recently, most of the issue seems to be cause by some changes in editor/syntax coloring infrastructure. I'll keep trying to address most of the issues ASAP. As for the described problems and exceptions from the log: Already filed issues: #116518 P2 [editor] - java.lang.ArrayIndexOutOfBoundsException: 21 #114948 P3 [languages/engine] - java.lang.NullPointerException in AnnotationManager.java:186 #116486 P3 [html/editor] - AssertionError : Token length=0 <= 0 #116474 P2 [html/editor] - new line indentation doesn't work #115819 P3 [web/jspeditor] - Highlighting problem #111546 P2 [web/jspeditor] - Syntax error from scriptlets in embedded languages (not trivial fix, requires bigger changes in both jsp editor and languages/engine) I work on the fix with Hanz on a branch. Freshly filed issues based on the log file you provided #117261 P2 [editor] - java.lang.AssertionError: Invalid endOffset: 4868 > line end offset = 4840 #117267 P2 [editor] - javax.swing.text.BadLocationException: Invalid offset = 2512, bias = Forward, outside of the view <2512, 2512>, isFragment = false, fragment boundaries <2512, 2512> #117262 P2 [languages/engine] - java.lang.IllegalStateException: Caller of TokenSequence forgot to call moveNext(): tokenIndex=0 #117268 P2 [html/editor] - java.util.ConcurrentModificationException: Caller uses token sequence which is no longer valid. Underlying token hierarchy has been modified: modCount=626 != upToDateModCount=628 As for the code completion not working please try to be more specific what is not completed and where. I haven't heard any complains about this recently. The same for brackets matching - do you mean matching of jsp or html tags? Or matching in embedded languages (css, javascript)? As for the performance I am not sure, I seems to be quite fast (except file opening (#45934)). Attaching some threaddumps would help a lot. Thanks for the valuable feedback!
Thanks for update! Here are answers to your questions: Code completion - Maybe it was just a perceived misfunction given the other issues I had and exception pop-up windows appearing quite often when I wanted to invoke the code completion. Brackets matching - Brackets were matched fine when standing on an opening bracket. However, when standing on a closing bracket, the opening one could not be found - I don't think I've ever seen this would work when standing on a closing bracket - but I believe the opening and closing brackets were in separate scripting blocks. Performance - Maybe part of this issue was a *perceived* poor performance due to exception windows popping up. I am quite sure though that scrolling was objectively slow on some occasions - when I tried to move caret down with arrow key, it responded slowly and after I stopped hitting the key it scrolled for a few more seconds scrolling down more pages than I wanted, etc.
Looks like #117339 after Tomasz' workaround does not block this P1 anymore.
Most of the issues causing this one P1 has been already fixed so I am closing this "umbrella" issue. Most problematic issue in JSP editor seems to be #116474 which will hopefuly be fixed by beta2, the rest of blocking issues should be done to beta2 as well. The overall impression of JSP editor is much better now.
there are last three error on the page - #120974 - javascript last two errors are correct - there is not start tag for <a> tag verified. NetBeans IDE Dev (Build 20071102062308)