pipeline containing a BandMath failed

Description

Due to my project's constraint, I have to use the development version of OTB and an issue occur when I'm trying to chain OTB's applications in memory. In fact, the error comes if a "BandMath" is in a pipeline containing others applications. The error is :

itk::ERROR: MultiThreader(0x1d40f70): Exception occurred during SingleMethodExecute
...
itk::ERROR: Region ImageRegion (0x7fff17b9cd30)
  Dimension: 2
  Index: [0, 0]
  Size: [50, 2]
 is outside of buffered region ImageRegion (0x1d17b50)
  Dimension: 2
  Index: [0, 0]
  Size: [0, 0]

No errors if only BandMath are used.

Steps to reproduce

python concatenate.py -input_img input.tif -output_img output.tif

Is a python's object is deleted and broke the pipeline ?

Configuration information

The bug has been highlight :

  • using OTB's version : 0df44b31 (last available commit into develop branch)
  • using dependencies provided in last SuperBuild
  • using python 3.5.2