I have been trying to write out JPG2000 at the end of a graph process (working with Sentinel-1 data and writing a single band output). There appears to be a peculiar problem whether JP2 or JPG2000 is chosen as the format. I can write BEAM-DIMAP or GEOTIFF no problem, only the JPG2000 format seems to be affected.
The symptoms of the issue seem to suggest the process is stuck in an infinite loop. Watching as the file is being written, I can see the size go up, then it comes back down again, then back up again, then back down again, etc, etc, until I kill snap - even pressing cancel on the graph doesn’t seem to stop the execution.
This behaviour seems to be exclusive to the graph and GPT use, it is not happening if I export the image manually (though I do then get some warnings on importing it into QGIS: Warning 1: Problem with skipping JPEG2000 box, stream error).