Opened 9 years ago

Closed 6 years ago

#2742 closed defect (fixed)

r.fill.dir crash with larger dataset

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Raster Version: svn-releasebranch70
Keywords: r.fill.dir Cc:
CPU: Unspecified Platform: Unspecified

Description

With a larger but not huge dataset r.fill.dir crashes:

GRASS 7.1.svn (eu_laea):> g.region -p n=2699750 s=2377750 w=4126750 e=4536000 
projection: 99 (Lambert Azimuthal Equal Area)
zone:       0
datum:      etrs89
ellipsoid:  grs80
north:      2699750
south:      2377750
west:       4126750
east:       4536000
nsres:      25
ewres:      25
rows:       12880
cols:       16370
cells:      210845600

GRASS 7.1.svn (eu_laea):>  gdb r.fill.dir
GNU gdb (GDB) Fedora 7.9.1-17.fc22
...
(gdb) r input=eu_dem_25m_northern_italy output=depressionless direction=direction
Starting program: /home/neteler/software/grass71/dist.x86_64-unknown-linux-gnu/bin/r.fill.dir input=eu_dem_25m_northern_italy output=depressionless direction=direction
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.21-7.fc22.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Reading input elevation raster map...
 100%
Filling sinks...
Determining flow directions for ambiguous cases...

Program received signal SIGSEGV, Segmentation fault.
0x0000000000405251 in recurse_list (flag=flag@entry=53936, cells=cells@entry=0x7fffeee93010, sz=sz@entry=6687981, start=start@entry=1995420)
    at dopolys.c:15
15	    for (cnt = 0; cnt < sz; cnt += 3) {
...

(gdb) bt 
#0  0x0000000000405251 in recurse_list (flag=flag@entry=53936, cells=cells@entry=0x7fffeee93010, sz=sz@entry=6687981, start=start@entry=1995420)
    at dopolys.c:15
#1  0x00000000004052e1 in recurse_list (flag=flag@entry=53936, cells=cells@entry=0x7fffeee93010, sz=sz@entry=6687981, start=start@entry=1995423)
    at dopolys.c:26
#2  0x00000000004052e1 in recurse_list (flag=flag@entry=53936, cells=cells@entry=0x7fffeee93010, sz=sz@entry=6687981, start=start@entry=1995426)
    at dopolys.c:26
#3  0x00000000004052e1 in recurse_list (flag=flag@entry=53936, cells=cells@entry=0x7fffeee93010, sz=sz@entry=6687981, start=start@entry=1995429)
    at dopolys.c:26
...

#11759 0x00000000004052e1 in recurse_list (flag=flag@entry=53936, cells=cells@entry=0x7fffeee93010, sz=sz@entry=6687981, start=start@entry=1932495)
    at dopolys.c:26
...


gdb > bt full
...
#1189 0x00000000004052e1 in recurse_list (flag=flag@entry=53936, cells=cells@entry=0x7fffeee93010, sz=sz@entry=6687981, start=start@entry=1977663)
    at dopolys.c:26
        cnt = 1977666
        i = 6227
        j = 5510
        ii = <optimized out>
        jj = <optimized out>
#1190 0x00000000004052e1 in recurse_list (flag=flag@entry=53936, cells=cells@entry=0x7fffeee93010, sz=sz@entry=6687981, start=start@entry=1977660)
    at dopolys.c:26
        cnt = 1977663
        i = 6227
        j = 5509
        ii = <optimized out>
        jj = <optimized out>
...


#3143 0x00000000004052e1 in recurse_list (flag=flag@entry=53936, cells=cells@entry=0x7fffeee93010, sz=sz@entry=6687981, start=start@entry=1974657)
    at dopolys.c:26
        cnt = 1974654
        i = 6223
        j = 5435
        ii = <optimized out>
        jj = <optimized out>
...

Integer overflow?

Change History (8)

comment:1 by neteler, 9 years ago

Milestone: 7.0.27.0.3

Ticket retargeted after milestone closed

comment:2 by neteler, 9 years ago

Milestone: 7.0.3

Ticket retargeted after milestone closed

comment:3 by neteler, 9 years ago

Milestone: 7.0.4

Ticket retargeted after 7.0.3 milestone closed

comment:4 by martinl, 9 years ago

Milestone: 7.0.47.0.5

comment:5 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:6 by neteler, 7 years ago

Milestone: 7.0.67.0.7

comment:7 by martinl, 6 years ago

Still relevant?

comment:8 by neteler, 6 years ago

Milestone: 7.0.77.6.2
Resolution: fixed
Status: newclosed

It works now, closing:

GRASS 7.7.svn (eu_laea):~ > 
g.region raster=brd_dgm200 -p res=60 -a
projection: 99 (ETRS89 / LAEA Europe)
zone:       0
datum:      etrs89
ellipsoid:  grs80
north:      3554400
south:      2680380
west:       4024980
east:       4678440
nsres:      60
ewres:      60
rows:       14567
cols:       10891
cells:      158649197

r.fill.dir input=brd_dgm200 output=depressionless direction=direction
Reading input elevation raster map...
 100%
Filling sinks...
Determining flow directions for ambiguous cases...
Found 194156 unresolved areas
Repeat to get the final directions...
Found 22563 unresolved areas
Writing output raster maps...
 100%
Note: See TracTickets for help on using tickets.