[GRASS-dev] Re: [GRASS GIS] #617: r.sim.water crashes on WinGrass
GRASS GIS
trac at osgeo.org
Sat Aug 1 00:51:21 EDT 2009
#617: r.sim.water crashes on WinGrass
---------------------------+------------------------------------------------
Reporter: hamish | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Raster | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass, r.sim.water
Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by helena):
I can only confirm that it crashes on both Windows and Mac but not on
linux.
It indeed looks like malloc problem - it crashes in input.c
after running G_malloc for all rasters it uses. I looked at r.los bug
discussion
https://trac.osgeo.org/grass/ticket/111, but I could not figure out from
it what the fix is. If there is an example in other modules on how this
should be handled so that it can run on windows that would help.
{{{
143 for (l = 0; l < my; l++) {
144 /*for each my, allocate a second dimension in array
145 * for each input with length of matrix X*/
146 zz[l] = (float *)G_malloc(sizeof(float) * (mx));
147 v1[l] = (double *)G_malloc(sizeof(double) * (mx));
148 v2[l] = (double *)G_malloc(sizeof(double) * (mx));
149
150 if (rain != NULL || rain_val >= 0.0)
151 si[l] = (double *)G_malloc(sizeof(double) * (mx));
152 ......
168
169 if (wdepth != NULL)
170 gama[l] = (double *)G_malloc(sizeof(double) * (mx));
171 }
172
173 G_debug(3, "Running MAY 10 version, started modifications on
20080211");
174
175 /* Check if data available in mapsets
176 * if found, then open the files */
177 if ((mapset = G_find_cell(elevin, "")) == NULL)
178 G_fatal_error(_("Raster map <%s> not found"), elevin);
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/617#comment:2>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list