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 196320 - [70cat] Javadoc popup leaks file handles
Summary: [70cat] Javadoc popup leaks file handles
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-04 18:07 UTC by matthies
Modified: 2011-03-16 08:11 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matthies 2011-03-04 18:07:50 UTC
After generating javadoc for a project (Run -> Generate Javadoc), then using CC (Ctrl+Space) in the editor to pop up some of the project's javadoc acquires a file handle to the respective HTML file of the javadoc, but apparently doesn't release it afterwards. This has the effect that for example a subsequent Clean and Build (Shift+11) fails because Clean can't delete the HTML file from the dist directory because of the open file handle(s).

I used Unlocker [1] to verify that the NetBeans process is holding the file handles. It also appears that every new popup opens a new handle.

The only solution seems to be to restart NetBeans, or to use a tool like Unlocker to release the file handles.

[1] http://unlocker.emptyloop.com/
Comment 1 Jan Becicka 2011-03-07 10:19:32 UTC
afaik implemented in editor.  © Dusan
Comment 2 Dusan Balek 2011-03-10 09:16:56 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/c266407f25f1
Comment 3 Tomas Zezula 2011-03-11 08:26:06 UTC
The patch is very big but as far as I understand it just wraps the existing code with
try {
} finally {
      textStream.close()
}

Right?
Comment 4 Tomas Zezula 2011-03-11 08:34:57 UTC
added try {} finally {} into 2 places
Seems good to me.
Comment 5 Quality Engineering 2011-03-11 09:38:58 UTC
Integrated into 'main-golden', will be available in build *201103110400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c266407f25f1
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #196320: Javadoc popup leaks file handles - fixed.
Comment 6 Jaromir Uhrik 2011-03-14 10:18:42 UTC
Product Version: NetBeans IDE Dev (Build 201103140400)
Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

I have verified the fix in the build above and I agree with integration to 70. Dusane, please integrate the fix.
Comment 7 Dusan Balek 2011-03-15 09:34:04 UTC
Fix integrated into release70.


http://hg.netbeans.org/releases/rev/6a59ca811c01
Comment 8 Jaromir Uhrik 2011-03-16 08:11:24 UTC
Verified in 70:
Product Version: NetBeans IDE 7.0 RC1 (Build 201103160000)
Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)