[GRASS-dev] [GRASS GIS] #1511: r3.mapcalc error

#1511: r3.mapcalc error
----------------------------------+-----------------------------------------
Reporter: mmetz | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster3D | Version: svn-trunk
Keywords: raster3d, r3.mapcalc | Platform: Linux
      Cpu: All |
----------------------------------+-----------------------------------------
the error occurs with the new temporal gis tutorial, tested on different
machines:

{{{
r3.mapcalc --o expr="t5ym = (t1ym[0,0,-2] + t1ym[0,0,-1] + t1ym[0,0,0] +
t1ym[0,0,1] + t1ym[0,0,2])/5.0"

ERROR: ERROR: Rast3d_get_double_region: error ERROR:
Rast3d_get_double_region: Rast3d_get_double_region:in Rast3d_get_tile_ptr
error in Rast3d_get_tile_ptr
  error in Rast3d_get_tile_ptr
WARNING: Unable to flush index
WARNING: Unable to create 3D raster map <t5ym>
}}}

Any ideas?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1511&gt;
GRASS GIS <http://grass.osgeo.org>

#1511: r3.mapcalc error
----------------------------------+-----------------------------------------
Reporter: mmetz | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster3D | Version: svn-trunk
Keywords: raster3d, r3.mapcalc | Platform: Linux
      Cpu: All |
----------------------------------+-----------------------------------------
Changes (by huhabla):

* cc: huhabla (added)

Comment:

Unfortunately i can not reproduce this error and i did not found any
memory leak with valgrind on my 64Bit system.

Can you please try r49789. I don't know if i have fixed the error, but at
least a more detailed error message will appear.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1511#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1511: r3.mapcalc error
----------------------------------+-----------------------------------------
Reporter: mmetz | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster3D | Version: svn-trunk
Keywords: raster3d, r3.mapcalc | Platform: Linux
      Cpu: All |
----------------------------------+-----------------------------------------

Comment(by glynn):

Replying to [ticket:1511 mmetz]:
> Any ideas?
Either the map is corrupted, or there's a bug in the raster3d library.
Requesting a cell which is outside of the map should just produce a null
value.
FWIW, I don't think that r49789 will affect this, as
Rast3d_nearest_neighbor() already performs bounds checks before calling
Rast3d_get_value_region().

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1511#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1511: r3.mapcalc error
----------------------------------+-----------------------------------------
Reporter: mmetz | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster3D | Version: svn-trunk
Keywords: raster3d, r3.mapcalc | Platform: Linux
      Cpu: All |
----------------------------------+-----------------------------------------

Comment(by huhabla):

Replying to [comment:2 glynn]:
> Replying to [ticket:1511 mmetz]:
> > Any ideas?
> Either the map is corrupted, or there's a bug in the raster3d library.
Requesting a cell which is outside of the map should just produce a null
value.
> FWIW, I don't think that r49789 will affect this, as
Rast3d_nearest_neighbor() already performs bounds checks before calling
Rast3d_get_value_region().

This is true indeed. I have removed the redundant spatial boundary check
from
Rast3d_nearest_neighbor, as IMHO this should be done in
Rast3d_get_value_regions.

Looks like a bug in Rast3d_coord2tile_index() or Rast3d_get_tile_ptr()
....

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1511#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>