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

Glynn Clements glynn at gclements.plus.com
Wed Apr 18 00:39:20 EDT 2007


Michael Barton wrote:

> It's the progress bar.
> 
> If I comment out the following lines in Gronsole::output_to_gronsole, it
> stops crashing. It's something about one of the two lines that execute after
> progress reaches 100%.
> 
> 
> #     } elseif { [regexp -- {^GRASS_INFO_PERCENT: (.+)$} $str match val
> rest] } {
> #         Gronsole::progress $path $ci $val
> #         if { $val >= 100 } {
> #             Gronsole::progress $path $ci -1
> #             $outtext insert $mark "\n" $tags
> #         }

My first would guess would be the progress bar widget itself.

It may be best to simply trace the code, e.g.:

	proc tracer {cmd op} {
		puts stderr $cmd
	}
	
	trace add execution Gronsole::progress enter tracer

Redirect stderr to a file; it will generate a lot of output.

FWIW, I found that the first time that I ran "r.colors --ui ...", the
UI crashed, but I couldn't reproduce it after that, which suggests
that it's timing related, i.e. it happens if the module produces
output too fast. I note that wish takes quite a while to start the
first time, but is much quicker thereafter (when the files are in
RAM).

Does it help if you remove the "update" call from the end of
ProgressBar::_modify?

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




More information about the grass-dev mailing list