[GRASS-dev] Bugs in i.cca module

Maris Nartiss maris.gis at gmail.com
Thu Nov 16 11:26:31 PST 2023


Thanks, Markus.
I managed to compile version before the ccmath library in a VM. I
managed to get results with steps from that e-mail. But as soon as I
try to repeat the steps after the ccmath introduction commit, I get a
segfault. With my fix, there is no segfault but the results are nan
when the original version gives some numbers.
Thus although my PR would eliminate a segfault, it does not fix i.cca.
I'm not certain if it is worth to merge as segfault at least is a
clear sign that something is really wrong :D

Unless someone can look into the code to see what's wrong with it, I'd
say we disable compilation of i.cca and remove it from the GUI menu.
Māris.

trešd., 2023. g. 15. nov., plkst. 11:50 — lietotājs Markus Neteler
(<neteler at osgeo.org>) rakstīja:
>
> Hi Māris, all,
>
> On Wed, Nov 15, 2023 at 8:35 AM Maris Nartiss via grass-dev
> <grass-dev at lists.osgeo.org> wrote:
> >
> > Hello devs,
> > Just playing around I decided to run i.cca module. Seems that it has
> > been broken since 2009(!) (there is a bug report from 2014 in Trac
> > [1]). I managed to fix the segfault [2] but it left me with a
> > different problem – the module runs just fine but produces NULLs as an
> > output. This boils down to at one point trying to calculate sqrt from
> > negative numbers. I am not that familiar with the CCA algorithm
> > implemented in the module and thus have no idea if it is a bug in the
> > code or just bad input data.
> >
> > I hope somebody can help me to sort this out or provide a working example,
> > Māris.
>
> Digging in my inbox I found this thread from 2009:
> https://lists.osgeo.org/pipermail/grass-dev/2009-August/045656.html
>
> It contains some discussion and examples. Maybe not much of a help but
> a kind of pointer.
>
> Markus
>
> > 1. https://trac.osgeo.org/grass/ticket/2297
> > 2. https://github.com/OSGeo/grass/pull/3239
> > _______________________________________________
> > grass-dev mailing list
> > grass-dev at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/grass-dev
>
> --
> Markus Neteler, PhD
> https://www.mundialis.de - free data with free software
> https://grass.osgeo.org
> https://neteler.org/blog


More information about the grass-dev mailing list