[GRASS-dev] [GRASS GIS] #1628: segfault in r.walk
GRASS GIS
trac at osgeo.org
Sun Mar 25 18:20:41 EDT 2012
#1628: segfault in r.walk
----------------------+-----------------------------------------------------
Reporter: pertusus | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: 6.4.2
Keywords: | Platform: Linux
Cpu: x86-64 |
----------------------+-----------------------------------------------------
After calling r.walk like
{{{
r.walk elevation=dem start_points=stream_points stop_points=stop_points
walk_coeff=1,10000,0,0 lambda=1.0 output=walk friction=friction
max_cost=1600000
}}}
while finding cost path, there is a segfault. Here it is with the
backtrace
{{{
(gdb) run
Starting program: /localdata/local/grass-6.5.svn/bin/r.walk elevation=dem
start_points=stream_points stop_points=stop_points walk_coeff=1,10000,0,0
lambda=1.0 output=walk friction=friction max_cost=1600000
[Thread debugging using libthread_db enabled]
Walking costs are a=1.000000 b=10000.000000 c=0.000000 d=0.000000
Lambda is 1.000000
Slope_factor is -0.212500
Nseg is 4
Null cells excluded from cost evaluation.
Dev note: Adapted sites library used for vector points. (module should be
updated to GRASS 6 vector library)
Detaching after fork from child process 27060.
Dev note: Adapted sites library used for vector points. (module should be
updated to GRASS 6 vector library)
Detaching after fork from child process 27061.
DTM_Source map is: Integer cell type
9194 rows, 8736 cols
COST_Source map is: Integer cell type
4536 rows, 2370 cols
Output map is: Integer cell type
4536 rows, 2370 cols
EW resolution 1000.00003956 (1000.000040)
NS resolution 999.99998622 (999.999986)
Creating some temporary files...
Reading dem...
Reading friction...
100%
Initializing output
100%
Finding cost path
Program received signal SIGSEGV, Segmentation fault.
get () at memory.c:111
111 if (first_free->lower == NULL) {
(gdb) bt
#0 get () at memory.c:111
#1 0x0000000000402724 in insert (min_cost=<value optimized out>, row=999,
col=1235)
at btree.c:35
#2 0x00000000004054f1 in main (argc=347946718, argv=<value optimized
out>)
at main.c:1452
}}}
It is not easy to reproduce. I posted a tarball to reproduce here:
https://poseidon.centre-cired.fr/pat/segfault_r_walk.tar.gz
To reproduce:
{{{
tar xzvf segfault_r_walk.tar.gz
cd segfault_r_walk
}}}
edit run.sh to have the right paths to grass and run
{{{
./run.sh.
}}}
I used v.in.ogr for the stop_points vector, as if I use what comes from
v.out.ascii (the corresponding line is commented out in run.sh) the bug
does not reproduce for me.
This bug is also in grass 6.4.2, with the exact same backtrace. It is
also present in 6.4.1.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1628>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list