Open neteler opened 1 year ago
Just a quick glance at this, inserting the values from dump to main.c:142:
matout[-1][75] = matin[0][1426];
with negative value for 'newrow' which obviously cannot work...
i.rotate
increases the number of rows and columns in https://github.com/OSGeo/grass-addons/blob/grass8/src/imagery/i.rotate/main.c#L86 ff but should instead increase the current region's extents for the output raster. Thus the workflow would be to use the current region as input window, calculate the output window extents and set the output window accordingly, load the input raster using the input window, do the rotation by translating current input window row/col to coordinates, convert translated coordinates to output window row/col, update output matrix with a test that output row/col are within the allowed range, write output matrix to output raster.
Probably related thread in ML archives: https://lists.osgeo.org/pipermail/grass-dev/2012-November/060912.html .
Name of the addon i.rotate
Describe the bug The program crashes with a Segmentation fault (core dumped).
With larger maps, the out-of-memory-kill (OOM-killer) is activated by Linux.
To Reproduce
Debugging:
Expected behavior No crash :)
It happens here: https://github.com/OSGeo/grass-addons/blob/ee8fbcb1a06f57d6197b6a11d327dca8289fda89/src/imagery/i.rotate/main.c#L142
As far as I can see, the allocated memory in https://github.com/OSGeo/grass-addons/blob/ee8fbcb1a06f57d6197b6a11d327dca8289fda89/src/imagery/i.rotate/main.c#L32
is never freed.
Screenshots If applicable, add screenshots to help explain your problem.
System description (please complete the following information):