Opened 7 years ago

Closed 7 years ago

#5808 closed defect (fixed)

"Illegal nBlockYOff value" with mask overviews

Reported by: cdestigter Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords:
Cc:

Description (last modified by cdestigter)

A simple gdal_translate using overviews fails with heaps of these errors:

$ gdal_translate -outsize 50% 50% in.tif out.tif

Input file size is 249, 238
0ERROR 5: Illegal nBlockXOff value (1) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: Illegal nBlockXOff value (1) in GDALRasterBand::GetLockedBlockRef()

...

ERROR 5: Illegal nBlockYOff value (1) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: Illegal nBlockYOff value (1) in GDALRasterBand::GetLockedBlockRef()

This image has a mask band with overviews (FWIW, all the overviews look okay to me when extracted with tiffsplit). The issue goes away if I clear the overviews from in.tif using gdaladdo -clean.

Attached in.tif and an strace log.

Occurs using trunk gdal (at https://github.com/osgeo/gdal/commit/e3cc4342808960c9e0b3a7b40f421aeb0c4db5c5 )

Attachments (3)

5808-output.txt (18.5 KB) - added by cdestigter 7 years ago.
in.tif (142.4 KB) - added by cdestigter 7 years ago.
5808-strace.txt (83.6 KB) - added by cdestigter 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by cdestigter

Description: modified (diff)
Summary: "Illegal nBlockYOff value" when translating from overviews"Illegal nBlockYOff value" with mask overviews

Changed 7 years ago by cdestigter

Attachment: 5808-output.txt added

Changed 7 years ago by cdestigter

Attachment: in.tif added

Changed 7 years ago by cdestigter

Attachment: 5808-strace.txt added

comment:2 Changed 7 years ago by Jukka Rahkonen

This gives an error also

gdal_translate in.tif out.tif
Input file size is 249, 238
0...10...20...30...40...50...60...70...80...90...100 - done.
ERROR 1: Input and output band sizes do not
match in GDALRasterBandCopyWholeRaster()

However, creating a bit bigger image goes well:

gdal_translate -outsize 200% 200% in.tif out.tif
Input file size is 249, 238
0...10...20...30...40...50...60...70...80...90...100 - done.

I suggest to make some more tests with bigger originals.

comment:3 Changed 7 years ago by Even Rouault

Resolution: fixed
Status: newclosed

trunk r28310 "RasterIO: scale floating point window of GDALRasterIOExtraArg structure when using overviews (#5808, trunk only)"

Note: See TracTickets for help on using tickets.