Reputation: 40444
I've looked at the following, nothing helps: How to deal with "java.lang.OutOfMemoryError: Java heap space" error (64MB heap size)
Yesterday Intellij IDEA was working ok. Today when I start the program the following happens:
karl@karl-Dell-Precision-M3800:~/dev/java$ /opt/idea-IC-162.2032.8/bin/idea.sh
(java:7471): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(java:7471): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(java:7471): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(java:7471): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
java.lang.OutOfMemoryError: Java heap space
Dumping heap to /home/karl/java_error_in_IDEA.hprof ...
Unable to create /home/karl/java_error_in_IDEA.hprof: File exists
[ 5467] ERROR - llij.ide.plugins.PluginManager - Java heap space
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3236)
at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:135)
at sun.font.XRGlyphCacheEntry.writePixelData(XRGlyphCacheEntry.java:154)
at sun.font.XRGlyphCache.generateGlyphImageStream(XRGlyphCache.java:217)
at sun.font.XRGlyphCache.uploadGlyphs(XRGlyphCache.java:164)
at sun.font.XRGlyphCache.cacheGlyphs(XRGlyphCache.java:134)
at sun.font.XRTextRenderer.drawGlyphList(XRTextRenderer.java:81)
at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:72)
at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2928)
at sun.swing.SwingUtilities2.drawString(SwingUtilities2.java:593)
at sun.swing.SwingUtilities2.drawStringUnderlineCharAt(SwingUtilities2.java:612)
at javax.swing.plaf.basic.BasicGraphicsUtils.drawStringUnderlineCharAt(BasicGraphicsUtils.java:246)
at com.intellij.ui.plaf.beg.IdeaMenuUI.paint(IdeaMenuUI.java:169)
at com.intellij.ui.plaf.beg.IdeaMenuUI.update(IdeaMenuUI.java:405)
at javax.swing.JComponent.paintComponent(JComponent.java:780)
at javax.swing.JComponent.paint(JComponent.java:1056)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at com.intellij.openapi.wm.impl.IdeMenuBar.paintChildren(IdeMenuBar.java:400)
at javax.swing.JComponent.paint(JComponent.java:1065)
at com.intellij.openapi.wm.impl.IdeMenuBar.paint(IdeMenuBar.java:160)
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.paintToOffscreen(JComponent.java:5217)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
at javax.swing.JComponent.paint(JComponent.java:1042)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
[ 5470] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2016.2.4 Build #IC-162.2032.8
[ 5471] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_112-release
[ 5471] ERROR - llij.ide.plugins.PluginManager - VM: OpenJDK 64-Bit Server VM
[ 5471] ERROR - llij.ide.plugins.PluginManager - Vendor: JetBrains s.r.o
[ 5471] ERROR - llij.ide.plugins.PluginManager - OS: Linux
[ 5471] ERROR - llij.ide.plugins.PluginManager - Last Action:
[ 7947] ERROR - llij.ide.plugins.PluginManager - Java heap space
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3236)
at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:135)
at sun.font.XRGlyphCacheEntry.writePixelData(XRGlyphCacheEntry.java:154)
at sun.font.XRGlyphCache.generateGlyphImageStream(XRGlyphCache.java:217)
at sun.font.XRGlyphCache.uploadGlyphs(XRGlyphCache.java:164)
at sun.font.XRGlyphCache.cacheGlyphs(XRGlyphCache.java:134)
at sun.font.XRTextRenderer.drawGlyphList(XRTextRenderer.java:81)
at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:72)
at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2928)
at sun.swing.SwingUtilities2.drawString(SwingUtilities2.java:593)
at sun.swing.SwingUtilities2.drawStringUnderlineCharAt(SwingUtilities2.java:612)
at javax.swing.plaf.basic.BasicGraphicsUtils.drawStringUnderlineCharAt(BasicGraphicsUtils.java:246)
at com.intellij.ui.plaf.beg.IdeaMenuUI.paint(IdeaMenuUI.java:169)
at com.intellij.ui.plaf.beg.IdeaMenuUI.update(IdeaMenuUI.java:405)
at javax.swing.JComponent.paintComponent(JComponent.java:780)
at javax.swing.JComponent.paint(JComponent.java:1056)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at com.intellij.openapi.wm.impl.IdeMenuBar.paintChildren(IdeMenuBar.java:400)
at javax.swing.JComponent.paint(JComponent.java:1065)
at com.intellij.openapi.wm.impl.IdeMenuBar.paint(IdeMenuBar.java:160)
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.paintToOffscreen(JComponent.java:5217)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
at javax.swing.JComponent.paint(JComponent.java:1042)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
[ 7948] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2016.2.4 Build #IC-162.2032.8
[ 7948] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_112-release
[ 7948] ERROR - llij.ide.plugins.PluginManager - VM: OpenJDK 64-Bit Server VM
[ 7948] ERROR - llij.ide.plugins.PluginManager - Vendor: JetBrains s.r.o
[ 7948] ERROR - llij.ide.plugins.PluginManager - OS: Linux
[ 7948] ERROR - llij.ide.plugins.PluginManager - Last Action:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f966c3184b4, pid=7471, tid=0x00007f95e895c700
#
# JRE version: OpenJDK Runtime Environment (8.0_112-b87) (build 1.8.0_112-release-b343)
# Java VM: OpenJDK 64-Bit Server VM (25.112-b343 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libc.so.6+0x14d4b4]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/karl/java_error_in_IDEA_7471.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)
Apparently I'm out of memory. I know I'm not:
Every 5,0s: free -m Thu Sep 22 09:22:56 2016
total used free shared buff/cache available
Mem: 15950 2047 11913 537 1989 12999
Swap: 3813 0 3813
I also tried the following /opt/idea-IC-162.2032.8/bin/idea.sh -Xms512m
, got the error:
karl@karl-Dell-Precision-M3800:~$ /opt/idea-IC-162.2032.8/bin/idea.sh -Xms512m
(java:10414): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(java:10414): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(java:10414): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(java:10414): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f1a501644b4, pid=10414, tid=0x00007f19c87a4700
#
# JRE version: OpenJDK Runtime Environment (8.0_112-b87) (build 1.8.0_112-release-b343)
# Java VM: OpenJDK 64-Bit Server VM (25.112-b343 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libc.so.6+0x14d4b4]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/karl/java_error_in_IDEA_10414.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)
I run 64-bit so I created the file ~/.IdeaIC2016.2/idea64.vmoptions
with the contents:
-Xms1024m
-Xmx1024m
Still doesn't work.
Upvotes: 1
Views: 3826
Reputation: 40444
Wow, surprised that noone knows anything about this, isn't Java supposed to be huge? Oh well, hers the answer, pretty simple once you know that the IDE runs it's JDK off of an env variable. I just had to set it to a JDK that works instead of it's own inbuilt one.
export IDEA_JDK=/usr/lib/jvm/jdk1.8.0_101/
Upvotes: 3