Opened 7 years ago

Closed 4 years ago

#4450 closed defect (worksforme)

gdal_translate crash when decompressing jpeg2000 files referenced by VRT file

Reported by: bledoux Owned by: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: 1.8.0
Severity: major Keywords:
Cc:

Description

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

Attachments (1)

bug_gdal_translate_futex_crash_dataset.tgz (442.4 KB) - added by bledoux 7 years ago.

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by bledoux

comment:1 Changed 4 years ago by Kyle Shannon

Resolution: worksforme
Status: newclosed

Works in trunk, closing as stale and fixed:

kyle@kyle-workstation:~/Downloads/simpledataset$ 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...100 - done.
Note: See TracTickets for help on using tickets.