Bug 268688 - EDT Deadlock on save due to StickyWindowSupport
EDT Deadlock on save due to StickyWindowSupport
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: -- Other --
8.2
PC Linux
: P2 (vote)
: Dev
Assigned To: Milutin Kristofic
issues@editor
:
: 269082 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-26 07:24 UTC by Tristan
Modified: 2016-11-23 14:03 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace of netbeans (45.06 KB, application/octet-stream)
2016-10-26 07:24 UTC, Tristan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan 2016-10-26 07:24:58 UTC
Created attachment 162644 [details]
stacktrace of netbeans

IDE freezes after saving a java document. JVisualvm shows a perfect deadlock:

Short summary of the stack trace (see attachment):

Thread "Module-Actions" locks the NbDocument to save, but also tries to update the org.netbeans.api.editor.StickyWindowSupport that needs the awt tree lock for 
setLocation.

But EDT is waiting for the NbDocument lock.
Comment 1 Milutin Kristofic 2016-11-02 13:53:59 UTC
Thank you for your report. Yes, save actions is not called in EDT so NB got deadlock. I fixed it here:
http://hg.netbeans.org/jet-main/rev/7a7819654f2c
Comment 2 cezariusz 2016-11-03 10:25:50 UTC
> EventQueue.invokeLater(new Runnable() {
>   @Override
>   public void run() {      
>     component.setLocation(p);
>   }
> });

Why don't you use lambda if NB 8.2 requires Java 8?
Comment 3 Milutin Kristofic 2016-11-03 13:23:38 UTC
The netbeans module editor.libs2 has still javac.source set to 1.7 so I used java 7 syntax.
Comment 4 Quality Engineering 2016-11-04 03:02:39 UTC
Integrated into 'main-silver', will be available in build *201611040002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7a7819654f2c
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #268688 - EDT Deadlock on save due to StickyWindowSupport
Comment 5 Milutin Kristofic 2016-11-23 14:03:48 UTC
*** Bug 269082 has been marked as a duplicate of this bug. ***


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