Skip to content

[Bug] LZ4 decompression error when using r.patch with MASK in effect #2809

@ericrpatton

Description

@ericrpatton

Describe the bug
A clear and concise description of what the bug is.
I receive the following error when trying to patch a series of raster maps together when a MASK is in existence:

r.patch in=Leg1_01_20m,Leg1_02_20m,Leg1_03_20m,Leg2_01_20m,Leg4_05_20m out=AAA --v --o

Percent complete...
WARNING: LZ4 decompressionWARNING: LZ4 decompression error
error
ERROR: Error uncompressing null dataERROR: Error uncompressing null data for row 5 of
for row 43 of
WARNING: Unable to close file fcell for raster map AAA: Bad file descriptor
WARNING: Unable to close file nullcmpr for raster map AAA: Bad file
descriptor
double free or corruption (!prev)
Aborted (core dumped)

To Reproduce
Steps to reproduce the behavior:

  1. Create a raster MASK: r.mask raster=filename
  2. set region: g.region rast=MASK res=20 -a
  3. Run r.patch: r.patch in=Map_A,Map_B,Map_C,Map_D out=outputmap --v --o
  4. See error above

Expected behavior
A clear and concise description of what you expected to happen.
No LZ4 decompression errors are encountered, and r.patch competes successfully.

System description (please complete the following information):

uname -a:
Linux machinename 5.15.0-58-generic #64~20.04.1-Ubuntu SMP Fri Jan 6 16:42:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Grass version:

version=8.3.dev
date=2023
revision=2a7d5ec65e
build_date=2023-02-08
build_platform=x86_64-pc-linux-gnu
build_off_t_size=8
libgis_revision=d22ee4748e
libgis_date=2023-02-02T07:48:36+00:00
proj=8.2.0
gdal=3.5.3
geos=3.11.0
sqlite=3.31.1

lz4 --version
*** LZ4 command line interface 64-bits v1.9.2, by Yann Collet ***

python3 -c "import sys, wx; print(sys.version); print(wx.version())"
3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0]
4.0.7 gtk3 (phoenix) wxWidgets 3.0.4

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CRelated code is in CbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions