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.
I've just been looking at my temporary directory, and have found 2000 files starting "output...." which are created by Netbeans output window using the FileMapStorage. It seems the files are only deleted if the window is closed. Just closing the application doesn't clean up after itself. Similar problems I think exist with these files that I think netbeans also creates... "dict_cache..........tmp" "mevenide..........pom" From a platform point of view, the temp file created for my own output window is never removed, so better guidance in the API docs on how to make sure this happens is needed. I close the stream, and then when the window is closed it trys to delete the file, but oldFile.delete() in FileMapStorage returns false and the file is not removed.
core-main/rev/b3f93edba4ee Output Window: Workaround for bug 4715154 (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4715154) improved. It was not sometimes possible to delete temporary files because they were associated with some MappedByteBuffer instances. Some files were not deleted because their writers were not correctly disposed. This was also fixed.
dict_cache.......tmp files: These files are created by JavaHelp library. They are not deleted because of a JDK bug, see http://bugs.sun.com/view_bug.do?bug_id=4171239 and http://bugs.sun.com/view_bug.do?bug_id=6357433 (it is a request for enhancement that should solve this problem).
mevenide..........pom files: I have several Maven projects, but I have no files starting with "mevenide" in my temp directory. Maybe these files have no relation to NetBeans. If you have new "mevenide..." files created when you start and close NetBeans, please report a new bug (probably product projects, component Maven) and describe steps to reproduce.
core-main/rev/b3f93edba4ee Fixed. Thank you for reporting.
I don't see how you can mark the issue as fixed? The output files are still there. If the solution is to wait to on http://bugs.sun.com/view_bug.do?bug_id=6357433 then surely it needs to be marked as waiting on that, as that would still need code changes as it is a new API that is proposed. I also believe there is still a defect in the code though, as if you don't ever close the window it will make no attempt to delete the file and the code doesn't use "deleteOnExit" (probably because of issues surrounding that). So there should be some type of clean up operation on exit to at least make an attempt to delete the files.
(In reply to comment #5) > I don't see how you can mark the issue as fixed? The output files are still > there. > > If the solution is to wait to on > http://bugs.sun.com/view_bug.do?bug_id=6357433 > > then surely it needs to be marked as waiting on that, as that would still need > code changes as it is a new API that is proposed. > > I also believe there is still a defect in the code though, as if you don't ever > close the window it will make no attempt to delete the file and the code > doesn't use "deleteOnExit" (probably because of issues surrounding that). So > there should be some type of clean up operation on exit to at least make an > attempt to delete the files. Sorry, please ignore this comment, as I see code changes have been made. I'll see what happens in the next NB release to see if it behaves better. Thank you.
You are right, the JavaHelp problem should be filed separately. I have created bug 204005. But I still think that this should be fixed in JDK for Windows, because it works correctly on Linux, for example. I believe the Output Window problem is fixed now. The cleanup is made by shutdown hook registered in the static constructor of class FileMapStorage. I tested it and it worked. Thank you for your comments.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/b3f93edba4ee User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #203739 - Output window temp storage files not removed if window not closed
ibeaumont, can you please verify once 7.1 is released and mark as verified then? Thanks in advance
Verified it is fixed. Thanks