Re: Bug in GtkText

Nuno Ferreira <> writes:

> I think I found a bug in GtkText. When starting gnomecal it never shows up
> and eats all your cpu IF you have an event on the current day.
> I found out it's spinning in this loop at line 3389
> - gtktext.c::find_line_containing_point 
> /* Scroll the bottom of the line is on screen, or until
>  * the line is the first onscreen line.
>  */
> while (cache->next != text->line_start_cache && lph > height)
> {
>     TEXT_SHOW_LINE (text, cache, "cache");
>     TEXT_SHOW_LINE (text, cache->next, "cache->next");
>     scroll_int (text, LINE_HEIGHT(CACHE_DATA(cache->next)));
>     lph = pixel_height_of (text, cache->next);
> }
> As you can see cache->next never changes so the loop can never finish.

Hmmm, actually it isn't that simple - cache->next doesn't change
but text->line_start_cache and lph _do_ change, so the loop
(in theory) can finish. 

I made some fixes to the Text widget recently related to problems
like this, so if you are using 1.1.1, you might want to
try grabbing the latest version from anoncvs.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]