Python in-memory pipeline ZonalStatistics error with small images : free(): invalid next size (fast)
I have a python script (pyotb) that is supposed to work nicely, here is the workflow :
BandMath -> ConcatenateImages -> BandMathX -> ManageNoData -> ZonalStatistics (the only output on disk is a gpkg vector file)
I'm looping on directories to process Theia's Sentinel2 products one by one.
The script works well with average size images (~ 2000x2000), but now I'm trying to use it with a smaller ROI.
Input cropped images are 179x189 pixels.
And I always run into the following error :
free(): invalid next size (fast)
IOT instruction (core dumped)
Which is even more strange is that the script is working well when launched with valgrind
(but quite slow as expected with this program).
So I can't send you a proper memory trace, since the error does not occur with the valgrind command.
The python verbose mode does not help.
I attached the OTB debug log. Not really useful either.
debug.log
I can confirm this is failing at the end of the pipeline (after the ZonalStatistics app exec, when it should flush to disk).
Same error with OTB 7.4 or 8.1.1. My system is Ubuntu 22.04.
Any ideas ?