Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 121383 - Deadlock during writing in JSpEditor
Deadlock during writing in JSpEditor
Product: javaee
Classification: Unclassified
Component: JSP
All All
: P2 (vote)
: 6.x
Assigned To: Marek Fukala
release601_fixes_candidate1, release6...
: 122436 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2007-11-07 16:16 UTC by Petr Pisl
Modified: 2008-02-20 18:04 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT

Thea dealock. (20.64 KB, text/plain)
2007-11-07 16:16 UTC, Petr Pisl

Note You need to log in before you can comment on or make changes to this bug.
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;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/completion/,v  <--
new revision: 1.19; previous revision: 1.18
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
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;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/completion/Attic/,v  <--
new revision:; previous revision: 1.18

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