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 195056 - Deadlock while formatting code
Summary: Deadlock while formatting code
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 191033 195066 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-04 01:54 UTC by _ gtzabari
Modified: 2012-02-08 11:38 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
A thread-dump of the deadlock (35.86 KB, text/plain)
2011-02-04 01:55 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2011-02-04 01:54:53 UTC
Netbeans 7.0 dev build 201101140000
JDK 1.6.0_23-b05

Netbeans deadlocks on me fairly frequently when code-formatting a large class file. I've attached a thread-dump for your review.
Comment 1 _ gtzabari 2011-02-04 01:55:47 UTC
Created attachment 105638 [details]
A thread-dump of the deadlock
Comment 2 _ gtzabari 2011-02-04 01:56:54 UTC
By the way, Netbeans was "scanning for external changes" while I invoked code-format. It's possible that the two are waiting on each other to finish. Just a guess.
Comment 3 Dusan Balek 2011-02-04 12:44:53 UTC
*** Bug 195066 has been marked as a duplicate of this bug. ***
Comment 4 Vladimir Voskresensky 2011-02-04 13:47:43 UTC
FYI, in issue #195066 there were no any scanning activity

I think the problem is due to incorrect impl of ActionFactory.FormatAction.
line 1713 calls 
target.setCursor(origCursor)
which is access to swing object. and due to use of 
ProgressUtils.runOffEventDispatchThread => passed Runnable is redirected and access AWTTreeLock from non EDT
Comment 5 Dusan Balek 2011-02-04 14:56:03 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/26e09589f5db
Comment 6 Quality Engineering 2011-02-05 06:08:41 UTC
Integrated into 'main-golden', will be available in build *201102050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/26e09589f5db
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #195056: Deadlock while formatting code - fixed.
Comment 7 Svata Dedic 2012-02-08 11:38:00 UTC
*** Bug 191033 has been marked as a duplicate of this bug. ***