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.

The details for the exception follow:

	at javax.swing.plaf.basic.BasicSliderUI.recalculateIfInsetsChanged(
	at javax.swing.plaf.basic.BasicSliderUI.getPreferredSize(
	at javax.swing.JComponent.getPreferredSize(
	at java.awt.GridBagLayout.GetLayoutInfo(
	at java.awt.GridBagLayout.getLayoutInfo(
	at java.awt.GridBagLayout.preferredLayoutSize(
	at java.awt.Container.preferredSize(
	at java.awt.Container.getPreferredSize(
	at javax.swing.JComponent.getPreferredSize(
	at javax.swing.ScrollPaneLayout.layoutContainer(
	at java.awt.Container.layout(
	at java.awt.Container.doLayout(
	at java.awt.Container.validateTree(
	at java.awt.Container.validateTree(
	at java.awt.Container.validate(
	at javax.swing.plaf.basic.BasicTabbedPaneUI.ensureCurrentLayout(
	at javax.swing.plaf.basic.BasicTabbedPaneUI.tabForCoordinate(
	at javax.swing.plaf.basic.BasicTabbedPaneUI.tabForCoordinate(
	at javax.swing.JTabbedPane.getToolTipText(
	at javax.swing.ToolTipManager$insideTimerAction.actionPerformed(
	at javax.swing.Timer.fireActionPerformed(
	at javax.swing.Timer$
	at java.awt.event.InvocationEvent.dispatch(
	at java.awt.EventQueue.dispatchEventImpl(
	at java.awt.EventQueue.access$500(
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	at java.awt.EventQueue.dispatchEvent(
	at org.netbeans.core.TimableEventQueue.dispatchEvent(
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(
	at java.awt.EventDispatchThread.pumpEventsForFilter(
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(

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.

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

thank you Luis.



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(
at org.esa.s1tbx.insar.gpf.PhaseToElevationOp.computeTileStack(
at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(
at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(
Caused: org.esa.snap.core.gpf.OperatorException: java.lang.NullPointerException
at org.esa.snap.core.gpf.internal.OperatorExecutor$GPFImagingListener.errorOccurred(
at com.bc.ceres.glevel.MultiLevelImage.getData(
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(
[catch] at

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: