[GRASS-dev] Segmentation fault (core dumped) when using r.mapcalc in GRASS 7.0

2012-08-18 Thread Paulo van Breugel
When using the graph operator in r.mapcalc and when using many points
(+500) to define the graph, I am getting a 'Segmentation fault (core
dumped)'. This is shown after the calculation has (apparently) finished.

>
100%
Segmentation fault (core dumped)
GRASS 7.0.svn (latlon):~ >

It is difficult to really check whether the whole calculation has been
carried out correctly, but the new layer looks OK. I did notice that in the
meta data (r.info) of the new layer, only the statement 'generated by
r.mapcalc' is given, while normally the whole r.mapcalc statement would be
shown. Could that be related to the segmentation fault message?

Best regards

Paulo
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Segmentation fault (core dumped) when using r.mapcalc in GRASS 7.0

2012-08-18 Thread Glynn Clements

Paulo van Breugel wrote:

> When using the graph operator in r.mapcalc and when using many points
> (+500) to define the graph, I am getting a 'Segmentation fault (core
> dumped)'. This is shown after the calculation has (apparently) finished.
> 
> >
> 100%
> Segmentation fault (core dumped)
> GRASS 7.0.svn (latlon):~ >
> 
> It is difficult to really check whether the whole calculation has been
> carried out correctly, but the new layer looks OK. I did notice that in the
> meta data (r.info) of the new layer, only the statement 'generated by
> r.mapcalc' is given, while normally the whole r.mapcalc statement would be
> shown. Could that be related to the segmentation fault message?

The expression is added to the history as a comment. The code which
formats the expression had a fixed-sized buffer of 1024 arguments, so
512 or more x,y pairs would overflow it.

This should be fixed in r52725.

-- 
Glynn Clements 
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] Segmentation fault (core dumped) when using r.mapcalc in GRASS 7.0

2012-08-19 Thread Markus Neteler
On Sat, Aug 18, 2012 at 8:03 PM, Glynn Clements
 wrote:
>
> Paulo van Breugel wrote:
>
>> When using the graph operator in r.mapcalc and when using many points
>> (+500) to define the graph, I am getting a 'Segmentation fault (core
>> dumped)'. This is shown after the calculation has (apparently) finished.
>>
>> >
>> 100%
>> Segmentation fault (core dumped)
>> GRASS 7.0.svn (latlon):~ >
>>
>> It is difficult to really check whether the whole calculation has been
>> carried out correctly, but the new layer looks OK. I did notice that in the
>> meta data (r.info) of the new layer, only the statement 'generated by
>> r.mapcalc' is given, while normally the whole r.mapcalc statement would be
>> shown. Could that be related to the segmentation fault message?
>
> The expression is added to the history as a comment. The code which
> formats the expression had a fixed-sized buffer of 1024 arguments, so
> 512 or more x,y pairs would overflow it.
>
> This should be fixed in r52725.

Paulo sent me the formula, I have tried it, fix confirmed, working now.

Markus
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] Segmentation fault (core dumped) when using r.mapcalc in GRASS 7.0

2012-08-19 Thread Markus Neteler
On Sun, Aug 19, 2012 at 10:03 AM, Markus Neteler  wrote:
> On Sat, Aug 18, 2012 at 8:03 PM, Glynn Clements
>> This should be fixed in r52725.
>
> Paulo sent me the formula, I have tried it, fix confirmed, working now.

Backported to 6.4 and 6.5 in r52726 and r52727.

Markus
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] Segmentation fault (core dumped) when using r.mapcalc in GRASS 7.0

2012-08-19 Thread Paulo van Breugel

Hi Markus

I can also confirm it works in the in GRASS 7.0 r52727

Thanks a lot for this quick fix!

Paulo




On 08/19/2012 10:03 AM, Markus Neteler wrote:

On Sat, Aug 18, 2012 at 8:03 PM, Glynn Clements
 wrote:

Paulo van Breugel wrote:


When using the graph operator in r.mapcalc and when using many points
(+500) to define the graph, I am getting a 'Segmentation fault (core
dumped)'. This is shown after the calculation has (apparently) finished.

100%
Segmentation fault (core dumped)
GRASS 7.0.svn (latlon):~ >

It is difficult to really check whether the whole calculation has been
carried out correctly, but the new layer looks OK. I did notice that in the
meta data (r.info) of the new layer, only the statement 'generated by
r.mapcalc' is given, while normally the whole r.mapcalc statement would be
shown. Could that be related to the segmentation fault message?

The expression is added to the history as a comment. The code which
formats the expression had a fixed-sized buffer of 1024 arguments, so
512 or more x,y pairs would overflow it.

This should be fixed in r52725.

Paulo sent me the formula, I have tried it, fix confirmed, working now.

Markus


___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev