[GRASS-dev] Re: [GRASS GIS] #111: r.los fails in WinGRASS with high
values for max_dis parameter
GRASS GIS
trac at osgeo.org
Sat Jan 24 06:03:57 EST 2009
#111: r.los fails in WinGRASS with high values for max_dis parameter
---------------------------+------------------------------------------------
Reporter: gsancho | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: Raster | Version: svn-develbranch6
Resolution: | Keywords: wingrass r.los
Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Changes (by neteler):
* version: 6.3.0 => svn-develbranch6
Comment:
I have tried r.los with valgrind on Linux 64bit (GRASS 7):
{{{
# Spearfish60
g.region -dp
CMD="r.los in=elevation.dem output=tr_vis coordinate=599490,4920855
max_dist=10000"
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes $CMD --o
...
Using maximum distance from the viewing point (meters): 10000.000000
==15765== Invalid read of size 8
==15765== at 0x403616: hidden_point_elimination (pts_elim.c:107)
==15765== by 0x403B0E: segment (segment.c:81)
==15765== by 0x402B41: main (main.c:330)
==15765== Address 0xb062d90 is 24 bytes inside a block of size 40 free'd
==15765== at 0x4C2006F: free (vg_replace_malloc.c:323)
==15765== by 0x503A4A9: G_free (alloc.c:129)
==15765== by 0x401D5B: delete (delete.c:39)
==15765== by 0x40357E: hidden_point_elimination (pts_elim.c:166)
==15765== by 0x403B0E: segment (segment.c:81)
==15765== by 0x402B41: main (main.c:330)
==15765==
==15765== Invalid read of size 1
==15765== at 0x4C21FC0: memcpy (mc_replace_strmem.c:402)
==15765== by 0x4E2619E: segment_get (get.c:49)
==15765== by 0x403885: find_inclination (pts_elim.c:291)
==15765== by 0x40336E: hidden_point_elimination (pts_elim.c:94)
==15765== by 0x403B0E: segment (segment.c:81)
==15765== by 0x402B41: main (main.c:330)
==15765== Address 0xafdcc77 is 1 bytes before a block of size 76,320
alloc'd
==15765== at 0x4C2136E: malloc (vg_replace_malloc.c:207)
==15765== by 0x503A34E: G__malloc (alloc.c:41)
==15765== by 0x4E26E71: segment_setup (setup.c:64)
==15765== by 0x4E26431: segment_init (init.c:75)
==15765== by 0x40264E: main (main.c:257)
...
==15765== Invalid read of size 1
==15765== at 0x4C21FDC: memcpy (mc_replace_strmem.c:402)
==15765== by 0x4E2619E: segment_get (get.c:49)
==15765== by 0x403885: find_inclination (pts_elim.c:291)
==15765== by 0x4033B2: hidden_point_elimination (pts_elim.c:99)
==15765== by 0x403B0E: segment (segment.c:81)
==15765== by 0x402B41: main (main.c:330)
==15765== Address 0xafdcc74 is 4 bytes before a block of size 76,320
alloc'd
==15765== at 0x4C2136E: malloc (vg_replace_malloc.c:207)
==15765== by 0x503A34E: G__malloc (alloc.c:41)
==15765== by 0x4E26E71: segment_setup (setup.c:64)
==15765== by 0x4E26431: segment_init (init.c:75)
==15765== by 0x40264E: main (main.c:257)
100%
==15765==
==15765== Conditional jump or move depends on uninitialised value(s)
==15765== at 0x5498B4E: (within /lib64/libz.so.1.2.3)
==15765== by 0x549949C: (within /lib64/libz.so.1.2.3)
==15765== by 0x549A06F: deflate (in /lib64/libz.so.1.2.3)
==15765== by 0x504A97C: G_zlib_compress (flate.c:339)
==15765== by 0x504A650: G_zlib_write (flate.c:213)
==15765== by 0x5064BC9: write_data_compressed (put_row.c:217)
==15765== by 0x5064FC9: put_fp_data (put_row.c:333)
==15765== by 0x50659AB: put_raster_data (put_row.c:633)
==15765== by 0x50662E0: put_raster_row (put_row.c:848)
==15765== by 0x5064907: G_put_raster_row (put_row.c:144)
==15765== by 0x402D5E: main (main.c:381)
==15765==
==15765== Conditional jump or move depends on uninitialised value(s)
==15765== at 0x5498B5B: (within /lib64/libz.so.1.2.3)
==15765== by 0x549949C: (within /lib64/libz.so.1.2.3)
==15765== by 0x549A06F: deflate (in /lib64/libz.so.1.2.3)
==15765== by 0x504A97C: G_zlib_compress (flate.c:339)
==15765== by 0x504A650: G_zlib_write (flate.c:213)
...
==15765==
==15765== ERROR SUMMARY: 284197 errors from 21 contexts (suppressed: 3
from 1)
==15765== malloc/free: in use at exit: 448,984 bytes in 10,702 blocks.
==15765== malloc/free: 291,268 allocs, 280,566 frees, 142,519,073 bytes
allocated.
==15765== For counts of detected errors, rerun with: -v
==15765== searching for pointers to 10,702 not-freed blocks.
==15765== checked 2,792,248 bytes.
==15765==
==15765==
==15765== 795 bytes in 72 blocks are definitely lost in loss record 1 of 5
==15765== at 0x4C2136E: malloc (vg_replace_malloc.c:207)
==15765== by 0x503A34E: G__malloc (alloc.c:41)
==15765== by 0x505633B: G__location_path (location.c:77)
==15765== by 0x50562A6: G_location_path (location.c:57)
==15765== by 0x5051ECB: G__gisinit (gisinit.c:57)
==15765== by 0x401E14: main (main.c:87)
==15765==
==15765==
==15765== 1,024 bytes in 1 blocks are definitely lost in loss record 2 of
5
==15765== at 0x4C1F144: calloc (vg_replace_malloc.c:397)
==15765== by 0x503A3CC: G__calloc (alloc.c:74)
==15765== by 0x50609B6: G_recreate_command (parser.c:2468)
==15765== by 0x505339D: G_command_history (history.c:257)
==15765== by 0x402EF7: main (main.c:414)
==15765==
==15765==
==15765== 6,380 bytes in 3 blocks are still reachable in loss record 3 of
5
==15765== at 0x4C1F144: calloc (vg_replace_malloc.c:397)
==15765== by 0x503A3CC: G__calloc (alloc.c:74)
==15765== by 0x505BFF6: G_parser (parser.c:795)
==15765== by 0x401FEE: main (main.c:133)
==15765==
==15765==
==15765== 16,016 bytes in 3 blocks are still reachable in loss record 4 of
5
==15765== at 0x4C2136E: malloc (vg_replace_malloc.c:207)
==15765== by 0x503A445: G__realloc (alloc.c:109)
==15765== by 0x5048375: set_env (env.c:172)
==15765== by 0x5048136: read_env (env.c:114)
==15765== by 0x504882F: G__getenv (env.c:337)
==15765== by 0x5048771: G_getenv (env.c:289)
==15765== by 0x5056297: G_location (location.c:37)
==15765== by 0x5056300: G__location_path (location.c:75)
==15765== by 0x50562A6: G_location_path (location.c:57)
==15765== by 0x5051ECB: G__gisinit (gisinit.c:57)
==15765== by 0x401E14: main (main.c:87)
==15765==
==15765==
==15765== 424,769 bytes in 10,623 blocks are still reachable in loss
record 5 of 5
==15765== at 0x4C2136E: malloc (vg_replace_malloc.c:207)
==15765== by 0x503A34E: G__malloc (alloc.c:41)
==15765== by 0x506FDE0: G_store (strings.c:83)
==15765== by 0x506402D: G_set_program_name (progrm_nme.c:52)
==15765== by 0x5051E92: G__gisinit (gisinit.c:51)
==15765== by 0x401E14: main (main.c:87)
==15765==
==15765== LEAK SUMMARY:
==15765== definitely lost: 1,819 bytes in 73 blocks.
==15765== possibly lost: 0 bytes in 0 blocks.
==15765== still reachable: 447,165 bytes in 10,629 blocks.
==15765== suppressed: 0 bytes in 0 blocks.
}}}
I have no idea if that's acceptable or not.
Markus
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/111#comment:7>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list