Java.lang.NullPointerException (again...)

Thank you so much for your reply Andreas. Your replies always help me.

Hi @ABraun, thank you very much for your advises. Now i have generated some relevant DEM outout. One more help i need. can you please tell me how can i make smooth DEM from the output?

There are some filters you could try when you right-click a band and select Filter band

Thank you very much once again @ABraun

@ABraun @smohit , the problem Java.lang.NullPointerException the problem is generated using the tool Phase to Elevation ( DEM generation) when use a subset from the image. Must be with all image unwrapped phase.

it’s still a bit strange to me, I tried some other examples based on S1 SLC products and the phase to elevation operator works just fine. Haven’t found out what exactly causes the java error.

Me neither @ABraun, but i also did many tests and always i worked whit subset image, because snaphu process take a lot time. In fact, for all swath of interest took 6 hours to generate unwrapped phase… And the phase to height operator works on S1-Toolbox, since snap software does not do nothing.

Greetings and thanks you @ABraun

unwrapping in snaphu surely takes a lot of time. Sometimes increasing the tile numbers can be favourable.

Hi all,
I´ve been experiencing the same java exception problem while doing Phase to Elevation procedure.
I am using SNAP 5.0.8. on Win7 64bit.
I did experiments with multiple input data and actually couldn´t find a pattern in which circumstances this error appears and in which not.
This case caused mentioned error every time I tried:
Datasets:
S1B_IW_SLC__1SDV_20170309T072134_20170309T072204_004628_00811B_C76D.SAFE
S1B_IW_SLC__1SDV_20170321T072134_20170321T072204_004803_00863A_4D19.SAFE
From both datasets I extracted IW3 Bursts 9 and 10 during Corregistration.
Then I did all the steps in order to compute DEM from those. Everything looked fine until I tried to compute Phase to Elevation.

Interesting thing is that when I did this procedure with IW2 from same radar image pair, Phase to Elev worked just fine.
When I merged IW2 and IW3 prior the interferogram generation, I got again the Java exeption error in the end during Phase to Elevation. It looks, there must be some kind of problem with IW3 part of the image which I don´t understand.

Log:

 org.esa.snap.core.gpf.OperatorException: java.lang.NullPointerException
at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:421)
at org.esa.s1tbx.insar.gpf.PhaseToElevationOp.computeTileStack(PhaseToElevationOp.java:336)
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: java.lang.NullPointerException
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)

Many thanks for your suggestions,
Jan

what can i do?

I think @lveci explained very well what you can do

Even i am experiencing the same problem when i use gpt for processing my data.

java.lang.NullPointerException
at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80)
at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257)
at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087)
at javax.media.jai.OpImage.getTile(OpImage.java:1142)
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:2453)
at org.esa.snap.core.datamodel.Band.computeStxImpl(Band.java:504)
at org.esa.snap.core.datamodel.RasterDataNode.getStx(RasterDataNode.java:2420)
at org.esa.snap.core.datamodel.RasterDataNode.createDefaultImageInfo(RasterDataNode.java:1827)
at org.esa.snap.core.datamodel.Band.createDefaultImageInfo(Band.java:483)
at org.esa.snap.core.datamodel.RasterDataNode.getImageInfo(RasterDataNode.java:1809)
at org.esa.snap.core.datamodel.RasterDataNode.getImageInfo(RasterDataNode.java:1792)
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:271)
at org.esa.snap.rcp.actions.window.OpenImageViewAction.access$100(OpenImageViewAction.java:69)
at org.esa.snap.rcp.actions.window.OpenImageViewAction$1.doInBackground(OpenImageViewAction.java:236)
at org.esa.snap.rcp.actions.window.OpenImageViewAction$1.doInBackground(OpenImageViewAction.java:213)
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:221)
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)

Kindly, help me to solve this.

MY gpt xml file : myGraph2.xml (5.5 KB)

Hi everybody.

I’m having the following error:
java.lang.NullPointerException
at org.esa.snap.engine_utilities.datamodel.AbstractMetadata.getBandAbsMetadata(AbstractMetadata.java:377)
at org.esa.s1tbx.commons.Sentinel1Utils.getCalibrationVectorList(Sentinel1Utils.java:933)
at org.esa.s1tbx.commons.Sentinel1Utils.getCalibrationPixel(Sentinel1Utils.java:958)
at org.esa.s1tbx.sentinel1.gpf.TOPSARDeburstOp.getMergedPixels(TOPSARDeburstOp.java:670)
at org.esa.s1tbx.sentinel1.gpf.TOPSARDeburstOp.updateCalibrationVector(TOPSARDeburstOp.java:630)
at org.esa.s1tbx.sentinel1.gpf.TOPSARDeburstOp.updateOriginalMetadata(TOPSARDeburstOp.java:570)
at org.esa.s1tbx.sentinel1.gpf.TOPSARDeburstOp.updateTargetProductMetadata(TOPSARDeburstOp.java:415)
at org.esa.s1tbx.sentinel1.gpf.TOPSARDeburstOp.initialize(TOPSARDeburstOp.java:142)
Caused: org.esa.snap.core.gpf.OperatorException
at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:415)
at org.esa.s1tbx.sentinel1.gpf.TOPSARDeburstOp.initialize(TOPSARDeburstOp.java:145)
at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:486)
at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:273)
at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:387)
at org.esa.snap.core.gpf.GPF.createProductNS(GPF.java:330)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:305)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:284)
at org.esa.snap.graphbuilder.rcp.dialogs.SingleOperatorDialog.createTargetProduct(SingleOperatorDialog.java:175)
[catch] at org.esa.snap.graphbuilder.rcp.dialogs.SingleOperatorDialog.onApply(SingleOperatorDialog.java:287)
at org.esa.snap.ui.AbstractDialog.lambda$initUI$6(AbstractDialog.java:519)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

This error appears in ESA SNAP 7, working in Ubuntu 18.04 and in W10, when I try to do a deburst process in a image downloaded from Creodias. From images downloaded from Copernicus Sci Hub the deburst processing works completely normal. I suspect there is a problem with metadata in Creodias images, but I don’t know.

Thanks for the help.

@kraftek should be able to help you.

Hello @aguirrep.

We are also performing multiple S1 processing on CreoDIAS (with the S1 products found there), deburst being one of the steps. We use SNAP 6, but I also tried with SNAP 7 RC. How do you “download” the products? We make use of them directly from their data bucket, from VMs on their cloud. Is that also your case?
I will also try with SNAP 7 (not RC) and will come back to you with the results.

Using windows 10 gpu system. I am facing same issue while trying to run KNN on my image data. It is a SAR image in .tiff format (target decomposition result). Changing the window appearance to metal dowsn’t resolve the issue. Please help.
Below is the log-
SEVERE [org.esa.snap]: JAI error occurred: ‘Problem occurs when computing a tile by the owner.’ at com.sun.media.jai.util.SunTileScheduler@4df3824f
java.lang.NullPointerException
at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(OperatorImageTileStack.java:128)
at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(OperatorImageTileStack.java:85)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
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)
[catch] 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)
at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)