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 246979

Summary: Starvation in the ProgressUtils.runOffEventDispatchThread
Product: platform Reporter: Tomas Zezula <tzezula>
Component: ProgressAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal CC: anebuzelsky, jtulach, rmatous, tstupka
Priority: P2    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Tomas Zezula 2014-09-10 07:53:26 UTC
The cancelled long running operation (e.g. HTML) blocks the runOffEDT for other unrelated operations. Most significant problem is with DataEditorSupport.Env.markModified which now also used PU.runOffEDT and leaves the editor in inconstant state causing user is not able to type into the file as it's locked and also causes data lost in the locked editor.

   at java.awt.Dialog.setVisible(Dialog.java:1005)
   at org.netbeans.modules.progress.ui.RunOffEDTImpl.runOffEventDispatchThreadImpl(RunOffEDTImpl.java:206)
   at org.netbeans.modules.progress.ui.RunOffEDTImpl.runOffEventDispatchThread(RunOffEDTImpl.java:105)
   at org.netbeans.api.progress.ProgressUtils.runOffEventDispatchThread(ProgressUtils.java:112)
   at org.openide.text.DataEditorSupport$Env.markModified(DataEditorSupport.java:972)
   at org.openide.text.CloneableEditorSupport.notifyModified(CloneableEditorSupport.java:1555)
   at org.netbeans.modules.html.HtmlEditorSupport.notifyModified(HtmlEditorSupport.java:246)
   at org.openide.text.CloneableEditorSupport.callNotifyModified(CloneableEditorSupport.java:1512)
   at org.openide.text.CloneableEditorSupport$DocFilter.checkModificationAllowed(CloneableEditorSupport.java:2406)
   at org.openide.text.CloneableEditorSupport$DocFilter.remove(CloneableEditorSupport.java:2363)
Comment 1 Tomas Zezula 2014-09-10 07:55:28 UTC
Fixed jet-main aa4889eb9d4f
Comment 2 Tomas Zezula 2014-09-12 08:35:12 UTC
Marking as path801 candidate as it causes data lost.
Comment 3 Quality Engineering 2014-09-13 04:53:18 UTC
Integrated into 'main-silver', will be available in build *201409130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/aa4889eb9d4f
User: Tomas Zezula <tzezula@netbeans.org>
Log: #246979:Starvation in the ProgressUtils.runOffEventDispatchThread
Comment 4 Antonin Nebuzelsky 2014-09-16 13:52:26 UTC
Jardo, can you review now? Thanks.
Comment 5 Jaroslav Tulach 2014-09-16 13:55:40 UTC
Y01 I am missing a test that would show the original problem and prove it is addressed now.

Otherwise visual code inspection seems to suggest that this is correct fix.
Comment 6 Tomas Zezula 2014-09-16 14:31:48 UTC
Tranplanted do nb801 patch1:
2fb59834a4e3
09ca808a9b96
Comment 7 Quality Engineering 2014-09-17 12:14:37 UTC
Integrated into 'releases/release801', will be available in build *201409171118* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/2fb59834a4e3
User: Tomas Zezula <tzezula@netbeans.org>
Log: #246979:Starvation in the ProgressUtils.runOffEventDispatchThread