My Java program crashes (in Eclipse) when I load in a fairly large file.
I have run VisualVM and my CPU seems to peak at 20% usage before crashing and my heap size doesn’t seem too high. The number of threads running at the time of crash is ~20.
I do receive error messages – but not every time the crash occurs. The two error messages I receive are:
[Too many errors, abort]
and
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f096d096942, pid=12102, tid=139678234564352
#
# JRE version: 6.0_24-b24
# Java VM: OpenJDK 64-Bit Server VM (20.0-b12 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea6 1.11.5
# Distribution: Ubuntu 12.04 LTS, package 6b24-1.11.5-0ubuntu1~12.04.1
# Problematic frame:
# J java.util.HashMap.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
I have found a thread pertaining to the second warning, but it seems to suggest a hardware issue. I believe my error is in the software since it only seems to happen in specific instances of larger input files.
Any help is appreciated.
Seems likely it’s an
OutOfMemoryException, although I admit Eclipse usually reports these.However note that the heap size for launched apps is different from the heap size for the IDE itself, and the default is quite small (can’t remember, but it ain’t big).
Look at VM settings for your default launch profile, or change the VM for the app specific launch to add lots of heap with
-Xmx1Gor whatever