#3509 closed defect (fixed)
JP2KAK errors out on JPIP URL ending in *.jp2
Reported by: | gbriggs | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.8.0 |
Component: | GDAL_Raster | Version: | svn-trunk |
Severity: | normal | Keywords: | JPEG2000 JP2KAK JPIPKAK |
Cc: |
Description
The following command fails: C:\gdal170\bin>gdal_translate.exe jpip://216.150.195.220/JP2Server/qb_boulder_pan_20bit.jp2 "C:\gdal_qb_boulder_msi_Byte.img"
The command throws the following error and also generates a memory exception because of an attempt to access a NULL pointer: ERROR 4: JPIP Protocol not supported by GDAL with Kakadu 3.4 or on Unix.
This particular problem originally manifested on a test server internal to ITT VIS. However, the error also manifests when trying to access a JPIP stream that does not actually exist with the ".jp2" extension.
This error message is reported from jp2kakdataset.cpp (line 1159). I believe it is a result of the JP2KAK driver incorrectly deciding it can open the URL above because it ends with the JP2 extension.
If the JP2KAK driver is removed from the GDAL build, the commandline above executes correctly using the JPIPKAK GDAL driver. One possible fix would be to change the order of the GDAL drivers' tests for open (i.e. put JPIPKAK before JP2KAK in the list). However, a better fix would involve a more comprehensive check in the JP2KAK driver to ensure any JPIP URL is not mistaken for a JP2 file. (of course this check would need to be disabled if the preprocessor directive USE_JPIP was defined)
Change History (3)
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 14 years ago
Keywords: | JPEG2000 added; JPIP JP2 JPEG200 removed |
---|
comment:3 by , 14 years ago
Milestone: | → 1.8.0 |
---|
Appropriate adjustments to JP2KAK driver made so that if USE_JPIP is not defined while building it (and it isn't unless someone does something special) then jpip urls will be silently ignored by the driver. Changed in trunk (r19419) and 1.6-esri (r19420).