[GRASS5] D.vect.graph problem
Moritz Lennert
mlennert at club.worldonline.be
Tue Sep 21 05:58:13 EDT 2004
On Wed, September 1, 2004 8:29, Glynn Clements said:
>
> Michael Barton wrote:
>
>> I did what you suggested. When I run d.vect.chart using bar graphs, the
>> process (along with a dbf process) very briefly flashes in top then
>> disappears as it finishes.
>>
>> However, if I do it with a pie chart it is a very different story. CPU
>> use
>> zooms up to over 80% for awhile and memory use starts to climb rapidly.
>> RPRVT and RSIZE climbed to over 200 Mb (I have 512 Mb installed in my
>> Mac
>> laptop and had several other apps running, but paused and using limited
>> RAM). VSIZE climbed to over 530 Mb. As memory use climbed, CPU use
>> dropped
>> way down (0.8%) and stayed low from then on. Memory use stabilized at
>> around
>> 230Mb for RPRVT and RSIZE and 534Mb for VSIZE.
>>
>> I had to kill it. Kill worked OK (i.e., no need for xkill), though
>> everything was slow as molasses. I went ahead and quit X11 then. Things
>> seem
>> to have gotten back to normal now, without rebooting.
>>
>> So what is going on? Is this happening to anyone else? Is it just Mac's?
>> Is
>> it just my system?
>
> From display/d.vect.chart/pie.c:
>
> double a, end_ang, ang, tot_sum, sum, step, r;
>
> while ( 1 ) {
> if ( a > end_ang ) a = end_ang;
> x = cx + r * cos ( a );
> y = cy + r * sin ( a );
> Vect_append_point ( Points, x, y, 0);
>
> if ( a == end_ang ) {
> ang = end_ang;
> break;
> } else {
> a += step;
> }
> }
>
> One possiblity is that the "a == end_ang" test never becomes true
> (even after the "a = end_ang" assignment), so the loop runs forever.
>
The problem happens to me when for at least one spatial entity all the
columns used for the pie chart contain zero. Michael can you confirm this
? Is this linked to the above loop ?
Moritz
More information about the grass-dev
mailing list