SNAP error

I have downloaded SNAP and installed on my desktop…Once i have downloaded image i have clicked on manifest safe…when i click on bands Amplitude VH instead of crreating image it is showing I/O error reading image meta data view.java.lang.RuntimeException: javax.imageIO.IIOException…Anyone can find the answer ?

1 Like

Can you try to download the data again. Maybe it is corrupted during the download.
Can you also provide more of the exception text. This would help to give you a proper answer.

I have downloaded the image 3 times and have reinstalled the SNAP also 3 times…when i click on band amplitude and intensity instead of creating image SNAP error is showing
I/O error reading image meta data
** view.java.lang.RuntimeException: javax.imageIO.IIOException…"

1 Like

Can’t you click on a details button which might offer some more information?
Or do you have red stop sign in right bottom corner after the error occurred? Maybe there more information is shown.

If both ways doesn’t give valuable information there is a third way.
Please attach the log file here.
Assuming you are working on windows, you can find it in a hidden folder in your user directory.
You can either change the visibility settings or enter the path to the directory manually.
The log file is located in “$USER_HOME\AppData\Roaming\SNAP\var\log”
For me it is “C:\Users\Marco\AppData\Roaming\SNAP\var\log”
Pick the messages.log file and attach to your post.

here is my error…

Have you tried the same with other S1 products?

I see that you are hit by at least two errors. One is the BufferUnderflowException which is shown in the dialog. But this is not the one which prevents the opening of an image.
In the exception dialog there is the previous button. If you click on it you should see the other exception which causes the problem.

java.io.IOException: No memory left for cache!
at javax.imageio.stream.MemoryCache.loadFromStream(Unknown Source)
at javax.imageio.stream.MemoryCacheImageInputStream.read(Unknown Source)
at javax.imageio.stream.ImageInputStreamImpl.readShort(Unknown Source)
at javax.imageio.stream.ImageInputStreamImpl.readUnsignedShort(Unknown Source)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFIFD.initialize(TIFFIFD.java:237)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageMetadata.initializeFromStream(TIFFImageMetadata.java:147)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.readMetadata(TIFFImageReader.java:664)
Caused: javax.imageio.IIOException: I/O error reading image metadata!
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.readMetadata(TIFFImageReader.java:670)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage(TIFFImageReader.java:618)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage(TIFFImageReader.java:576)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.prepareRead(TIFFImageReader.java:1327)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.readAsRenderedImage(TIFFImageReader.java:1374)
at org.esa.s1tbx.io.imageio.ImageIOFile.getData(ImageIOFile.java:313)
at org.esa.s1tbx.io.imageio.ImageIOFile.readImageIORasterBand(ImageIOFile.java:266)
at org.esa.s1tbx.io.sentinel1.Sentinel1ProductReader.readBandRasterDataImpl(Sentinel1ProductReader.java:132)
at org.esa.snap.core.dataio.AbstractProductReader.readBandRasterData(AbstractProductReader.java:250)
at org.esa.snap.core.image.BandOpImage.computeProductData(BandOpImage.java:67)
at org.esa.snap.core.image.RasterDataNodeOpImage.computeRect(RasterDataNodeOpImage.java:127)
Caused: java.lang.RuntimeException
at org.esa.snap.core.image.RasterDataNodeOpImage.computeRect(RasterDataNodeOpImage.java:129)
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 org.esa.snap.core.datamodel.StxFactory.accumulateTile(StxFactory.java:339)
at org.esa.snap.core.datamodel.StxFactory.accumulate(StxFactory.java:323)
at org.esa.snap.core.datamodel.StxFactory.accumulate(StxFactory.java:296)
at org.esa.snap.core.datamodel.StxFactory.create(StxFactory.java:200)
at org.esa.snap.core.datamodel.StxFactory.create(StxFactory.java:274)
at org.esa.snap.core.datamodel.RasterDataNode.computeStxImpl(RasterDataNode.java:2371)
at org.esa.snap.core.datamodel.Band.computeStxImpl(Band.java:504)
at org.esa.snap.core.datamodel.RasterDataNode.getStx(RasterDataNode.java:2338)
at org.esa.snap.core.datamodel.RasterDataNode.createDefaultImageInfo(RasterDataNode.java:1746)
at org.esa.snap.core.datamodel.Band.createDefaultImageInfo(Band.java:483)
at org.esa.snap.core.datamodel.RasterDataNode.getImageInfo(RasterDataNode.java:1728)
at org.esa.snap.core.datamodel.RasterDataNode.getImageInfo(RasterDataNode.java:1711)
at org.esa.snap.core.image.ImageManager.prepareImageInfos(ImageManager.java:834)
at org.esa.snap.core.image.ColoredBandImageMultiLevelSource.create(ColoredBandImageMultiLevelSource.java:51)
at org.esa.snap.core.image.ColoredBandImageMultiLevelSource.create(ColoredBandImageMultiLevelSource.java:47)
at org.esa.snap.core.image.ColoredBandImageMultiLevelSource.create(ColoredBandImageMultiLevelSource.java:41)
at org.esa.snap.ui.product.ProductSceneImage.(ProductSceneImage.java:69)
at org.esa.snap.rcp.actions.window.OpenImageViewAction.createProductSceneImage(OpenImageViewAction.java:181)
at org.esa.snap.rcp.actions.window.OpenImageViewAction.access$000(OpenImageViewAction.java:61)
at org.esa.snap.rcp.actions.window.OpenImageViewAction$1.doInBackground(OpenImageViewAction.java:129)
at org.esa.snap.rcp.actions.window.OpenImageViewAction$1.doInBackground(OpenImageViewAction.java:124)
at com.bc.ceres.swing.progress.ProgressMonitorSwingWorker.doInBackground(ProgressMonitorSwingWorker.java:55)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused: java.util.concurrent.ExecutionException
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at javax.swing.SwingWorker.get(Unknown Source)
[catch] at org.esa.snap.rcp.actions.window.OpenImageViewAction$1.done(OpenImageViewAction.java:143)
at javax.swing.SwingWorker$5.run(Unknown Source)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
at sun.swing.AccumulativeRunnable.run(Unknown Source)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
at javax.swing.Timer.fireActionPerformed(Unknown Source)
at javax.swing.Timer$DoPostEvent.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

