Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!

Bug 121383

Summary: Deadlock during writing in JSpEditor
Product: javaee Reporter: Petr Pisl <ppisl>
Component: JSPAssignee: Marek Fukala <mfukala>
Status: VERIFIED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P2 CC: mschovanek, non_migrated_user, pjiricka
Version: 6.x   
Target Milestone: 6.x   
Hardware: All   
OS: All   
Whiteboard: release601_fixes_candidate1, release601_fixes_fixed
Issue Type: DEFECT Exception Report:
Attachments: Thea dealock.

Description Petr Pisl 2007-11-07 16:16:14 UTC
I just write a text (probably it was invoked auto code completion) and get the deadlock.
Comment 1 Petr Pisl 2007-11-07 16:16:45 UTC
Created attachment 52667 [details]
Thea dealock.
Comment 2 Marek Fukala 2007-11-07 21:37:58 UTC
This is my fault :-(

I overlooked that the JspCompletionItem$JspCompletionItem.substituteText() calls
JspCompletionItem$JspCompletionItem.reformat() method under document.atomicLock(). This breaks the paradigm
Reformat.lock() firts, then Document.atomicLock(). 

So after Reformat.lock() is called the infrastructure calls java Reformatter.lock() which tries to get java compiler's
lock. "Java Source Worked Thread" however holds the javac lock and tries to readLock() the document.

Fixed by removing the JspCompletionItem$JspCompletionItem.reformat() call from the atomicLock block.

The fix needs to be ported to 6.0 branch. BTW, html implementation is OK.

fixed in trunk

Checking in JspCompletionItem.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/completion/JspCompletionItem.java,v  <--  JspCompletionItem.java
new revision: 1.19; previous revision: 1.18
done
Comment 3 Marek Fukala 2007-11-07 21:44:09 UTC
Correction: JspCompletionItem$JspResultItem.*
Comment 4 Dusan Balek 2007-11-28 09:16:00 UTC
*** Issue 122436 has been marked as a duplicate of this issue. ***
Comment 5 Jindrich Sedek 2008-01-31 14:58:45 UTC
verified 
NetBeans IDE Dev (Build 200801310006)
Comment 6 khu 2008-02-05 18:37:14 UTC
The fix has been ported into the release601_fixes branch.

Checking in JspCompletionItem.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/completion/Attic/JspCompletionItem.java,v  <-- 
JspCompletionItem.java
new revision: 1.18.6.1; previous revision: 1.18
done
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo