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 112785

Summary: IDE freezes while calling UndoAction after code completion in scriptlet
Product: editor Reporter: Jindrich Sedek <jsedek>
Component: LexerAssignee: Miloslav Metelka <mmetelka>
Status: VERIFIED WORKSFORME    
Severity: blocker CC: mfukala
Priority: P2 Keywords: T9Y
Version: 6.x   
Hardware: Sun   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: thread dump
new thread dump

Description Jindrich Sedek 2007-08-14 17:22:48 UTC
I use this code in jsp file and invoke code completion at possition of "|"

<% LinkedList l = new LinkedList();l.|

clear function is selected from the list and code is completed:

<% LinkedList l = new LinkedList();l.clear()

invoking UndoAction processor starts working for 100% and it never ends
Comment 1 Jindrich Sedek 2007-08-14 17:27:42 UTC
Created attachment 46592 [details]
thread dump
Comment 2 Jindrich Sedek 2007-08-14 17:30:32 UTC
reproducible in web/jspsyntax qa-functional tests
Comment 3 Marek Fukala 2007-08-15 10:22:02 UTC
It looks like Java Source Worker Thread is trying to get a list of embedded java token sequences endlessly, since it has
the document lock, EDT is blocked since the code there waits for document writelock.

BTW, I suppose the CPU is not 100% percent since the JSWT is runnable.

This seems to be a lexer infrastructure problem, reassigning to Mila Metelka.

"Java Source Worker Thread" prio=10 tid=0x09795000 nid=0x6132 runnable [0x97014000..0x97014fb0]
[ideTestRunner]    java.lang.Thread.State: RUNNABLE
[ideTestRunner]         at java.util.WeakHashMap.get(WeakHashMap.java:348)
[ideTestRunner]         at org.netbeans.lib.lexer.LanguageManager.findLanguageEmbedding(LanguageManager.java:125)
[ideTestRunner]         - locked <0x9bf62f18> (a java.lang.String)
[ideTestRunner]         at org.netbeans.lib.lexer.LexerUtilsConstants.findEmbedding(LexerUtilsConstants.java:189)
[ideTestRunner]         at org.netbeans.lib.lexer.EmbeddingContainer.getEmbedding(EmbeddingContainer.java:101)
[ideTestRunner]         - locked <0x9ca3a150> (a org.netbeans.lib.lexer.inc.IncTokenList)
[ideTestRunner]         at org.netbeans.lib.lexer.LexerUtilsConstants.embeddedTokenList(LexerUtilsConstants.java:255)
[ideTestRunner]         at org.netbeans.api.lexer.TokenSequence.embeddedImpl(TokenSequence.java:288)
[ideTestRunner]         at org.netbeans.api.lexer.TokenSequence.embedded(TokenSequence.java:284)
[ideTestRunner]         at org.netbeans.api.lexer.TokenHierarchy.embeddedTokenSequences(TokenHierarchy.java:250)
[ideTestRunner]         at org.netbeans.modules.java.editor.semantic.TokenList$2.run(TokenList.java:96)
[ideTestRunner]         at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1162)
Comment 4 Jindrich Sedek 2007-08-20 18:30:58 UTC
I'm getting this issue also manually while editing jsp file, it blocks IDE absolutly and I have to restart it ->
increasing priority
Comment 5 Jindrich Sedek 2007-08-20 18:31:53 UTC
Created attachment 46898 [details]
new thread dump
Comment 6 Miloslav Metelka 2007-09-02 23:47:55 UTC
I'm not able to reproduce now due to some problems with jsp editing but I'll attempt to reproduce ASAP.
Comment 7 Miloslav Metelka 2007-09-11 11:19:48 UTC
I'm unable to reproduce. Not sure whether this could be because of the recent changes in the lexer or in java semantic
processing but the problem seems to be gone. Feel free to reopen.
Comment 8 Jindrich Sedek 2007-11-02 13:32:58 UTC
I'm not able to reproducite now either.
verified.
NetBeans IDE Dev (Build 20071102062308)