Hi,
I just faced a problem when trying to run r.univar (both GRASS6.5 and GRASS7) on a raster which was multiplied by a very large value (1e+200) in a python script.
The raster is displayed correctly and the cells can be querried and give the correct large value but r.univar gives: *** stack smashing detected ***: r.univar terminated
As the map is not mutliplied using r.mapcalc but here I used the interface to numpy arrays. Here a short working example (with the fields raster map of the small spearfish example dataset). Probably this might work with other raster input as well.
With small spearfish dataset
import grass.script.array as garray
large_value = float(1e+200)
x1 = garray.array()
x1.read(“lower_distance_tmp_29117”)
result = garray.array()
result[…] = x1 * large_value
result.write(“result_test”)
And then running r.univar on result_test produces this error on my machine. Can anyone reproduce that?
What might cause that problem? Does anyone have an idea? E.g. do some summary value get to large (E.g. sum) to be processed? #
/Johannes