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.
[ BUILD # : 200510131600 ] [ JDK VERSION : 1.6 ] Hi cass path scanner does not stops when you close an opend project. dexcription : When you open a big project , IDE Start scanning classpath but if you close the project before scanning finishs the scanner does not stops. I think it should stop , because the project is closed and it does not need to scan. step to reproduce: 1-open a big source based project , a project which has some more libraries .... in my case : IReport , IDE source . 2-Class path scanner will start , as the project are big it may take few minutes 3-when scanner starts , you close the project <scanner should stop here but it continue> I do not know , but i think it should stops when the project close , or delete.
I am not sure, whether MDR knows about closing the project during the classpath scan ... Anyway from the users point of view relevant issue. Feel free to reassigne, mdr/java/projects ?
Projects are closed only in UI. If you close the project, some project information is still needed for other projects (e.g. classpath information).
> Projects are closed only in UI. If you close the project, some project > information is still needed for other projects (e.g. classpath information). Honza, it sounds strange. Do you want to say, that Java/MDR need projects informations even if it has been closed? Why? What exactly you need? When these informations will be used? As I said, I understand that probably there is no no way how to stop parsing, but I don't understand why you need it after closing. Thanks in advance for explanation.
In fact, mdr don't care about opened/closed project. Neither java/javacore. As soon as project system registers new classpath to GlobalPathRegistry, java/javacore starts scanning. And even if the project is closed, classpath is still valid. Or am I wrong Tomasi Z.?
It is a bit different. The classpath is valid even after the project closed. But javacore takes the GlobalPathRegistry (GPR) as the model of the world. When the project is closed, all the classpaths belonging to it are removed from the GPR and the GPR fires events.
Not true - javacore needs to care even about CP's that are not in GPR anymore. We can't eagerly unmount extents for CP's that were used (the MDR DB has been mount for them) and are not in the GPR anymore. If you remember, Tomasi, you were actually still helping us with the javacore and projects integration when we needed to add that logic in (referencing the CP's weekly so that we know when they go out of use and so that we can unmount the storage). As far as I remember it is so because we need to be able to work with files that are not from open projects.
This is definitelly java/project issue, if the MDR holds the classpath by weakreference after the project is closed. The issue should be assigned to the module which holds the project by strong reference, however I am not much sure how save is to base lifecycle on weak references => gc. Why the MDR does not throw away the classpaths when the project is closed and does not remount the storages when needed (not too often, only when user goes to source of dependent closed project)?
*** Issue 70052 has been marked as a duplicate of this issue. ***
According to 70052, which is a duplicate of this, this causes a memory leak in the order of hundreds of kilobytes. Given that, are we sure that this is only a P3?
The list of dependent issues was created for j2seproject, for web project it can be a superset of these issues. Someone should check it under OptimizeIt. While checking it, it is necessary to do the complete workflow of the project (open customizer, run project, debug project, edit files...) because the number of non freed references grows.
This issue does not cause a big memory leak in case of j2seproject and the leak is caused only by issue #67849. When user selects some other project or file which has navigator view the project is freed. Only in case when the closed j2seproject was a last one and no other sources are opened the issue #67849 causes that the project is hold until some other project/file is opened => P3. If the behavior of web project is different they may be a separate web/project issue with a similar dependency set, not sure.
At least the active root has to be scanned.
*** Issue 103056 has been marked as a duplicate of this issue. ***
This issue is obsolete. It was reported against 5.0. Closed projects are still scanned, but it is reported as separate issue 145474.