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 188311 - Heap overflow in background processing
Summary: Heap overflow in background processing
Status: RESOLVED DUPLICATE of bug 187653
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.0
Hardware: PC All
: P1 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-02 10:54 UTC by Chiana
Modified: 2010-08-16 09:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Snapshot just prior to heap overflow (17.08 KB, application/octet-stream)
2010-07-31 15:14 UTC, Chiana
Details
Snapshot after closing all open projects (8.12 KB, application/octet-stream)
2010-07-31 15:19 UTC, Chiana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chiana 2010-07-02 10:54:26 UTC
Product Version = NetBeans IDE Dev (Build 201006300001)
Operating System = Windows 2003 version 5.2 running on x86
Java; VM; Vendor = 1.6.0_18
Runtime = Java HotSpot(TM) Client VM 16.0-b13

Occationally there is a heap overflow occuring in the background processing such as Project Scanner. When this occurs
the IDE will try to display an "Unexpected exception" dialog, the problem is that the heap overflow condition still exists
so a new heap overflow is thrown, as you might expect, this is not a good thing.
One concequence of this is that you are NOT able to save any unsaved changes, which IMHO is VERY BAD, you are not
able to exit the IDE properly either since the task that is hanging (and probable also sits on the memory needed) never
terminates.
A suggestion for a fix is; when heap errors are thrown in background processing it should not be displayed at once
instead it should be terminated immediatly and all memory hold by such process released then display the exception, this is because it is IMHO
more important to save the sourcecode than recover from the error
Comment 1 Peter Pis 2010-07-13 06:44:38 UTC
Could you please follow the link?
http://wiki.netbeans.org/GenerateThreadDump#Profile_Me_Now.21_-_since_NetBeans_6.7

And send the snapshot? hppt://upload.megashare.com
Comment 2 Chiana 2010-07-13 13:44:28 UTC
Hmmm... Tried that, didn't work, just keeps throwing heap overflow exceptions and it takes several hours just to get any response.
Comment 3 Peter Pis 2010-07-15 07:48:00 UTC
May I ask you to try that with VisualVM (it's mentioned in the previous link)? You could be able to get some snapshot. Thanks for cooperation.
Comment 4 Chiana 2010-07-31 15:14:24 UTC
Created attachment 101134 [details]
Snapshot just prior to heap overflow

Took this snapshot just before the first heapoverflow occured, the heap-o-meter was reading 303.1/303.4 at the moment, current open files were 2 short classes and the internet connection was disconnected (note: I connected to internet just after the snap was taken and it seems to ease up the ide a little...)
Comment 5 Chiana 2010-07-31 15:19:25 UTC
Created attachment 101135 [details]
Snapshot after closing all open projects

Took this snapshot after I managed to close the open projects, the heap-o-meter was still reading 295/303 and when closing the IDE after this was taken it took approx 50 seconds to shut down.

One more note that might be of interrest, this happens on my laptop only, it is an old Acer TM2410 (hotted with 1.5 G ram and an 1.8 GHz processor) and it does not occur on my "normal" developer platform (2.8GHz quad with 4 Gig-o-ram)
Comment 6 Peter Pis 2010-08-02 10:00:30 UTC
Could you please attach the head dump of that session?

For attaching the file please use: http://upload.megashare.com/

and provide the link.
Comment 7 Chiana 2010-08-03 19:27:48 UTC
For some strange unknown reason I got this problem today with my normal development machine (yes, vacation is over and I have returned to reallity), what I did was compress the entire /%user/netbeans/dev directory containing the log and some (hopefully usable) data. I did notice that just a few seconds before the IDE started to get more and more sluggish it made a "checking for external changes", not that I know why that would be needed when sources are on a non-shared drive... and about 3 seconds later the "Unexpected exception"/Heap overflow popped, when I pressed "report" it immediatley throw a new "Unexpected..." and the the entire IDE went into the wall locking one of the cores at 100%, so I waited about one hour before killing the process so it has hopefully written the profile into the heapdump...

Anything else I noted... No, don't think so... You should be able to se all settings and things from the profile directory in dev.zip... Oh... Password for the file is "netbeans" (without quotes that is)... Yes, there is one thing, this machine runs Vista business and my laptop has XP pro... and also, now that I come to think of it, I did a complete reinstall of ALL java installations (RTM, JDK et.c) because of an other bug reported to the glassfish developers...


Link in a later message it is still uploading...
Comment 8 Chiana 2010-08-03 19:41:00 UTC
Link is : http://www.MegaShare.com/2388855
Password: netbeans
Size    : 106.49 Meg
Comment 9 Chiana 2010-08-03 21:59:00 UTC
Well, it happened again (or almost)...

Why almost you may ask, well, I was making som interface changes to a couple of facades (9 to be precise) and was jumping back and forth thru tabs when I noted that the IDE started to get a little sluggish, raised my eyes to the heap-o-meter and it was reading 390/396, so I hit the profiler button and continued editing (saving often) but there was no exception thrown, instead I got a compiler error that wasn't there and then the snapshot started to save itself before I pressed the button again... I haven't checked the logfile myself but I have packed the /dev and the .nps file (uploading as I type, if it finishes before I press the commit button the link is below (otherwise in an later comment).
One thing I noted was that immediatley after it had saved the snapshot the heap-o-meter dropped to 204/396...
Is it possible that this can be the result of a memoryleak?

password to the file is "netbeans"
It is a little bigger than the last one, hence it has about 14 minutes left to upload as I press the commit button...
Comment 10 Chiana 2010-08-03 22:15:04 UTC
Link is : http://www.MegaShare.com/2389358
Password: netbeans
Size    : 107.18 Meg
Comment 11 Peter Pis 2010-08-04 15:00:11 UTC
Thanks. We are investigating it and we let you know.
Comment 12 Peter Pis 2010-08-10 13:07:56 UTC
Reassigning.
Comment 13 Jan Lahoda 2010-08-16 09:00:07 UTC
Thanks for the dumps. The same cause as bug #187653.

*** This bug has been marked as a duplicate of bug 187653 ***