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 252389 - OutOfMemoryError: Java heap space
Summary: OutOfMemoryError: Java heap space
Status: RESOLVED WONTFIX
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-13 17:29 UTC by bdruhan
Modified: 2015-05-29 11:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 217283


Attachments
stacktrace (2.16 KB, text/plain)
2015-05-13 17:29 UTC, bdruhan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bdruhan 2015-05-13 17:29:01 UTC
Build: NetBeans IDE 8.0.2 (Build 201411181905)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.40-b25, Java(TM) SE Runtime Environment, 1.8.0_40-b26
OS: Windows Vista

User Comments:
bdruhan: The design area of the IDE seems to have become corrupted.  My program seemed to be running fine. However, when I returned to the Design tab to edit my MainJFrame there was a message on the main panel "The following execption has been thrown during painting of the form. Use Navigator to fix or remove the problem" and there was a stack trace printed in a custom panel that I had added to the form suggesting a null pointer error. I believe the stack trace and the error are old errors.  I had been receiving null pointer errors at exactly that point in the program, but I debugged  the error and the code builds and runs with no errors.  The only issue seems to be that I cannot use the Design tab because I cannot get rid of the message.  I tried removing the custom panel and adding it back but the message would return.  I tried using a try-catch block to catch the nullpointer exception with e.printStackTrace in the catch block to send a stack trace to the output window, but it did not catch a




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:3332)
   at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
   at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:421)
   at java.lang.StringBuilder.append(StringBuilder.java:136)
   at org.netbeans.core.startup.logging.PrintStreamLogger.print(PrintStreamLogger.java:108)
Comment 1 bdruhan 2015-05-13 17:29:03 UTC
Created attachment 153640 [details]
stacktrace
Comment 2 Tomas Hurka 2015-05-29 11:54:41 UTC
The problem is caused by the following NPE from life.myGrid.paintComponent()

java.lang.NullPointerException
	at life.myGrid.paintComponent(myGrid.java:62)
	at javax.swing.JComponent.paint(JComponent.java:1056)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JViewport.paint(JViewport.java:728)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
	at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:79)
	at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:116)
	at java.awt.Container.paint(Container.java:1973)
	at org.netbeans.modules.form.fakepeer.FakePeerContainer.paint(FakePeerContainer.java:89)
	at javax.swing.JComponent.paintChildren(JComponent.java:903)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at org.netbeans.modules.form.ComponentLayer$DesignerPanel.paint(ComponentLayer.java:190)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at org.netbeans.modules.form.FormDesigner$1.paintChildren(FormDesigner.java:220)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JViewport.paint(JViewport.java:728)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JLayer.paint(JLayer.java:433)
	at javax.swing.plaf.LayerUI.paint(LayerUI.java:79)
	at org.netbeans.core.multiview.SplitLayerUI.paint(SplitLayerUI.java:157)
	at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
	at javax.swing.JComponent.paintComponent(JComponent.java:780)
	at javax.swing.JLayer.paint(JLayer.java:428)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at org.netbeans.swing.tabcontrol.TabbedContainer.paint(TabbedContainer.java:994)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at org.netbeans.core.windows.view.ui.MainWindow$1.paint(MainWindow.java:189)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5219)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1572)
	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1495)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1265)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5167)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4978)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:824)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:807)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:807)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:782)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:731)
	at javax.swing.RepaintManager.access$1300(RepaintManager.java:64)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1720)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:702)
	at java.awt.EventQueue$3.run(EventQueue.java:696)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:719)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

This error is thrown so many times that it filed NetBeans memory and messages.log.