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.
Created attachment 115121 [details] Full thread dump Full remote utomatic tests hang due to IDE hanging on closing New C++ File dialog. See thread dump in attachement. It seems that IDE could hang on creation any remote source file from time to time while usual manual working and it was found while automatic testing only because automatic tests work more intensively.
In trunk, this does not reproduce, but it reproduces in 6.9.1
Created attachment 115125 [details] proposed fix
We face this problem in the case external change event comes before CloneableEditorSupport.lastSaveTime field is initialized. So in propertyChange reload flag is set to true in this case, which is incorrect. Here is a proposed change that fixes the problem (in release701_fixes context). diff -r 3de2a7e1d744 openide.text/src/org/openide/text/CloneableEditorSupport.java --- a/openide.text/src/org/openide/text/CloneableEditorSupport.java Thu Jan 19 15:00:06 2012 +0300 +++ b/openide.text/src/org/openide/text/CloneableEditorSupport.java Mon Jan 23 13:09:26 2012 +0300 @@ -227,7 +227,7 @@ private transient Reference<Pane> lastSelected; /** The time of the last save to determine the real external modifications */ - private long lastSaveTime; + private long lastSaveTime = -1;
cnd-main: http://hg.netbeans.org/cnd-main/rev/e72b14c4ac24 blacktie: rev/9e5179d8f90c
verified in automatic test in all branches.
Integrated into release71_fixes: http://hg.netbeans.org/releases/rev/fb629a366725
Integrated into 'releases', will be available in build *201202082200* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/fb629a366725 User: Vladimir Kvashin <vkvashin@netbeans.org> Log: Fixing #207170, #207571 (transplanted from e72b14c4ac246a20d896924f22774b44613f50d4)
IMHO this patch is not optimal since lastSaveTime == -1 is used as a marker for unsuccessful save. The problem is that checkReload() (CloneableEditorSupport:2900): // #57104 - avoid notifyModified() which takes file lock documentReloading = true; NbDocument.runAtomic(sd, this); documentReloading = false; // #57104 is run under runAtomic() so there's then the deadlock of document-lock <-> CES.getLock(). Not sure whether runAtomic() is there for blocking possible document modifications but I could accomplish that by checking for documentReloading flag in CES.DocFilter. So I would suggest to remove the runAtomic() around checkReload() (diff attached). Unit tests pass OK with this patch. Jardo, what do you think?
Created attachment 115988 [details] Proposed fix
http://hg.netbeans.org/jet-main/rev/6f321c144572
Integrated into 'main-golden', will be available in build *201202240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6f321c144572 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #207571 - IDE hangs on closing New C++ File dialog in automatic tests.
Unfortunately I must rework the fix since it causes issue #208916. That also means that 7.1.1. is affected :( sorry for that. Unfortunately I'm unable to say how frequently this happens to users.
Sorry, I was wrong, only Vladimir's patch went into 7.1.1.
(In reply to comment #13) > Sorry, I was wrong, only Vladimir's patch went into 7.1.1. Sure. What do you think should we do with 7.1.1, is it ok to just leave my fix there?
New fix: http://hg.netbeans.org/jet-main/rev/e4fc0654f907 (In reply to comment #14) > (In reply to comment #13) > > Sorry, I was wrong, only Vladimir's patch went into 7.1.1. > Sure. > What do you think should we do with 7.1.1, is it ok to just leave my fix there? Yes, let's leave it for 7.1.1. If the new fix will be ok, we can release it as part of 7.1.2.
*** Bug 208916 has been marked as a duplicate of this bug. ***
Integrated into 'main-golden', will be available in build *201203040400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/e4fc0654f907 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #207571 - IDE hangs on closing New C++ File dialog in automatic tests - reworked fix.
*** Bug 207170 has been marked as a duplicate of this bug. ***
*** Bug 214016 has been marked as a duplicate of this bug. ***
*** Bug 178709 has been marked as a duplicate of this bug. ***