S1 Coherence graph always worked but with SNAP 13 I get error

Hi there,

I’ve been using a custom graph to perform bi-temporal coherence of S1 images for several months and with previous SNAP versions it always worked (up until SNAP 11). After update to SNAP 13 I get an error that never occurred, see below.

Is it a bug or something?

Thanks

INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience.
Executing processing graph
Cannot invoke "org.esa.snap.core.datamodel.Band.getUnit()" because "mstBand" is null
 done.

Error: [NodeId: CreateStack(VH)] Cannot invoke "org.esa.snap.core.datamodel.Band.getUnit()" because "mstBand" is null
org.esa.snap.core.gpf.graph.GraphException: [NodeId: CreateStack(VH)] Cannot invoke "org.esa.snap.core.datamodel.Band.getUnit()" because "mstBand" is null
        at org.esa.snap.core.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:73)
        at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:213)
        at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:195)
        at org.esa.snap.core.gpf.graph.GraphContext.initOutput(GraphContext.java:179)
        at org.esa.snap.core.gpf.graph.GraphContext.init(GraphContext.java:98)
        at org.esa.snap.core.gpf.graph.GraphContext.<init>(GraphContext.java:83)
        at org.esa.snap.core.gpf.graph.GraphContext.<init>(GraphContext.java:94)
        at org.esa.snap.core.gpf.graph.GraphContext.<init>(GraphContext.java:58)
        at org.esa.snap.core.gpf.graph.GraphProcessor.executeGraph(GraphProcessor.java:127)
        at org.esa.snap.core.gpf.main.DefaultCommandLineContext.executeGraph(DefaultCommandLineContext.java:115)
        at org.esa.snap.core.gpf.main.CommandLineTool.executeGraph(CommandLineTool.java:611)
        at org.esa.snap.core.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:440)
        at org.esa.snap.core.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:325)
        at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:226)
        at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:131)
        at org.esa.snap.core.gpf.main.GPT.run(GPT.java:60)
        at org.esa.snap.core.gpf.main.GPT.main(GPT.java:37)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.esa.snap.runtime.Launcher.lambda$run$0(Launcher.java:55)
        at org.esa.snap.runtime.Engine.runClientCode(Engine.java:190)
        at org.esa.snap.runtime.Launcher.run(Launcher.java:51)
        at org.esa.snap.runtime.Launcher.main(Launcher.java:31)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
        at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:94)
        at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:25)
Caused by: org.esa.snap.core.gpf.OperatorException: Cannot invoke "org.esa.snap.core.datamodel.Band.getUnit()" because "mstBand" is null
        at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:434)
        at eu.esa.sar.insar.gpf.coregistration.CreateStackOp.initialize(CreateStackOp.java:345)
        at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:546)
        at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:294)
        at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:359)
        at org.esa.snap.core.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:71)
        ... 27 more
Caused by: java.lang.NullPointerException: Cannot invoke "org.esa.snap.core.datamodel.Band.getUnit()" because "mstBand" is null
        at eu.esa.sar.insar.gpf.coregistration.CreateStackOp.getSlaveBands(CreateStackOp.java:548)
        at eu.esa.sar.insar.gpf.coregistration.Create

Dear Massimo,

To help us investigate this issue, could you please share the XML graph you are using?

Thank you!

Dear @diana_harosa , thanks a lot for replying.

Sure please find attached the graph and here below the command to launch it from CLI using two downloaded images:

gpt D:\pcm\data\xml\s1coherence.xml -Pimage1_fpath=D:\pcm\data\s1\S1A_IW_SLC__1SDV_20250709T154050_20250709T154117_060009_07747C_BFE4.SAFE.zip -Pimage2_fpath=D:\pcm\data\s1\S1C_IW_SLC__1SDV_20250715T153939_20250715T154006_003233_006886_8C4E.SAFE.zip -Psubswath=IW1 -Pburst1=2 -Pburst2=4 -Pcoherence_fpath=D:\pcm\data\s1\output\20250709_20250715_IW1_B24_MTC.tif

s1coherence.xml (18.9 KB)

A Jira ticket has already been opened for this issue: SNAP-4106

1 Like

@diana_harosa any update on this issue?

Unfortunately this issue hasn’t been fixed yet. We’ll try to include a fix in a future update. Thank you for your patience.

The problem was caused by CreateStack operator. Maybe you can replace it with Collocate operator in your graph.

I’m using SNAP12 for the graphs using createstack and I’d like to avoid changing the graphs. I’d rather wait for a fix than implementing a work around.