ESD issue with GPT

It was EPSG: 4258, I changed it for: 4326 (WGS84) and still the same error.

When I run without ESD it’s working, the DEM is used by “Back-geocoding”, so I don’t really get how the DEM could be the problem?

you’re right, the DEM should not be the problem then…
I know that since SNAP 8 some parameters were changed in the ESD operator. Could it be that the graph was created in an earlier version and you are now using SNAP 8?

I’m using Snap8, and the graph is generated through it.
With GPT I just launch the xml generated by saving the previous graph, so it should be the same.

Is that possible that GPT of snap and Snap8 interface are not using the same version ?

Only if you had previous versions of SNAP installed and the old one is still in your system (e.g. you have gpt.exe twice)

Are both products covering the same area? Sometimes bursts are shifted along track, especially when you combine Sentinel-1A and 1B

Ok I got it once, good.

Yes, they are two S1A, the process works with the interface without any warning.

in your previous topic the error message was also displayed in the GUI: ESD issue: "Arrays must have the same length."
What has changed since then?

Actually not… I just managed to use subset, and it was working with interface only.
(Here I’am with other datas)

can’t think of a reason why this happened.

In case you inserted the subset operator into the graph - it could be worth a try to re-create the graph from scratch and only connect to the write operator once all steps are included. Sometimes editing existing graphs caused problems in the past.

I did, took all bursts and it took 680 minutes (vs 5min with 3bursts). Works without any problem with interface.
Then used the same graph launched with GPT, same error as previous, but much more “Arrays must have the same length.” messages (see below)

I just guess that there is something different between interface and gpt, can’t think what neither, maybe new version issue… could be good to report to snap’s devs?

Anyway, thanks for your time!

Executing processing graph
...10%...20%...31%..-- org.jblas INFO Starting temp DLL cleanup task.
-- org.jblas INFO Deleted 4 unused temp DLL libraries from C:\Users\ajeannin\AppData\Local\Temp
SEVERE: com.sun.xml.bind.v2.util.XmlFactory: null
org.xml.sax.SAXNotRecognizedException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
        at org.apache.xerces.parsers.AbstractSAXParser.setFeature(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl.setFeatures(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParserImpl(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserFactoryImpl.setFeature(Unknown Source)
        at com.sun.xml.bind.v2.util.XmlFactory.createParserFactory(XmlFactory.java:106)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getXMLReader(UnmarshallerImpl.java:124)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:214)
        at it.geosolutions.imageioimpl.plugins.tiff.gdal.GDALMetadataParser.parse(GDALMetadataParser.java:60)
        at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.initializeFromMetadata(TIFFImageReader.java:1337)
        at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage(TIFFImageReader.java:865)
        at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage(TIFFImageReader.java:822)
        at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.getWidth(TIFFImageReader.java:1080)
        at org.esa.snap.dataio.geotiff.GeoTiffImageReader.getImageWidth(GeoTiffImageReader.java:160)
        at org.esa.snap.dataio.geotiff.GeoTiffProductReader.readProduct(GeoTiffProductReader.java:230)
        at org.esa.snap.dataio.geotiff.GeoTiffProductReader.readProductNodesImpl(GeoTiffProductReader.java:136)
        at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:178)
        at org.esa.snap.engine_utilities.gpf.CommonReaders.read(CommonReaders.java:80)
        at org.esa.snap.engine_utilities.gpf.CommonReaders.readCommonProductReader(CommonReaders.java:59)
        at org.esa.snap.engine_utilities.gpf.CommonReaders.readProduct(CommonReaders.java:33)
        at org.esa.snap.dem.dataio.FileElevationModel.init(FileElevationModel.java:53)
        at org.esa.snap.dem.dataio.FileElevationModel.<init>(FileElevationModel.java:49)
        at org.esa.s1tbx.sentinel1.gpf.BackGeocodingOp.getElevationModel(BackGeocodingOp.java:536)
        at org.esa.s1tbx.sentinel1.gpf.BackGeocodingOp.computeTileStack(BackGeocodingOp.java:486)
        at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(OperatorImageTileStack.java:122)
        at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(OperatorImageTileStack.java:86)
        at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
        at javax.media.jai.OpImage.getTile(Unknown Source)
        at javax.media.jai.PlanarImage.getData(Unknown Source)
        at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
        at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:449)
        at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:435)
        at org.esa.snap.core.gpf.Operator.getSourceTile(Operator.java:459)
        at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.getComplexDoubleMatrix(SpectralDiversityOp.java:992)
        at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.getFineOffsets(SpectralDiversityOp.java:968)
        at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.estimateAzRgOffsets(SpectralDiversityOp.java:958)
        at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.access$200(SpectralDiversityOp.java:110)
        at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp$2.process(SpectralDiversityOp.java:1437)
        at org.esa.snap.core.util.ThreadRunnable.run(ThreadRunnable.java:23)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays must have the same length.
Arrays of the same length are expected.
Arrays of the same length are expected.
Arrays of the same length are expected.
Arrays of the same length are expected.
Arrays of the same length are expected.
Arrays of the same length are expected.
Arrays of the same length are expected.
Arrays of the same length are expected.
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
Waiting thread received a null tile.
90% done.
org.esa.snap.core.gpf.OperatorException: java.lang.NullPointerException
        at org.esa.snap.core.gpf.graph.GraphProcessor$GPFImagingListener.errorOccurred(GraphProcessor.java:379)
        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 javax.media.jai.PlanarImage.getData(Unknown Source)
        at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
        at javax.media.jai.PlanarImage.getExtendedData(Unknown Source)
        at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:447)
        at org.esa.snap.core.gpf.Operator.getSourceTile(Operator.java:479)
        at org.esa.s1tbx.insar.gpf.InterferogramOp.computePartialTile(InterferogramOp.java:1365)
        at org.esa.s1tbx.insar.gpf.InterferogramOp.computeTileStackForTOPSARProduct(InterferogramOp.java:1290)
        at org.esa.s1tbx.insar.gpf.InterferogramOp.computeTileStack(InterferogramOp.java:863)
        at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(OperatorImageTileStack.java:122)
        at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(OperatorImageTileStack.java:86)
        at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
        at javax.media.jai.OpImage.getTile(Unknown Source)
        at javax.media.jai.PlanarImage.cobbleFloat(Unknown Source)
        at javax.media.jai.PlanarImage.getData(Unknown Source)
        at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
        at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:449)
        at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:435)
        at org.esa.snap.core.gpf.Operator.getSourceTile(Operator.java:459)
        at org.esa.s1tbx.sentinel1.gpf.TOPSARDeburstOp.computeTileInOneSwathFloat(TOPSARDeburstOp.java:904)
        at org.esa.s1tbx.sentinel1.gpf.TOPSARDeburstOp.computeTileStack(TOPSARDeburstOp.java:811)
        at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(OperatorImageTileStack.java:122)
        at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(OperatorImageTileStack.java:86)
        at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
        at javax.media.jai.OpImage.getTile(Unknown Source)
        at javax.media.jai.PlanarImage.cobbleFloat(Unknown Source)
        at javax.media.jai.PlanarImage.getData(Unknown Source)
        at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
        at org.esa.snap.core.datamodel.Band.readRasterData(Band.java:309)
        at org.esa.snap.core.dataio.ProductSubsetBuilder.readBandRasterDataRegion(ProductSubsetBuilder.java:393)
        at org.esa.snap.core.dataio.ProductSubsetBuilder.readBandRasterDataImpl(ProductSubsetBuilder.java:330)
        at org.esa.snap.core.dataio.AbstractProductReader.readBandRasterData(AbstractProductReader.java:277)
        at org.esa.snap.core.gpf.common.SubsetOp.computeTile(SubsetOp.java:297)
        at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:82)
        at javax.media.jai.SourcelessOpImage.computeTile(Unknown Source)
        at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
        at javax.media.jai.OpImage.getTile(Unknown Source)
        at javax.media.jai.PlanarImage.getData(Unknown Source)
        at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
        at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:449)
        at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:435)
        at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(OperatorImageTileStack.java:116)
        at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(OperatorImageTileStack.java:86)
        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: org.esa.snap.core.gpf.OperatorException: java.lang.NullPointerException
        at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:440)
        at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.computeTileStack(SpectralDiversityOp.java:827)
        at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(OperatorImageTileStack.java:122)
        at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(OperatorImageTileStack.java:86)
        ... 48 more