OK. Thanks.
How much memory does you computer have? Maybe it is not enough.

ok… Thank you…4GB RAM… i will try with the other drive which i have in my computer… And i would like to know do u have any prerequisite before installing this SNAP? i have installed Java 8…
1)Any settings need to be done before install?
2)When i select tiff from measurement folder it is getting loaded in the SNAP as a mirror image…

Yes, 4GB is maybe not enough for working with the S1 data. I have 8GB and I haven’t experienced such a problem till now.

  1. There are no prerequisites before installing this SNAP. It comes with its own Java version.
  2. I’m not an expert for the S1 data. But for me if I open the TIFF directly it is neither mirrored nor flipped.
1 Like

ok Thank you… i will try it… If any queries i will post…

In Tools->Options->S1TBX you can check “Use file cache in readers to conserve memory”. If you .snap cache folder is on an SDD you won’t notice it too much otherwise it may be slower but it will avoid this.

2 Likes

Its working thank you so much…

rg.esa.snap.core.gpf.OperatorException: Terrain-Correction: Java heap space
at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:386)
at org.esa.s1tbx.sar.gpf.geometric.RangeDopplerGeocodingOp.computeTileStack(RangeDopplerGeocodingOp.java:1038)
at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(OperatorImageTileStack.java:116)
at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(OperatorImageTileStack.java:85)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
Caused: org.esa.snap.core.gpf.OperatorException: Terrain-Correction: Java heap space
at org.esa.snap.core.gpf.internal.OperatorExecutor$GPFImagingListener.errorOccurred(OperatorExecutor.java:375)
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:420)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:406)
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)

I am using 4GB memory… i have changed the settings in folder(C:\Users\shalini.snap\etc\snap)
#SNAP configuration ‘snap’
#Mon Jan 25 11:29:49 IST 2016
s1tbx.readers.useFileCache=true
true=
snap.cachedir=C:\Users\shalini\.snap\var\cache
-Dsun.awt.nopixfmt=true
…=
false=
snap.jai.defaultTileSize=512
-Dsun.java2d.noddraw=true
snap.jai.tileCacheSize=1024
snap.pixelGeoCoding.fractionAccuracy=false
snap.parallelism=4
snap.gpf.disableTileCache=
-Dsnap.gpf.disableTileCache=false
-Xmx3000m=
-Xms1000m=
snap.worldwind.useFlatEarth=false
snap.gpf.useFileTileCache=
-Dsnap.gpf.useFileTileCache=true
-Dsun.java2d.dpiaware=false
-Xverify=none
snap.adjustPinGeoPos=true
-Dnetbeans.mainclass=org.esa.snap.main.Main
-XX=+AggressiveOpts

i have changed this by referring forum…

Please help in this?

You should increase the amount of RAM in your system, it is unlikely that 4GB will be enough even if the settings are tweaked. In order to properly benefit from more memory you should have a 64-bit operating system.

Thanks. I will definitely download a sentinel-1 file and try it again.

Thank you so much. I was able to open the file.

Hi,

I got an issues thatI think may be related.
when running python3 code with snappy commands I get the following error after trying to write out a Sentinel 1 image that I read in just prior:

ProductIO.writeProduct(sentinel_1, out_subset_name, ‘ENVI’, createProgressMonitor())
RuntimeError: java.lang.RuntimeException: javax.imageio.IIOException: I/O error reading image metadata!

This happens on a server linux system (w/o gui) while I do not have the issue with the same data and code on a windows system, which makes me think it is an installation problem.
How to trace it? Could it be memory? OR something related to the java install?
Thanks for your feedback. Mark

When I look at the following two threads I think it is a memory problem:


There are more threads. Maybe they are helpful for you:
http://forum.step.esa.int/search?q=reading%20image%20metadata