[gdal-dev] gdalinfo crash on a jpeg 2000 file

Even Rouault even.rouault at mines-paris.org
Sun Feb 27 18:14:01 EST 2011


Le lundi 28 février 2011 00:02:31, N. Farah a écrit :
> Hi,
> Using gdalinfo from GDAL 1.8 release build
> (http://vbkto.dyndns.org:1280/sdk/) on this jpeg 2000
> file(http://www.openjpeg.org/samples/Facade.j2k) crash ! To debug it I
> built gdal from source and registered only open jpeg 2000 driver: it
> appears that a unhandled exception wasthrown at this line
> if(!opj_read_header(pCodec, &psImage, &nX0, &nY0, &nTileW, &nTileH,
> &nTilesX, &nTilesY, pStream))in JP2OpenJPEGDataset::Open method. The used
> openjpeg.dll is the one that come with http://vbkto.dyndns.org:1280/sdk
> which i assume was a private build fromthe open jpeg branch or trunk.
> Should i file this as ticket with GDAL or probably with open jpeg 2000 ?
> Thanks
> Noureddine Farah

On Linux, with my own build of openjpeg v2 branch, I get a "clean" error :
ERROR 1: Marker is not compliant with its position
ERROR 1: opj_read_header() failed

I'd note that the JP2ECW and JPEG2000 (Jasper) drivers also fail on that 
image. With the JP2MrSID driver I manage to read it, but some parts are very 
blury, so I guess this is a corrupted or corner case image.


More information about the gdal-dev mailing list