I am getting the following error while executing the program.
And this is not always happening. The code contains some complex calculations with a large volume of data
This indicates an error in the JVM itself.
First you need to be absolutely certain your hardware - notably your memory - is in order. Run memcheck to find out (the easiest way may be to boot on a Ubuntu install media, and pick it from the boot menu).
Fix any hardware issues found.
If problem persists, ensure you are running the latest version of the Java distribution you are using. If you run OpenJDK consider downloading an Oracle build, and vice versa. If you do not need 64-bit consider using a 32-bit JVM.
This link is very useful when diagnosing crash dumps. However, if you're not using native code I would suggest upgrading (or perhaps even downgrading) your JVM to avoid this issue. That's often the fastest way to resolve such issues.
It may not a problem from your JVM; If you're using native code in your Java code, you should confirm the parameter list of Java function is consistent with your native function.
I referred this link: https://askubuntu.com/questions/396525/eclipse-crashing-on-startup
It says:
To solve this issue, try to put this line (slightly different from -Dorg...):
org.eclipse.swt.browser.DefaultType=mozilla
at the end of this file
eclipse/configuration/config.ini
The crash is in the jvm JIT compiler. You could try turning off the compiler to see if it helps to diagnose the issue. Use the -Xint option.
I had a similar case and I could repair changing my from Oracle SDK to OpenSDK, and verify if your library is compaible with your java version