gdal_translate crash when decompressing jpeg2000 files referenced by VRT file
|Reported by:||bledoux||Owned by:||warmerdam|
Context: I am using gdal_translate in order to generate the quicklook of a large image which is composed of mutliple jp2000 tiles referenced by a VRT file. gdal_translate systematically crashes with the sample data set provided. I found a workaround to prevent the crash which consists in disablinbg the multi-threading in the KDU library (setting the config parameter JP2KAK_THREADS to 0) but this workaround is not acceptable for performance reasons.
Steps to reproduce: Extract the dataset attached to this bug.
Command Line: gdal_translate input.vrt test.JPG -of JPEG -ot Byte -b 1 -scale 0 4095 0 255 -outsize 1000 1108 -co QUALITY=90 --config JP2KAK_THREADS 23 # Input file size is 20694, 22925 # 0...10...20...30...40...50...60...70...80...90...ERROR 1: IReadBlock failed at X offset 0, Y offset 0 # ERROR 2: GDALRasterBlock::Internalize : Out of memory allocating 262144 bytes.
# Repetability: each time tested, but not at the same percentage of advance.
# valgrind: says error on futex returning EAGAIN