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 20490 - Memory leak and CPU spike adding jars to project
Summary: Memory leak and CPU spike adding jars to project
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords: PERFORMANCE
: 21267 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-02-13 01:57 UTC by Josh Kleinpeter
Modified: 2003-07-01 14:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread Dumps during memory runaway. (32.33 KB, text/plain)
2002-02-13 19:02 UTC, Josh Kleinpeter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Kleinpeter 2002-02-13 01:57:37 UTC
I'm using JDK 1.3.1_02 on my Win2K box.  
When I add a jar to the ide (it doesn't seem to matter what jar), the cpu
utilization goes to 100% and the memory steadily moves upward.

It appears that if I have a filesystem added into my project, and I add a jar
then the system goes crazy.

However, if I add all of my jar files first, and then add the filesystem, there
is no problem.  Removing the jar file once the growth starts does not stop the
growth, only closing netbeans and starting it up again will fix the problem.  

Right now, if I wish to add a jar file, I remove my filesystems first, then add
the jar, and then add the filesystems back.
Comment 1 Petr Nejedly 2002-02-13 09:12:42 UTC
Reassigning to Java module.
It is most probably caused by the Java module analyzing the newly
added library and it should calm down after a while, so they'll
probably close it as invalid.
Comment 2 Josh Kleinpeter 2002-02-13 17:37:55 UTC
This is a 600Mhz machine that's 100% usage continually, and the memory
goes from 34MB usage to 240MB usage (and keeps rising).  Both of these
things happen for as long as netbeans is running once they start.

Also, I've been using netbeans for several months now on large
projects and have never seen this happen before.
Comment 3 Svata Dedic 2002-02-13 18:13:45 UTC
Could you shot a few thread dumps copy and attach them here
(threaddump is taken by pressing CTRL-Break in the console window)
while the CPU is at 100% ? Maybe we can see what's going on.
Does the UI freeze or is it "just" background processing ?
Comment 4 Josh Kleinpeter 2002-02-13 19:02:28 UTC
Created attachment 4693 [details]
Thread Dumps during memory runaway.
Comment 5 Josh Kleinpeter 2002-02-13 19:03:14 UTC
I've put the attachment on now.

It appears to be background processing in the editor, but the explorer
will not open filesystems or jar files while it's happening.  I could
also look at the menus, but when I chose the options menu under tools,
i did not get anything under options.  Also, when right clicking in
the explorer, and choosing new, there were no options to select (it
said "empty").

After it went to about 216MB usage, the processor did go back to 0 and
memory stopped growing.

It seems to be usable now as well.  Is there any way I can force a
garbage collection to see if that memory goes back down?
Comment 6 Svata Dedic 2002-02-15 10:23:22 UTC
Vito, your ProjectDataObject is on all the thread dumps taken. Could
you please look at it a bit ?
Comment 7 Vitezslav Stejskal 2002-02-15 13:25:29 UTC
I see, this seems to be problem in projects module, inefficient 
algorithm used to find out if created DO is accessible from project 
tab or not. I am taking it.
Comment 8 Vitezslav Stejskal 2002-02-20 13:09:29 UTC
Fixed in main trunk.
Comment 9 Vitezslav Stejskal 2002-03-16 00:47:41 UTC
*** Issue 21267 has been marked as a duplicate of this issue. ***
Comment 10 Vitezslav Stejskal 2002-03-16 00:48:55 UTC
marking 3.3.2_CANDIDATE, see issue #21267
Comment 11 David Konecny 2002-03-25 13:30:30 UTC
fix reviewed by developer
Comment 12 Vitezslav Stejskal 2002-03-27 15:37:35 UTC
INF=6163, integrated from main trunk to orion_fcs branch
Comment 13 Milan Kubec 2002-04-02 12:51:26 UTC
Verified in ffj-020401.
Comment 14 Quality Engineering 2003-07-01 14:18:15 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.