Opened 13 years ago
Closed 13 years ago
#4030 closed defect (wontfix)
JPEG2000RasterBand::GetColorInterpretation exhausts all memory
Reported by: | wonder | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | svn-trunk |
Severity: | critical | Keywords: | |
Cc: |
Description
Using a jpeg2000 file: http://mapserver.sk/~wonder/qgis/massgis-jpg2k.zip (19 MB)
When called GetColorInterpretation() method on a raster band of that file, the underlying routines start to furiously allocate memory. After few seconds the system get completely unusable due to memory exhaustion and extensive swapping. Note that the dataset is relatively small.
When I run it in gdb, this seems to be the place where the allocations take place:
#0 0x00007fffee3583d3 in jas_matrix_create () from /usr/lib/libjasper.so.1 #1 0x00007fffee3584e9 in jas_seq2d_create () from /usr/lib/libjasper.so.1 #2 0x00007fffee3640ba in ?? () from /usr/lib/libjasper.so.1 #3 0x00007fffee36509c in ?? () from /usr/lib/libjasper.so.1 #4 0x00007fffee365c22 in jpc_decode () from /usr/lib/libjasper.so.1 #5 0x00007fffee35dedf in jp2_decode () from /usr/lib/libjasper.so.1 #6 0x00007fffee35383d in jas_image_decode () from /usr/lib/libjasper.so.1 #7 0x00007ffff3ea0666 in JPEG2000Dataset::DecodeImage (this=0x10190c0) at jpeg2000dataset.cpp:460 #8 0x00007ffff3ea08e0 in JPEG2000RasterBand::GetColorInterpretation (this=0x11950b0) at jpeg2000dataset.cpp:369
Using Ubuntu, JasPer is from libjasper1 package, version 1.900.1-7
Note:
See TracTickets
for help on using tickets.
This is a limitation of the Jasper library unfortunately that must decompress the entire image in one step. Not much that can GDAL do around this...