[GRASS-dev] Re: [GRASS GIS] #775: r.terraflow: file=/home/mlennert/STREAM/STREAM_tQhXkQ:cannot read!: Bad address

Andrew Danner adanner at cs.swarthmore.edu
Tue Oct 6 11:55:27 EDT 2009


It looks like some changes in include/iostream/ami_sort_impl.h r32509 
may be causing this problem.

r32509 | pkelly | 2008-08-04 08:21:11 -0400 (Mon, 04 Aug 2008) | 4 lines

Move iostream library to lib/iostream and includes to include/iostream,
and update r.terraflow to use it - in preparation for introducing
r.viewshed.

The test in question has a single small run of 38343 items. Memory can 
accommodate a single run up to 13027966 items, in makeRun_Block, the 
code tries to read 13+million items from a stream that only has 
38+thousand items.

prior to r32509, there was a calculation that computed the current run 
size and made sure you did not try to read more than was available.

#4  0x0808a72c in makeRun_Block<plateauType, ijCmpPlateauType> (
     instream=0x83d32a0, data=0xb7856014, run_size=13027966, cmp=0xbfa269b4)
     at 
/home/mlennert/SRC/GRASS/grass6_devel/dist.i486-pc-linux-gnu/include/grass/iostream/ami_sort_impl.h:91
	err = AMI_ERROR_NO_ERROR
	new_run_size = 164681931030529
...

#5  0x0808b106 in runFormation<plateauType, ijCmpPlateauType> (
     instream=0x83d32a0, cmp=0xbfa269b4)
     at 
/home/mlennert/SRC/GRASS/grass6_devel/dist.i486-pc-linux-gnu/include/grass/iostream/ami_sort_impl.h:213
	run_size = 13027966
	last_run_size = 38343
	crt_run_size = 38343
	nb_runs = 1

GRASS GIS wrote:
> #775: r.terraflow: file=/home/mlennert/STREAM/STREAM_tQhXkQ:cannot read!: Bad
> address
> -----------------------+----------------------------------------------------
>   Reporter:  mlennert  |       Owner:  grass-dev at lists.osgeo.org
>       Type:  defect    |      Status:  new                      
>   Priority:  normal    |   Milestone:  6.4.0                    
>  Component:  Raster    |     Version:  svn-develbranch6         
> Resolution:            |    Keywords:  terraflow bad address    
>   Platform:  Linux     |         Cpu:  Unspecified              
> -----------------------+----------------------------------------------------
> Comment (by mlennert):
> 
>  Replying to [comment:1 glynn]:
>  > Beyond that, I can only suggest running it under gdb and printing a full
>  backtrace ("bt full") when it aborts.
> 
>  Done.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev



More information about the grass-dev mailing list