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 205047

Summary: CloneableEditorSupport shows model dialog while holding internal lock
Product: platform Reporter: Jaroslav Tulach <jtulach>
Component: TextAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED WONTFIX    
Severity: normal CC: mmirilovic
Priority: P2    
Version: 7.1   
Hardware: Other   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Jaroslav Tulach 2011-11-13 10:17:47 UTC
Bug 203477 disclosed a problem in CloneableEditorSupport. As Lahváč's thread dump http://netbeans.org/bugzilla/attachment.cgi?id=112043 shows and as Jan Štola argues:

The root of the problem seems to be the fact that CloneableEditorSupport
displays the 'external modification' modal dialog while holding the document
lock. This is deadlock-prone. Note that other events (from EventQueue) are
processed by AWT-thread in this situation

Please write a test and change the code to release the lock before showing the dialog.
Comment 1 Miloslav Metelka 2011-11-13 22:20:55 UTC
Yes, we've talked about it with Lahváč and Štolis. So the Listener.propertyChange() that calls

                                ERR.fine("checkReload starting"); // NOI18N
                                boolean noAsk = time == null || !isModified();
                                ERR.fine("checkReload noAsk: " + noAsk);
                                checkReload(noAsk);

must not be called by NbDocument.runAtomic() just the particular sections inside checkReload() can be.
Comment 2 Jan Lahoda 2011-11-13 22:32:41 UTC
As a fix for this is may cause various datalosses (see 203477#c10), I would suggest to wave this bug and defer it to next release, so that there is enough time to find and resolve any problems caused by such a fix. The solution to #203477 is not to show the incorrect external reload dialog anyway.
Comment 3 Miloslav Metelka 2011-11-16 12:46:32 UTC
OK, based on the last comment from jlahoda I request a waiver for this release.
Comment 4 Miloslav Metelka 2012-04-19 09:34:44 UTC
Please correct me if I'm wrong but this no longer maps to any real usecase issue since the original problem in filesystems (do not have an issue number at hand) was already fixed. Since there are risks described by JL I personally opt for closing this as wontfix. Objections?
Comment 5 Miloslav Metelka 2012-04-25 08:56:43 UTC
Marking as wontfix.