Opened 9 years ago

Closed 9 years ago

#2023 closed defect (fixed)

r.li.edgedensity

Reported by: matmar Owned by: matmar
Priority: normal Milestone: 6.4.4
Component: Raster Version: svn-releasebranch64
Keywords: r.li.edgedensity Cc: grass-dev@…
CPU: x86-64 Platform: Linux

Description (last modified by neteler)

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

Attachments (1)

conf_file (22 bytes ) - added by matmar 9 years ago.

Download all attachments as: .zip

Change History (11)

by matmar, 9 years ago

Attachment: conf_file added

comment:1 by matmar, 9 years ago

Version: unspecifiedsvn-releasebranch64

comment:2 by matmar, 9 years ago

Owner: changed from grass-dev@… to matmar
Status: newassigned

comment:3 by neteler, 9 years ago

Description: modified (diff)

comment:4 by neteler, 9 years ago

Can you please post the output of "g.region -p" to see the settings of the computational region when the command fails?

comment:5 by matmar, 9 years ago

Hi Markus, this is the output of g.region -p when the command fails:

GRASS 6.4.3svn (WGS_84):~ > g.region -p
projection: 3 (Latitude-Longitude)
zone:       0
datum:      wgs84
ellipsoid:  wgs84
north:      57:13:46.281738N
south:      0
west:       6:28:24.499626W
east:       85:05:08.853149E
nsres:      0:00:09.99982
ewres:      0:00:09.999798
rows:       20603
cols:       32962
cells:      679116086

in reply to:  5 comment:6 by neteler, 9 years ago

Replying to matmar:

cells: 679116086

To me it looks like a kind of integer overflow:

-1451052184 + 231

[1] 696431464

Not sure though...

comment:7 by hamish, 9 years ago

Cc: grass-dev@… added

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.

comment:8 by matmar, 9 years ago

(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

comment:9 by mmetz, 9 years ago

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.

comment:10 by neteler, 9 years ago

Milestone: 6.4.36.4.4
Resolution: fixed
Status: assignedclosed

Rewrite from trunk backported in r59304.

Closing here, continued in bug #1214.

Note: See TracTickets for help on using tickets.