Error during snap2stamps export using the snap2stamps python library

Hello all,

I am trying to use the Snap2Stamps library GitHub - mdelgadoblasco/snap2stamps: Using SNAP as InSAR processor for StaMPS for exporting the coregistered SLCs and interferograms to the gamma format required for STaMPS processing.

I have a stack of 10 SLC images, I am getting the following error during Stamps export

#####################################################################

C:\Users\Placeholder\Desktop\Pre-Processing_Module\Project\ifg\20200913_20200727_IW3.dim
[2] Exporting pair: master-slave pair 20200913_20200727_IW3.dim

[‘C:\Program Files\snap\bin\gpt’, ‘C:\Users\Placeholder\Desktop\Pre-Processing_Module\Project\graphs/export2run.xml’, ‘-c’, ‘6G’, ‘-q’, ‘4’]
SNAP STDOUT:INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: GDAL not found on system. Internal GDAL 3.2.1 from distribution will be used. (f0)
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Internal GDAL 3.2.1 set to be used by SNAP.
INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience.
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Internal GDAL 3.2.1 set to be used by SNAP.
Executing processing graph
INFO: org.hsqldb.persist.Logger: dataFileCache open start
first_line_time metadata value is null
last_line_time metadata value is null
– org.jblas INFO Starting temp DLL cleanup task.
– org.jblas INFO Deleted 4 unused temp DLL libraries from C:\Users\PLACEH~1\AppData\Local\Temp
…10%…20%…30%…90% done.
org.esa.snap.core.gpf.OperatorException: Cannot construct DataBuffer.
at org.esa.snap.core.gpf.graph.GraphProcessor$GPFImagingListener.errorOccurred(GraphProcessor.java:389)
at com.sun.media.jai.util.SunTileScheduler.sendExceptionToListener(Unknown Source)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
at javax.media.jai.OpImage.getTile(Unknown Source)
at com.sun.media.jai.util.RequestJob.compute(Unknown Source)
at com.sun.media.jai.util.WorkerThread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Cannot construct DataBuffer.
at com.sun.media.jai.util.DataBufferUtils.constructDataBuffer(Unknown Source)
at com.sun.media.jai.util.DataBufferUtils.createDataBufferFloat(Unknown Source)
at javax.media.jai.ComponentSampleModelJAI.createDataBuffer(Unknown Source)
at javax.media.jai.RasterFactory.createWritableRaster(Unknown Source)
at javax.media.jai.PlanarImage.createWritableRaster(Unknown Source)
at javax.media.jai.SourcelessOpImage.computeTile(Unknown Source)
… 4 more

Error: Cannot construct DataBuffer.

[2] Finished process in 359.611000061 seconds.

#####################################################################

I am able to generate the files

but however I still have this error, can anyone please help?

What can I do about:

is a “Frequently Asked Question”.

Thanks for the reply, @gnwiii. I tried to increase the java_max_mem to 6G. However, I still have the same issue (my system has a max memory of 8GB).

Do you think PSI snap2stamps export needs more than 12G or something?

Looking forward for your reply

8GB ram is suitable for simple examples when learning to use SNAP, but is rarely adequate for serious work. You can try reducing the size of your data, or see if you can get access to a much more powerful system.