Caused by: org.esa.snap.core.gpf.OperatorException: java.lang.NullPointerException
        at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:440)
        at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.estimateAzimuthOffset(SpectralDiversityOp.java:1243)
        at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.computeTileStack(SpectralDiversityOp.java:809)
        ... 50 more
Caused by: java.lang.NullPointerException
        at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.estimateAzimuthOffset(SpectralDiversityOp.java:1117)
        ... 51 more

Error: java.lang.NullPointerException

@estebanaguilera can you please check if you find a bug here?

2 Likes

Any update on this? I get the same error message even with a basic graph.

1 Like

Would you mind sharing the graph file (xml) and the name of the input products? Feel free to anonymize the paths. I can then try to reproduce/troubleshoot.

2 Likes

Hi, of course, please find here an example that is working on SNAP interface but not through GPT.

inSAR_chainv0.xml (6.7 KB)

Thanks for your time!

Thanks for the xml file. I ran it from both the SNAP UI and the command line and both finished successfully. I executed:

$ gpt DinSAR_chainv0.xml -c 16G -q 10

Could you maybe share the contents of your gpt.vmoptions file? and the exact command you use for running GPT?

Oh okay good that it works! Brings me some hope.

I don’t use the gpt.vmoptions file as I’m using a custom command with a fonction reading number of cores and max memory of the computer that is launching the script.

here with a 16cores / 64gb ram:

gpt DinSAR_chainv0.xml -q 14 -J-Xms2G -J-Xmx63G -J-Dsnap.log.level=WARNING -J-Dsnap.jai.defaultTileSize=4096 -J-Dsnap.dataio.reader.tileWidth=4096 -J-Dsnap.dataio.reader.tileHeigh=4096 -J-Dsnap.jai.prefetchTiles=true -c 47G

ps: still my gpt.vmoptions file

####### Enter one VM parameter per line
####### For example, to adjust the maximum memory usage to 512 MB, uncomment the following line:
####### -Xmx512m
####### To include another file, uncomment the following line:
####### -include-options [path to other .vmoption file]
-Xmx44G

Could you try running this?

$ gpt DinSAR_chainv0.xml -c 16G -q 10

If that works, you can start adding the other processing settings (e.g. tile sizes) one by one and see if we can narrow this down.

Also, I wonder what tile sizes have been set up in the SNAP UI. In order to get this, go to Tools -> Options -> Performance and check Tile size (px).

SNAP UI got 512px Tile size. I changed it for 4096px and:
image !

2nd point:
$ gpt DinSAR_chainv0.xml -c 16G -q 10 runned well!

I tried $ gpt DinSAR_chainv0.xml -c 47G -q 14: still good!

512px ok
1024px ok
2048px ok
4096px not ok

What should I understand with this Tile size (px)?

Thanks a lot

Thanks for testing and great to hear that it works. I’d have some more questions:

  1. When do you get the java.lang.NullPointerException? After updating the tile size setting in the SNAP UI? or after running the graph (from the UI) with the new settings?
  2. If you write to disk after applying the TOPSAR-Split operator (per input product). What are the resulting image dimensions of the master and slave? You can check this in the *.data/*.hdr files relative to the output product directory. See samples and lines. I wonder if there’s a mismatch between master and slave dimensions and whether the images are smaller than the tile size.
2 Likes
  1. I get it during the graph process. Seems that whatever the number I update, there is no messages after changing settings.

  2. Only 2 bursts:

Slave:             | Master:
samples = 22849    | samples = 22849
lines = 3016       | lines = 3016

I tried with 10bursts(lines = 15080) thinking that I can then increase the Tile size to 4096px, but ESD estimates overlaping for each burst:

INFO: org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp: Estimating azimuth offset for blocks in overlap: 1/9
Arrays must have the same length.
Arrays must have the same length.
...

So it seems that it’s not possible to go beyond 3016px Tile size for applying ESD to a S1product?!
Thanks a lot!