[GRASS-dev] problem with r.colors on Mac

Glynn Clements glynn at gclements.plus.com
Wed Apr 18 00:15:58 EDT 2007


Michael Barton wrote:

> I tried the code below. I still get crashing with both versions if I run
> r.colors -e. If I run r.colors without -e, it runs fine. I tracked $lines
> after the following clause...
> 
>  while {[gets $fh line] >= 0} {
>     lappend lines $line
>  }
> 
> ... and got the results below.
> 
> RESULTS
> 
> GRASS 6.3.cvs (spearfish60_test):~ > lines={} {GRASS_INFO_MESSAGE(5017,1):
> Reading elevation_delete ...} GRASS_INFO_END(5017,1) {} {GRASS_INFO_PERCENT:
> 0} {GRASS_INFO_PERCENT: 3}
> lines={GRASS_INFO_PERCENT: 6} {GRASS_INFO_PERCENT: 9}
> lines={GRASS_INFO_PERCENT: 12} {GRASS_INFO_PERCENT: 15} {GRASS_INFO_PERCENT:
> 18} {GRASS_INFO_PERCENT: 21} {GRASS_INFO_PERCENT: 24} {GRASS_INFO_PERCENT:
> 27} {GRASS_INFO_PERCENT: 30} {GRASS_INFO_PERCENT: 33} {GRASS_INFO_PERCENT:
> 36} {GRASS_INFO_PERCENT: 39} {GRASS_INFO_PERCENT: 42} {GRASS_INFO_PERCENT:
> 45} {GRASS_INFO_PERCENT: 48} {GRASS_INFO_PERCENT: 51} {GRASS_INFO_PERCENT:
> 54} {GRASS_INFO_PERCENT: 57} {GRASS_INFO_PERCENT: 60} {GRASS_INFO_PERCENT:
> 63}
> lines={GRASS_INFO_PERCENT: 66}
> lines={GRASS_INFO_PERCENT: 69}
> lines={GRASS_INFO_PERCENT: 72}
> lines={GRASS_INFO_PERCENT: 75}
> lines={GRASS_INFO_PERCENT: 78}
> lines={GRASS_INFO_PERCENT: 81}
> lines={GRASS_INFO_PERCENT: 84} {GRASS_INFO_PERCENT: 87}
> lines={GRASS_INFO_PERCENT: 90}
> lines={GRASS_INFO_PERCENT: 93}
> lines={GRASS_INFO_PERCENT: 96}
> lines={GRASS_INFO_PERCENT: 99}
> lines={GRASS_INFO_PERCENT: 100}
> lines={} {GRASS_INFO_MESSAGE(5017,2): Color table for [elevation_delete] set
> to elevation} GRASS_INFO_END(5017,2)
> 
> Nothing seems wrong here. If I run r.colors without -e, I simply get the
> last line returned. Maybe the problem is in the progress bar routine itself.

Does it make any difference if you change the ">= 0" to "> 0"?

Other than that, the assumption that the problem is with the progress
bar code seems reasonable.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list