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 67025 - [50cat] Scanning class path does not stops if you close and opend project
Summary: [50cat] Scanning class path does not stops if you close and opend project
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Tomas Zezula
: 103056 (view as bug list)
Depends on: 67841 67842 67845 67846 67849
  Show dependency tree
Reported: 2005-10-18 09:49 UTC by kalali
Modified: 2008-08-28 20:25 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description kalali 2005-10-18 09:49:29 UTC
[ BUILD # : 200510131600 ]
[ JDK VERSION : 1.6 ]

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.
Comment 1 Marian Mirilovic 2005-10-18 10:16:17 UTC
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 ?
Comment 2 Jan Becicka 2005-10-20 10:48:03 UTC
Projects are closed only in UI. If you close the project, some project
information is still needed for other projects (e.g. classpath information).
Comment 3 Marian Mirilovic 2005-10-20 12:15:10 UTC
> 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.
Comment 4 Jan Becicka 2005-10-20 12:31:40 UTC
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.?
Comment 5 Tomas Zezula 2005-10-20 12:51:58 UTC
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. 
Comment 6 Martin Matula 2005-10-20 13:09:08 UTC
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
Comment 7 Tomas Zezula 2005-10-25 14:37:29 UTC
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)?
Comment 8 Radko Najman 2005-12-08 14:37:12 UTC
*** Issue 70052 has been marked as a duplicate of this issue. ***
Comment 9 Petr Jiricka 2005-12-08 16:26:15 UTC
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?
Comment 10 Tomas Zezula 2005-12-09 08:08:45 UTC
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.
Comment 11 Tomas Zezula 2005-12-09 08:20:02 UTC
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.

Comment 12 Tomas Zezula 2007-02-15 09:32:40 UTC
At least the active root has to be scanned.
Comment 13 Jan Becicka 2008-08-12 13:39:45 UTC
*** Issue 103056 has been marked as a duplicate of this issue. ***
Comment 14 Jan Becicka 2008-08-28 20:25:08 UTC
This issue is obsolete. It was reported against 5.0. Closed projects are still scanned, but it is reported as separate
issue 145474.