Failed to open image view: java.lang.IllegalArgumentException

I have created cloud mask over S2L1C data using FMask tool and I try to use it for masking of sentinel 2 data. I resample created mask to S2 image resolution and add to S2 image as a band. But after using “Band Maths” for masking of clouds I got error message: Failed to open image view. Does enybody know how to solve this problem? Thx

This is the detailed description of error message:

java.lang.IllegalArgumentException: level=6
at com.bc.ceres.glevel.support.AbstractMultiLevelSource.checkLevel(AbstractMultiLevelSource.java:116)
at com.bc.ceres.glevel.support.AbstractMultiLevelSource.getImage(AbstractMultiLevelSource.java:62)
at com.bc.ceres.glevel.support.DefaultMultiLevelImage.getImage(DefaultMultiLevelImage.java:76)
at org.esa.snap.core.image.ImageManager.getLevelImage(ImageManager.java:795)
at org.esa.snap.core.image.ImageManager.getSourceImage(ImageManager.java:103)
at org.esa.snap.core.image.VirtualBandOpImage.addDataToReferredRasterDataSymbols(VirtualBandOpImage.java:306)
at org.esa.snap.core.image.VirtualBandOpImage.computeTile(VirtualBandOpImage.java:235)
[catch] 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:2453)
at org.esa.snap.core.datamodel.Band.computeStxImpl(Band.java:507)
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:486)
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)

Please have a look at the following solution,

Source of the post

Thank you for your response. I read this solution before I created this topic. Mask which I created using FMask has only one band (band_1) and is in TIF format. I also tried to convert it to the BEAM-DIMAP but it didnt help. The same error shows up.
image

You could re-process it and save it from beginning as DEAM-DIMAP!

I found the solution. I have to resample image again after adding to S2 image. There is no error message now.