Java Heap Space Error

A NullPointerException indicates usually some other error, only in some cases, it is caused by a memory issue.
Can you attach the log file please? You can find it by selecting from the menu Help / Show Log Directory. Make sure to reproduce the error first and then attach the messages.log file.

messages.log (67.3 KB)

Greetings marpret,

Please find the attached messages.log file. This file is created now with the same error occurring again.

Regards

org.esa.snap.core.gpf.OperatorException: Java heap space
at org.esa.s1tbx.calibration.gpf.Sentinel1RemoveThermalNoiseOp.computeTile(Sentinel1RemoveThermalNoiseOp.java:635)
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:80)
at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:137)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
Caused: org.esa.snap.core.gpf.OperatorException: Java heap space
at org.esa.snap.core.gpf.internal.OperatorExecutor$GPFImagingListener.errorOccurred(OperatorExecutor.java:376)
at com.sun.media.jai.util.SunTileScheduler.sendExceptionToListener(SunTileScheduler.java:1646)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:921)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085)
at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:407)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:393)
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:73)
at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:137)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:247)
[catch] at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)

Please don’t just post error messages. Tell us about your system (especially RAM) and your data processing.
Many answers and solutions have been proposed for this error im this form. Which ones did you try so far?

Hope you are fine and doing well.
Thank you very much for your reply, here are the solutions I tried after searching the FAQs.

  1. I upgraded my system RAM from 8 Gb to 16 Gb.
  2. I even tried increasing the size of xmx parameter to 32Gb in SNAP interface.

After applying the above settings for my 5th gen laptop, Thermal noise filtering failed with Java Heap Space.

If you have 16 GB you can only increase the xmx parameter to around 12G.
Please have a look at this recent comment about it: S1 TOPS Coregistration error - Java heap space error?

1 Like

Greetings Braun,
I tried your proposed solution but I am afraid its not working for me.
I am using the following imagery.

S1A_IW_GRDH_1SDV_20180809T131313_20180809T131338_023170_028462_871A

I also used Imagery of 2015 and Thermal Noise Removal works fine on that.

What I tried:

I increased the -xmx as suggested by you according to formula of 75%.

Below is the error message:

Operator Exception: Java Heap Error

Could it be that the data is corrupt?
I downloaded it and was able to display VH but not VV

grafik

I couldn’t apply the Thermal Noise Removal either.

1 Like

Dear Braun,

We are a Remote Sensing Research Group,
We have high end Workstations, on which we perform our research work, including devise Algorithms. I have installed Snapped on a Workstation and analysed the mentioned sentinel 1 product, which works fine.
Specs of Workstation
RAM 128 Gb
40 Core Intel Xeon
1 tb SSD
Thermal Noise Filter Works fine.

So the problem was solved by running the process on a more powerful machine?

Dear Braun,
Yes.
I think this issue in SNAP should be resolved by providing proper system requirements for running SNAP, to ensure time efficiency.

The problem with this is that the requirements are very diverse.
It depends on the operators you use and how many you put into a graph.
For some users 4GB is sufficient.
So, it is hard to give a recommendation.

I also have this problem, what should I do?

Dear Yang,
What are your system SPECs?

Re-downloading remote sensing data can solve this problem

Did you solve this problem by downloading another dataset?

Still the original data, just re-downloaded. I solved it

So what is the equation of the cache memory with the available RAM in the Tools\Options\Performance tab? Just how much can one increase the RAM.

this was discussed here: S1 TOPS Coregistration error - Java heap space error?

According to the different opinions, the ideal amount of RAM lies between 50 and 75 % of the total RAM.