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.
Unit test org.netbeans.modules.cnd.repository.impl.AccessWhileClosingProject shows that we have an issue in the case a client tries to access project data (find a project file by its absolute path) while the project is being closed. See the stack trace attached. I never experienced such situation in the IDE, but I believe it's possible.
Created attachment 50968 [details] The stack
Investigation shows that this happens when a client asks a repository unit for some data (via get method), while this repository unit is being closed. One of the consequences is that it's IntToStringCache is nonexistent at the moment (this one is most frequent). Another one is that sometimes (very rarely) ClosedChannelException occurs. The necessary fix involves refactoring of the repository implementation. The entire stack (repository cache, int-to-string cache, file-based persistence) should be split on a per-unit (i.e. per-project) basis. Now such split exists on some levels (on the lowest, file-based, level), but isn't consistent enough. This does not allow to solve closure issues in a safe way.
I believe it isn't a P2, since this occurs only in tests. The test was written for a different issue and is very rigid - in particular it tries to invoke findFile() many times on a project being closed (in a differet thread); this repeats several hundred times. Eventually, it fails (findFile throws assertion error). This is reproducible on my Suse Linux laptop, but not on Solaris desktop.
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. We apologize for any inconvenience. Thank you. The NetBeans Team