Java.lang.NullPointerException (again...)

Hi all!
I post here in s1tbx since I have this problem using interferometric tools, but it might be reported as a snap error.

I am experiencing a java.lang.NullPointerException problem since the installation of snap 3.0. Upgrades do not solve the problem.

This error comes using S1 TOPS Coregistration (both ESD assisted or not), S1 TOPS Split, but not during the opening of an image, nor in inspection/visualization of a particular band, nor in S1 TOPS Merge (I just tried to apply some other S1 processor to check if they were all malfunctioning, but I have not tried them all).

This problem does not occur while getting back to snap 2.0.2.

The machine is an intel i7-based HP workstation running Debian 4.4.6-1 (2016-03-17) x86_64 GNU/Linux.
Any hint?

Thank you again for your suggestions and assistance.
G.

The details for the exception follow:

java.lang.NullPointerException
	at javax.swing.plaf.basic.BasicSliderUI.recalculateIfInsetsChanged(BasicSliderUI.java:946)
	at javax.swing.plaf.basic.BasicSliderUI.getPreferredSize(BasicSliderUI.java:469)
	at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
	at java.awt.GridBagLayout.GetLayoutInfo(GridBagLayout.java:1115)
	at java.awt.GridBagLayout.getLayoutInfo(GridBagLayout.java:916)
	at java.awt.GridBagLayout.preferredLayoutSize(GridBagLayout.java:736)
	at java.awt.Container.preferredSize(Container.java:1796)
	at java.awt.Container.getPreferredSize(Container.java:1780)
	at javax.swing.JComponent.getPreferredSize(JComponent.java:1664)
	at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:791)
	at java.awt.Container.layout(Container.java:1510)
	at java.awt.Container.doLayout(Container.java:1499)
	at java.awt.Container.validateTree(Container.java:1695)
	at java.awt.Container.validateTree(Container.java:1704)
	at java.awt.Container.validate(Container.java:1630)
	at javax.swing.plaf.basic.BasicTabbedPaneUI.ensureCurrentLayout(BasicTabbedPaneUI.java:1447)
	at javax.swing.plaf.basic.BasicTabbedPaneUI.tabForCoordinate(BasicTabbedPaneUI.java:1488)
	at javax.swing.plaf.basic.BasicTabbedPaneUI.tabForCoordinate(BasicTabbedPaneUI.java:1482)
	at javax.swing.JTabbedPane.getToolTipText(JTabbedPane.java:1757)
	at javax.swing.ToolTipManager$insideTimerAction.actionPerformed(ToolTipManager.java:663)
	at javax.swing.Timer.fireActionPerformed(Timer.java:313)
	at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	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:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	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)

Yes, this is a problem under linux when using certain look and feel themes
which do not have defaults set. If you run once with root privileges it
may set these defaults or you could change the look and feel in tools
options appearance to Metal.

the next update will remove this Jide slider and replace it with two built
in java sliders to avoid the issue.

Thank you Luis for the explanation, I’ll try to fix the problem with my settings.
Giorgio

Using “Metal” as look and feel theme has solved the problem,

thank you Luis.

G.

Java.lang.NullPointerException

I am getting this error while running Coregistartion tool in SNAP

My OS is window 7.

System configration is i5 with 4 GB RAM and 64-bit.

Can anyone help m,e out in this?

Just saying there is a NullPointerException is not much helpful. We need some more information.
Please reproduce the error and the go to Help / Show Log Directory and open the file messages.log in a text directory.
There you should see an exception at the end. Please post the whole stack trace.

Can’t find the session log

I am snap Latest SNAP version Can you help?

This log directory exists since version 5.0.
So please update. Maybe this also solves your problem.

@lveci & @marpet i am facing the same problem (Java.lang.NullPointerException) while generating DEM through Interferometric->Products->Phase to Elevation even using SNAP 5.0. OS is windows 8.
I hereby attach log text file with this message, Please have a look and guide me how to solve it.messages.log (75.6 KB)

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)

I think nobody has the solution of this problem. I have only one hope now. @ABraun must have it’s solution. Please help me.

unfortunately not, sorry.
What were the steps you performed before phase to height to elevation?

  1. Used two SLC images of same area with different dates.
  2. Radar -> Coregistration-> S1 TOPS coregistration -> S1 TOPS Coregistration
  3. Radar -> Interferometric -> Products -> Interferogram Formation
  4. Radar -> Sentinel-1 TOPS -> S1-TOPS deburst
  5. Radar -> Interferometric -> Filtering -> Goldstein Phase Filtering
  6. Radar -> Interferometric -> unwrapping -> Snaphu export
    Used Statistical cost mode: TOPO & Initial method: MCF for DEM in Snaphu Export
  7. Run Snaphu
  8. Radar -> Interferometric -> unwrapping -> Snaphu import
  9. Radar -> Interferometric -> Products -> Phase to Elevation
    Error: Java.lang.NullPointerException
  10. Radar -> Interferometric -> Products -> Phase to Height
    Nothing is happening. No output when use Phase to Height

Hi @ABraun, i have crossed that error hurdle and have successfully generated DEM using
Radar -> Interferometric -> Products -> Phase to Elevation
But the result isn’t looking good. Means the elevation values are very different as compare to SRTM DEM.
Please have a look on some snapshots:


Did i do something wrong? I need to solve this as my senior has promised me for dinner party if i generate perfect DEM. I will surely mention your name to him :stuck_out_tongue:

What has helped to get around the NullPointerException? The information might help the developer to prevent this exception in the future.

I don’t think so. Only areas with high coherence can have good dem quality. Did you check your coherence image?

If I understood it right phase to height generally causes an error and phase to elevation doesn’t.

I did nothing, i just changed my study area. Previous images were of different dates like 13th Oct & 18th Nov but when i changed my study area, i took 15th & 27th January data. Big difference between dates can be a reason. In previous data i was running the process on some subset area but this time i used whole scene. I don’t exactly know what the reason of the error was.

Ya i have checked coherence image and posting a snapshot for you. Please have a look. Actually the problem is typical negative and positive values of elevation. You can see it on the screenshots which i posted yesterday. Some snapshots is posting for your review.

as you see only very few pixels have high coherence. That means information in all other pixels cannot be trusted.

Please read here for an explanation: