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

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


Le lundi 28 février 2011 00:20:22, N. Farah a écrit :
> Thanks for the prompt response !
> I assume then that exception is now handled gracefully with open jpeg
> trunk. May be the 'openjpeg.dll' that come withwith
> http://vbkto.dyndns.org:1280/sdk/ is outdated and did not have that fix.
> I'll build it from the open jpeg 2000 trunk and verify the results. Was it
> the trunk ? or branch v2 as mentioned at
> http://gdal.org/frmt_jp2openjpeg.html ? Noureddine Farah

v2 branch. There's no way to build the JP2OPENJPEG driver against openjpeg 
trunk (which is in fact their v1.X branch).

I'm not too sure when I built my openjpeg lib, but the progress of the 
openjpeg v2 branch developement is rather slow. So perhaps, this is an issue 
with the windows build of openjpeg. I remember that Tamas had a hard time to 
build it and make it work with the GDAL driver because of a mess with the 
redefinition of the bool type.

> 
> > From: even.rouault at mines-paris.org
> > To: gdal-dev at lists.osgeo.org
> > Subject: Re: [gdal-dev] gdalinfo crash on a jpeg 2000 file
> > Date: Mon, 28 Feb 2011 00:14:01 +0100
> > CC: nfarah at hotmail.com
> > 
> > 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