[GRASS-dev] [GRASS GIS] #3634: r.horizon: segmentation fault/bus error when raster using wrong geographical coordinates

#3634: r.horizon: segmentation fault/bus error when raster using wrong
geographical coordinates
-------------------------+-------------------------
Reporter: lbartoletti | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone:
Component: Default | Version: 7.4.0
Keywords: | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
While trying to use the tool on a SRTM (N45E007), I was confronted with a
segmentation and bus error. My mistake was inverting lat/lon...

Here's my procedure to reproduce it.

> r.horizon elevation=N45E007 coordinates=45.737698,7.361012 step=5

{{{
Note: In latitude-longitude coordinate system specify buffers in degree
unit

39437 bus error (core dumped) r.horizon elevation=N45E007
coordinates=45.737698,7.361012 step=5
}}}

> r.horizon elevation=N45E007 coordinates=45.737698,7.361012 step=0
direction=215 bufferzone=1 maxdistance=5000

{{{
Note: In latitude-longitude coordinate system specify buffers in degree
unit

39574 segmentation fault (core dumped) r.horizon elevation=N45E007
coordinates=45.737698,7.361012 step=0
}}}

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

#3634: r.horizon: segmentation fault/bus error when raster using wrong
geographical coordinates
--------------------------+-------------------------
  Reporter: lbartoletti | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone:
Component: Default | Version: 7.4.0
Resolution: fixed | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by mmetz):

* status: new => closed
* resolution: => fixed

Comment:

In [changeset:"73219" 73219]:
{{{
#!CommitTicketReference repository="" revision="73219"
r.horizon: check if coordinates are within the current region, fixes #3634
}}}

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

#3634: r.horizon: segmentation fault/bus error when raster using wrong
geographical coordinates
--------------------------+-------------------------
  Reporter: lbartoletti | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone:
Component: Default | Version: 7.4.0
Resolution: fixed | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by mmetz):

In [changeset:"73220" 73220]:
{{{
#!CommitTicketReference repository="" revision="73220"
r.horizon: check if coordinates are within the current region, fixes #3634
(backport trunk r73129)
}}}

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

#3634: r.horizon: segmentation fault/bus error when raster using wrong
geographical coordinates
--------------------------+-------------------------
  Reporter: lbartoletti | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone:
Component: Default | Version: 7.4.0
Resolution: fixed | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by mmetz):

In [changeset:"73221" 73221]:
{{{
#!CommitTicketReference repository="" revision="73221"
r.horizon: check if coordinates are within the current region, fixes #3634
(backport trunk r73129)
}}}

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