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 143453 - OutOfMemoryError: Java heap space
Summary: OutOfMemoryError: Java heap space
Status: RESOLVED WONTFIX
Alias: None
Product: ide
Classification: Unclassified
Component: Performance (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Tomas Hurka
URL: http://statistics.netbeans.org/except...
Keywords:
: 143486 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-11 13:27 UTC by Petr Dvorak
Modified: 2011-09-19 14:51 UTC (History)
81 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 67149


Attachments
stacktrace (2.35 KB, text/plain)
2008-08-11 13:27 UTC, Petr Dvorak
Details
Strange tree in Navigator view (234.16 KB, image/png)
2008-08-11 15:46 UTC, Petr Dvorak
Details
stacktrace (2.36 KB, text/plain)
2010-05-18 22:04 UTC, Jesse Glick
Details
stacktrace (3.01 KB, text/plain)
2010-05-19 00:04 UTC, Exceptions Reporter
Details
stacktrace (2.88 KB, text/plain)
2010-06-09 08:39 UTC, Alexandr Scherbatiy
Details
stacktrace (2.99 KB, text/plain)
2010-08-19 21:23 UTC, Filip Zamboj
Details
stacktrace (3.19 KB, text/plain)
2010-08-20 13:50 UTC, Filip Zamboj
Details
stacktrace (2.92 KB, text/plain)
2010-11-04 03:05 UTC, adam_myatt
Details
stacktrace (2.17 KB, text/plain)
2011-01-24 20:15 UTC, misterm
Details
stacktrace (2.48 KB, text/plain)
2011-03-18 13:19 UTC, michbarsinai
Details
stacktrace (2.48 KB, text/plain)
2011-03-20 09:40 UTC, michbarsinai
Details
stacktrace (2.69 KB, text/plain)
2011-04-01 12:42 UTC, michbarsinai
Details
stacktrace (813 bytes, text/plain)
2011-06-06 14:12 UTC, aquaglia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Dvorak 2008-08-11 13:27:43 UTC
Build: NetBeans IDE 6.5 Beta (Build 200808101001)
VM: Java HotSpot(TM) Client VM, 11.0-b13, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b26
OS: Linux, 2.6.24-19-generic, i386

User Comments: 
I used editor to edit the file from editor_tests project (TS_60_JavaEditor). I changed Members view in Navigator to Trees and back. IDE froze, OOM exception was thrown.

Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
        at com.sun.java.swing.plaf.gtk.GTKNativeEngine.finishPainting(GTKNativeEngine.java:493)
        at com.sun.java.swing.plaf.gtk.GTKPainter.paintTreeCellBackground(GTKPainter.java:1060)
        at javax.swing.plaf.synth.SynthTreeUI.paintRow(SynthTreeUI.java:557)
        at javax.swing.plaf.synth.SynthTreeUI.paint(SynthTreeUI.java:299)
        at javax.swing.plaf.synth.SynthTreeUI.update(SynthTreeUI.java:226)
        at javax.swing.JComponent.paintComponent(JComponent.java:763)
Comment 1 Petr Dvorak 2008-08-11 13:27:52 UTC
Created attachment 67002 [details]
stacktrace
Comment 2 Petr Dvorak 2008-08-11 15:44:46 UTC
To reproduce:

1. Start IDE with a fresh userdir
2. Open project http://wiki.netbeans.org/attach/TS_60_JavaEditor/editor_tests.tar.gz
3. Open some files (3-4) and also the file "PerformanceBigJava.java"
4. While PerformanceBigJava file is opened, change item in Navigator combo to "Trees" and immediately after that back to
"Members view"
-> issue 140268, Navigator displays "Please wait" message

5. Wait until the Navigator refreshes, when it does, change the combobox item to "Trees"
-> strange tree is displayed (see the screenshot)
-> IDE responsiveness is very poor
-> if you try to use a Navigator, you will eventually get above mentioned exception
Comment 3 Petr Dvorak 2008-08-11 15:46:06 UTC
Created attachment 67022 [details]
Strange tree in Navigator view
Comment 4 David Simonek 2008-08-12 10:31:14 UTC
java/navigation, not core/navigator!

tzezula, note that due to bug 131951, java navigation panels may be created two times - however I don't know if there is
any connection to this issue or not.
Comment 5 Jan Lahoda 2008-08-12 10:37:16 UTC
Trees (and Elements and Errors) panel is meant only for developers and is disabled in the release. I do not think this
has anything to do with L&F.
Comment 6 Petr Dvorak 2008-08-12 12:44:58 UTC
*** Issue 143486 has been marked as a duplicate of this issue. ***
Comment 7 Jesse Glick 2010-05-18 22:04:59 UTC
Created attachment 99162 [details]
stacktrace

Moved mouse over failure line in Test Results window, where the assertion message was apparently very long. (TopLoggingNbLoggerConsoleTest.testLog10000Lines)
Comment 8 Jesse Glick 2010-05-18 22:05:46 UTC
My last report is likely a bug in the junit module, not this.
Comment 9 Exceptions Reporter 2010-05-19 00:04:59 UTC
Created attachment 99165 [details]
stacktrace
Comment 10 Alexandr Scherbatiy 2010-06-09 08:39:37 UTC
Created attachment 99924 [details]
stacktrace
Comment 11 Filip Zamboj 2010-08-19 21:23:44 UTC
Created attachment 101545 [details]
stacktrace

changed to netbeans and clicked on editor while ftp upload was in progress
Comment 12 Filip Zamboj 2010-08-20 13:50:45 UTC
Created attachment 101565 [details]
stacktrace

switched from netbeans to other window while scanning project
Comment 13 Exceptions Reporter 2010-09-30 13:36:58 UTC
This bug already has 250 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=67149
Comment 14 Exceptions Reporter 2010-09-30 13:45:59 UTC
This bug already has 250 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=67149
Comment 15 Jan Lahoda 2010-10-01 07:47:33 UTC
There are a few things to note:
-this was originally reported against one of the Java support's debugging features (Trees panel in the navigator). As this is not an end-user feature, it is unlikely that this will be fixed (the NB developers should simply use a smaller source file when inspection through Trees is necessary).
-OOMEs usually require heap dump to evaluate - OOME is not necessarily thrown from place with the actual problem.
-the exception reporter joined many independent reports to this bug - I took a look at some of the stack traces, and some relate to the original report, some refer to classes from PHP, etc. Sorry, I do not have time to go manually through 250+ duplicates and split them to separate reports (esp. if the stack trace may not point to the actual problem).

I think that the exc. reporter should handle OOMEs differently than the other exceptions: the IDE is set-up to auto-generate heap dump AFAIK, so tell the user where the heap dump is, so that he/she can keep it for further inspection. It would be good if heap histogram could be sent automatically with the report (usually not sufficient to fix the problem, but can be used to send the report to appropriate person for evaluation). The stack trace should also be kept, but not that much useful in most cases.

Thanks.
Comment 16 Quality Engineering 2010-10-06 03:18:46 UTC
Integrated into 'main-golden', will be available in build *201010060000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f2fc9756fbde
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #143453: the java.debug's TreeNodes should consume less memory.
Comment 17 Petr Jiricka 2010-10-26 12:21:38 UTC
Everyone, does this still happen to you in NetBeans 7.0 Milestone 2 or later? If so, it would be useful if you could upload the heap dump generated by a recent build to some file sharing service and let us know. Thanks.
Comment 18 Filip Zamboj 2010-10-26 16:16:46 UTC
(In reply to comment #17)
> Everyone, does this still happen to you in NetBeans 7.0 Milestone 2 or later?
> If so, it would be useful if you could upload the heap dump generated by a
> recent build to some file sharing service and let us know. Thanks.

I didn't reproduce this for a long time ... but I'll attach dump if it occurs
Comment 19 Petr Jiricka 2010-10-26 16:37:10 UTC
I see that right now there is one occurrence from M2 build, by user kurris. http://statistics.netbeans.org/exceptions/exception.do?id=431194

kurris, can you please let us know whether this still happens to you, whether you can reliably reproduce, and if you have the heap dump, can you please upload it? Thanks.
Comment 20 adam_myatt 2010-11-04 03:05:20 UTC
Created attachment 102790 [details]
stacktrace

added 8-9 java source file externally to a project
Comment 21 Exceptions Reporter 2010-12-22 09:24:27 UTC
This bug already has 400 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=67149
Comment 22 noob1234 2011-01-14 19:40:25 UTC
This seems to be resolved in 7.0 Beta.
Good work guys!
Comment 23 misterm 2011-01-24 20:15:32 UTC
Created attachment 105317 [details]
stacktrace
Comment 24 Petr Jiricka 2011-03-04 09:58:30 UTC
There are now 13 reports of this problem from NB 7.0 Beta 2, we need to investigate these cases.
Comment 25 Exceptions Reporter 2011-03-09 18:54:54 UTC
This bug already has 600 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=67149
Comment 26 Petr Jiricka 2011-03-10 08:55:00 UTC
Moving to performance to make sure this appears on the dashboard.
Comment 27 Petr Hejl 2011-03-17 10:49:00 UTC
#494988 No heap dump, failed at JS (indexing)
#494986 No heap dump, failed at JS (indexing)
#494715 Corrupted gz, failed at Css (indexing)
#494674 No heap dump, no usable stacktrace
Comment 28 Petr Hejl 2011-03-17 12:11:15 UTC
#494657 No heap dump, failed at threading, some NPEs at PHP FTP
#494304 Corrupted gz, failed at JPDA
#494016 Corrupted gz, failed at JS (indexing)
#493353 Corrupted gz, failed at PHP parser
#493351 Corrupted gz, failed at PHP parser
Comment 29 michbarsinai 2011-03-18 13:19:03 UTC
Created attachment 107104 [details]
stacktrace

typing hebrew in a properties file, fast.
Comment 30 michbarsinai 2011-03-20 09:40:00 UTC
Created attachment 107128 [details]
stacktrace

Typing hebrew fast, in a text file
Comment 31 Marian Mirilovic 2011-03-24 08:10:57 UTC
pjiricka,
 so what is the status of this issue ? Any updates ?
Comment 32 larsomat 2011-03-24 09:44:06 UTC
This error occurs to me, when scanning a large drupal project (Build 201103230400). Memory usage jumps up to over 700mb very fast. IDE doesn't respond anymore. When I try to upload this issue incl. heapdump, another Memory error occurs and the upload is stopped.

What do you need in order to analyse this better?
Comment 33 larsomat 2011-03-24 11:53:11 UTC
The same project uses only around 60mb in Netbeans6.9
Comment 34 Petr Jiricka 2011-03-25 06:51:02 UTC
> What do you need in order to analyse this better?

Could you please upload the heapdump to some file sharing service so we can have a look?
Comment 35 Petr Jiricka 2011-03-25 06:57:28 UTC
Requesting a waiver for 7.0. Not able to analyze the heapdumps, and many of them are broken.
Comment 36 larsomat 2011-03-25 08:36:03 UTC
The heapdump is here:

http://lars-pohlmann.de/netbeans/heapdump.hprof.gz

User: netbeans
Password: heapdump
Comment 37 Marian Mirilovic 2011-03-27 07:17:01 UTC
Agree with waiver for NB 7.0. We'll do our best to address this issue in NB 7.0.1. 

larsomat: thanks for heapdump!
Comment 38 Petr Pisl 2011-03-28 15:18:43 UTC
According the last attached memory dump it looks like problem in the HTML validator, because it eats alsmost 250 MB of ram. The problem can be in REPORTED_RUNTIME_EXCEPTIONS map, which is static and keeps anonymous inner classes "marker", but IMHO such anonymous class keeps reference into the enclosing whole instance of ValidationTransaction. 


Assigning to Marek, it his code.
Comment 39 Marek Fukala 2011-03-28 21:37:24 UTC
(In reply to comment #38)
> According the last attached memory dump it looks like problem in the HTML
> validator, because it eats alsmost 250 MB of ram. The problem can be in
> REPORTED_RUNTIME_EXCEPTIONS map, which is static and keeps anonymous inner
> classes "marker", but IMHO such anonymous class keeps reference into the
> enclosing whole instance of ValidationTransaction. 
> 
> 
> Assigning to Marek, it his code.

filed as new issue 197166 - serious memory leak in html validator.
Comment 40 Quality Engineering 2011-03-29 08:41:33 UTC
Integrated into 'main-golden', will be available in build *201103290400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c6b1d86726a9
User: Marek Fukala <mfukala@netbeans.org>
Log: #143453 - fixed one of the many memory leaks reported in the issue. This one is described by Petr Pisl in the comment #38.
Comment 41 Exceptions Reporter 2011-03-31 15:07:52 UTC
This bug already has 700 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=67149
Comment 42 michbarsinai 2011-04-01 12:42:26 UTC
Created attachment 107429 [details]
stacktrace

Editing a utf8 file, with mixed hebrew-english text.
This happens if I type too fast.
Comment 43 Marian Mirilovic 2011-06-01 15:58:56 UTC
This issue will be fixed on server side, until then I would like to keep it open.
Comment 44 aquaglia 2011-06-06 14:12:03 UTC
Created attachment 108755 [details]
stacktrace

Copying from output window with lot of content
Comment 45 Petr Cyhelsky 2011-09-19 08:18:10 UTC
*** Bug 202245 has been marked as a duplicate of this bug. ***
Comment 46 Petr Cyhelsky 2011-09-19 14:22:33 UTC
Closing the issue - this issue comprises of all the OOME from very long period of time and it is practically impossible to analyze all the heap dumps. From now on all new OOME exceptions will be sorted into corresponding issues according to stacktraces. This will enable developers to better react to the new issues and not to be swamped by multiple different exception records in one big issue.
Comment 47 Petr Jiricka 2011-09-19 14:30:29 UTC
It would be useful to have a BZ query that lists the new bugs corresponding to the new incoming OOME exceptions.