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 243645 - OutOfMemoryError: Java heap space
Summary: OutOfMemoryError: Java heap space
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 8.0
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-08 07:22 UTC by mntetai
Modified: 2014-05-03 05:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 148936


Attachments
stacktrace (2.24 KB, text/plain)
2014-04-08 07:22 UTC, mntetai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mntetai 2014-04-08 07:22:53 UTC
Build: NetBeans IDE 7.4 (Build 201310111528)
VM: OpenJDK Client VM, 24.45-b08, OpenJDK Runtime Environment, 1.7.0_51-b00
OS: Linux

User Comments:
GUEST: I'm not sure what happened (was a couple of days ago), but i had been coding and running a Java + Maven desktop application for probably +6h continuously.

shahrukh1514: i was working with my project, that this error occured without performing any action. Also i uninstalled and reinstalled this application but the problem persist...

GUEST: Just started Netbeans

mntetai: netbeens crashed when used.

GUEST: Debugging an app, which has big StringBuffer/CharSequence fields (c.a. 1.5MB+), and I used Watch to see those fields.




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75)
   at com.sun.java.swing.plaf.gtk.GTKEngine.finishPainting(GTKEngine.java:590)
   at com.sun.java.swing.plaf.gtk.GTKEngine.finishPainting(GTKEngine.java:581)
   at com.sun.java.swing.plaf.gtk.GTKPainter.paintToolTipBackground(GTKPainter.java:1160)
   at javax.swing.plaf.synth.SynthToolTipUI.update(SynthToolTipUI.java:140)
   at javax.swing.JComponent.paintComponent(JComponent.java:769)
Comment 1 mntetai 2014-04-08 07:22:55 UTC
Created attachment 146616 [details]
stacktrace
Comment 2 Tomas Hurka 2014-04-25 15:17:39 UTC
OOME is caused by a really long tooltip.
Comment 3 Tomas Hurka 2014-05-02 08:41:20 UTC
In Exception #720376 OOME is caused by long tooltip. See javax.swing.JToolTip#3 and the tooltip is probably created by search. See patch to GC root for char[]#206039

this     - value: char[] #206039
 <- value     - class: java.lang.String, value: char[] #206039
  <- lineText     - class: org.netbeans.modules.search.TextDetail, value: java.lang.String #189306
   <- item     - class: java.util.LinkedList$Node, value: org.netbeans.modules.search.TextDetail #4632
    <- last     - class: java.util.LinkedList, value: java.util.LinkedList$Node #12338
     <- textDetails     - class: org.netbeans.modules.search.MatchingObject, value: java.util.LinkedList #7320
      <- infoCacheMatchingObject     - class: org.netbeans.modules.search.ResultModel, value: org.netbeans.modules.search.MatchingObject #20
       <- resultModel     - class: org.netbeans.modules.search.ui.BasicSearchResultsPanel, value: org.netbeans.modules.search.ResultModel #2
        <- visualComponent     - class: org.netbeans.modules.search.ResultViewPanel, value: org.netbeans.modules.search.ui.BasicSearchResultsPanel #2
         <- lastXICFocussedComponent (JNI global)     - class: sun.awt.X11.XInputMethod, value: org.netbeans.modules.search.ResultViewPanel #2
Comment 4 Jaroslav Havlin 2014-05-02 12:23:30 UTC
(In reply to Tomas Hurka from comment #3)
> In Exception #720376 OOME is caused by long tooltip. See
> javax.swing.JToolTip#3 and the tooltip is probably created by search. See
> patch to GC root for char[]#206039
Thank you, Tomas, for evaluation.
Fixed: http://hg.netbeans.org/core-main/rev/d7f9d9044926
Comment 5 Jaroslav Havlin 2014-05-02 14:25:36 UTC
Exception #714254:
 - Class with the highest retained size is TextDetail$DetailNode.
 - Line text is stored in node attribute "output line".
 - This is a duplicate of bug 236805 (already fixed in NetBeans 8.0).

Exception #704025.
 - Object with the highest retained size is an NbMavenProject.
 - Its "files" field (ArrayList) contains a lot of duplicate items.
 - Duplicate of bug 216001.

Other exceptions are quite old (7.3 Beta, 6.5.1).

Closing this issue as fixed.
Thank you for reporting.
Comment 6 Quality Engineering 2014-05-03 05:02:11 UTC
Integrated into 'main-silver', will be available in build *201405030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d7f9d9044926
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #243645: Out of memory - Tooltip in search results