[GRASS-dev] [GRASS GIS] #2023: r.li.edgedensity

#2023: r.li.edgedensity
------------------------------+---------------------------------------------
Reporter: matmar | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: unspecified
Keywords: r.li.edgedensity | Platform: Linux
      Cpu: x86-64 |
------------------------------+---------------------------------------------
r.li.edgedensity doesn't work using a configuration file (generated with
r.li.setup) with a vector map to overlay. Attached you can find the
generated configuration file.

The r.li.edgedensity error is:

----

GRASS 6.4.3svn (WGS_84):~ > r.li.edgedensity map=globcover conf=landscape
output=edge_den_map --o
ERROR: Program error, worker() toReceive.type=-1451052184
Segmentation fault (core dumped)
ERROR: Program error, worker() toReceive.type=-1451052184
ERROR: Program error, worker() toReceive.type=-1451052184
ERROR: Program error, worker() toReceive.type=-1451052184
ERROR: Program error, worker() toReceive.type=-1451052184
ERROR: Program error, worker() toReceive.type=-1451052184
ERROR: Program error, worker() toReceive.type=-1451052184
ERROR: Program error, worker() toReceive.type=-1451052184
ERROR: Program error, worker() toReceive.type=-1451052184
ERROR: Program error, worker() toReceive.type=-1451052184

----

Thanks, Matteo

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

#2023: r.li.edgedensity
------------------------------+---------------------------------------------
Reporter: matmar | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-releasebranch64
Keywords: r.li.edgedensity | Platform: Linux
      Cpu: x86-64 |
------------------------------+---------------------------------------------
Changes (by matmar):

  * version: unspecified => svn-releasebranch64

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

#2023: r.li.edgedensity
------------------------------+---------------------------------------------
Reporter: matmar | Owner: matmar
     Type: defect | Status: assigned
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-releasebranch64
Keywords: r.li.edgedensity | Platform: Linux
      Cpu: x86-64 |
------------------------------+---------------------------------------------
Changes (by hamish):

* cc: grass-dev@… (added)

Comment:

MarkusN wrote:
> To me it looks like a kind of integer overflow:

Matteo, does it happen with a smaller region?

toReceive.type is from the r.li.daemon, and is declared as "int" in the
msg struct in ipc.h. But it should only be a #defined constant 1-5, so I
would rather guess that the stack is being smashed.

note in devbr6 (6.5svn) it respects the WORKERS=1 environment variable for
easier debugging. there should be control for that in trunk too, but the
multi-processor part has been rewritten there so controlling the number of
jobs is probably a bit different.

Hamish

ps- 'g.region -a res=0:00:10' might be nice to clean up the region
settings

pps- if you take ownership of a bug (ie declare responsibility for fixing
it) please manually add the mailing list in the cc field so the discussion
gets echoed there.

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

#2023: r.li.edgedensity
------------------------------+---------------------------------------------
Reporter: matmar | Owner: matmar
     Type: defect | Status: assigned
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-releasebranch64
Keywords: r.li.edgedensity | Platform: Linux
      Cpu: x86-64 |
------------------------------+---------------------------------------------

Comment(by matmar):

(sorry for the cc mishap)

I have retried with a smaller region, still failing:

{{{
GRASS 6.4.3svn (WGS_84):~ > g.region -a res=0:10 -p
projection: 3 (Latitude-Longitude)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 90N
south: 65S
west: 180W
east: 180E
nsres: 0:10
ewres: 0:10
rows: 930
cols: 2160
cells: 2008800

GRASS 6.4.3svn (WGS_84):~ > r.li.edgedensity map=globcover conf=conf
output=edge_den_map --o
ERROR: Segmentation fault (core dumped)
Program error, worker() toReceive.type=-729328792
ERROR: Program error, worker() toReceive.type=-729328792
ERROR: Program error, worker() toReceive.type=-729328792
ERROR: Program error, worker() toReceive.type=-729328792
ERROR: Program error, worker() toReceive.type=-729328792
ERROR: Program error, worker() toReceive.type=-729328792
ERROR: Program error, worker() toReceive.type=-729328792
ERROR: Program error, worker() toReceive.type=-729328792
ERROR: Program error, worker() toReceive.type=-729328792
ERROR: Program error, worker() toReceive.type=-729328792

GRASS 6.4.3svn (WGS_84):~ > cat /home/matteo/.r.li/history/conf
SAMPLINGFRAME 0|0|1|1
}}}

I wonder if the failure is related to ticket #2024 (incomplete r.li
configuration file, the "MASKEDOVERLAYAREA" entries are missing)?

Restoring the conf file as it should be, it still fails (here two
subsequent runs):

{{{
GRASS 6.4.3svn (WGS_84):~/.r.li > r.li.edgedensity map=globcover conf=conf
output=edge_den_map --o
Segmentation fault (core dumped)
ERROR: Program error, worker() toReceive.type=97579880
ERROR: Program error, worker() toReceive.type=97579880
ERROR: Program error, worker() toReceive.type=97579880
ERROR: Program error, worker() toReceive.type=97579880
ERROR: Program error, worker() toReceive.type=97579880
ERROR: Program error, worker() toReceive.type=97579880
ERROR: Program error, worker() toReceive.type=97579880
ERROR: Program error, worker() toReceive.type=97579880
ERROR: Program error, worker() toReceive.type=97579880
ERROR: Program error, worker() toReceive.type=97579880

GRASS 6.4.3svn (WGS_84):~/.r.li > r.li.edgedensity map=globcover conf=conf
output=edge_den_map --o
Segmentation fault (core dumped)
ERROR: Program error, worker() toReceive.type=684966760
ERROR: Program error, worker() toReceive.type=684966760
ERROR: Program error, worker() toReceive.type=684966760
ERROR: Program error, worker() toReceive.type=684966760
ERROR: Program error, worker() toReceive.type=684966760
ERROR: Program error, worker() toReceive.type=684966760
ERROR: Program error, worker() toReceive.type=684966760
ERROR: Program error, worker() toReceive.type=684966760
ERROR: Program error, worker() toReceive.type=684966760
ERROR: Program error, worker() toReceive.type=684966760
}}}

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

#2023: r.li.edgedensity
------------------------------+---------------------------------------------
Reporter: matmar | Owner: matmar
     Type: defect | Status: assigned
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-releasebranch64
Keywords: r.li.edgedensity | Platform: Linux
      Cpu: x86-64 |
------------------------------+---------------------------------------------

Comment(by mmetz):

r.li.edgedensity is fixed in trunk r59072. As with the other r.li modules,
it works only reliably if the current region is set to the input raster.

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

#2023: r.li.edgedensity
---------------------+------------------------------------------------------
  Reporter: matmar | Owner: matmar
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.4
Component: Raster | Version: svn-releasebranch64
Resolution: fixed | Keywords: r.li.edgedensity
  Platform: Linux | Cpu: x86-64
---------------------+------------------------------------------------------
Changes (by neteler):

  * status: assigned => closed
  * resolution: => fixed
  * milestone: 6.4.3 => 6.4.4

Comment:

Rewrite from trunk backported in r59304.

Closing here, continued in bug #1214.

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