You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #14521 (a8bb17e1) is in the GDAL master I'm building against (verified git merge-base --is-ancestor a8bb17e1 427ba0d4 → yes), but the original symptom is not fixed, and a second class of error appears at higher zoom levels.
Mean 1.008. JP2OpenJPEG on the same file returns the expected ~50–150 range. SIGSEGV on dataset close. Visually (WMS zoom-out): random colored bars scattered across the scene, mostly black canvas (on screen below I tried to mask out the NoData).
With CPL_DEBUG=ON Grok emits only one line for the whole read:
GROK: Full image canvas coordinates:
Problem 2 — higher-zoom RasterIO
Once browser zooms in (tiles between full-res and a non-internal overview), logs fill with:
ERROR 1: Corrupt PL marker reports 20142 bytes for packet; parsed bytes are in fact 1
Warning 1: Corrupt packet: tile=0 component=01 resolution=04 precinct=000 layer=00
ERROR 1: Corrupt PL marker reports 20481 bytes for packet; parsed bytes are in fact 1
Warning 1: Corrupt packet: tile=0 component=01 resolution=04 precinct=001 layer=00
ERROR 1: Corrupt PL marker reports 19770 bytes for packet; parsed bytes are in fact 1
Warning 1: Corrupt packet: tile=0 component=02 resolution=04 precinct=000 layer=00
ERROR 1: Corrupt PL marker reports 21460 bytes for packet; parsed bytes are in fact 49
Warning 1: Corrupt packet: tile=0 component=02 resolution=04 precinct=001 layer=00
Every component/precinct at resolution=04 fails. Output again mostly black. Looks like the selective-fetch / PLT-aware byte-range path is reading wrong ranges, then the parser sees the declared PLT length vs what it actually got.
Steps to reproduce the issue
File uploaded to my S3 sample bucket (URL in #14516). Happy to bisect Grok master if useful.
Grok: master @ 135008a65d2ec042e207f9bb589dd4cfd9ff1247 (2026-05-10).
Built from source (CMake, SPDLOG_FMT_EXTERNAL=ON, BUILD_SHARED_LIBS=ON,
with public submodules google/highway, CLIUtils/CLI11, gabime/spdlog).
OpenJPEG: 2.5.3 (upstream v2.5.3 tarball).
rasterio: 1.5.0 linked against the same GDAL build (no PyPI wheel).
Both JP2 drivers compiled in (GDAL_USE_OPENJPEG=ON, GDAL_USE_GROK=ON). Switching at runtime via GDAL_SKIP
(JP2OpenJPEG to use Grok, JP2Grok to use OpenJPEG).
OS: Linux 6.19.11-x64v3-xanmod1, glibc 2.42, gcc 15.2.0.
What is the bug?
Hi,
PR #14521 (
a8bb17e1) is in the GDAL master I'm building against (verifiedgit merge-base --is-ancestor a8bb17e1 427ba0d4→ yes), but the original symptom is not fixed, and a second class of error appears at higher zoom levels.Problem 1 — lowest internal overview
Mean 1.008. JP2OpenJPEG on the same file returns the expected ~50–150 range. SIGSEGV on dataset close. Visually (WMS zoom-out): random colored bars scattered across the scene, mostly black canvas (on screen below I tried to mask out the NoData).
With
CPL_DEBUG=ONGrok emits only one line for the whole read:Problem 2 — higher-zoom RasterIO
Once browser zooms in (tiles between full-res and a non-internal overview), logs fill with:
Every component/precinct at
resolution=04fails. Output again mostly black. Looks like the selective-fetch / PLT-aware byte-range path is reading wrong ranges, then the parser sees the declared PLT length vs what it actually got.Steps to reproduce the issue
File uploaded to my S3 sample bucket (URL in #14516). Happy to bisect Grok master if useful.
427ba0d4(2026-05-11), reports3.14.0dev.135008a6(2026-05-10), built from source.GDAL_SKIP.With
GDAL_SKIP=JP2Grok(JP2OpenJPEG) both zoom levels render correctly on the same files / same GDAL build. Slow cold (~7–10 s), but pixel-correct:Versions and provenance
427ba0d4a7363371cdccf67f2dbdca38db0446ff(2026-05-11),reports
3.14.0dev. Built from source. Containsa8bb17e1(PR JP2Grok: scale overview coords up to full resolution before calling Grok #14521)— verified
git merge-base --is-ancestor a8bb17e1 427ba0d4→ yes.135008a65d2ec042e207f9bb589dd4cfd9ff1247(2026-05-10).Built from source (CMake, SPDLOG_FMT_EXTERNAL=ON, BUILD_SHARED_LIBS=ON,
with public submodules google/highway, CLIUtils/CLI11, gabime/spdlog).
GDAL_USE_OPENJPEG=ON,GDAL_USE_GROK=ON). Switching at runtime viaGDAL_SKIP(
JP2OpenJPEGto use Grok,JP2Grokto use OpenJPEG).566acc07c54dc807f91625bb286cb9b321b5f42a),Python 3.13.12.
GDAL_SKIP=JP2OpenJPEGGDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIRGDAL_HTTP_TCP_KEEPALIVE=YESGDAL_HTTP_UNSAFESSL=YESGDAL_NUM_THREADS=ALL_CPUSGDAL_FORCE_CACHING=YESGDAL_CACHEMAX=10%GDAL_INGESTED_BYTES_AT_OPEN=1048576VSI_CACHE=TRUE,VSI_CACHE_SIZE=268435456CPL_VSIL_CURL_CHUNK_SIZE=2097152CPL_VSIL_CURL_CACHE_SIZE=33554432CPL_VSIL_CURL_ALLOWED_EXTENSIONS=jp2,tif,tiff,fgbAWS_S3_ENDPOINT=eodata.cloudferro.com,AWS_REQUEST_PAYER=requester,AWS_VIRTUAL_HOSTING=FALSE,AWS_HTTPS=YESAdditional context
No response