After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721597 - Visual errors when row is inserted in fixed height mode
Visual errors when row is inserted in fixed height mode
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
3.11.x
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2014-01-05 20:07 UTC by Sam Thursfield
Modified: 2018-04-15 00:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Interactive test case (2.68 KB, text/x-csrc)
2014-01-05 20:07 UTC, Sam Thursfield
  Details
multiqueue: prevent buffering forever with playbin (1.59 KB, patch)
2014-01-15 03:19 UTC, Thiago Sousa Santos
none Details | Review
multiqueue: prevent buffering forever with playbin (1.59 KB, patch)
2014-01-15 03:23 UTC, Thiago Sousa Santos
none Details | Review
treeview: Fix visual glitch on row-inserted (2.87 KB, patch)
2014-01-31 23:58 UTC, Olivier Brunel (jjacky)
none Details | Review

Description Sam Thursfield 2014-01-05 20:07:14 UTC
Created attachment 265389 [details]
Interactive test case

The attached testcase demonstrates the problem. It seems to only occur in Gtk+-3 and only in fixed height mode.

The testcase presents an empty treeview window 2 rows high, with an 'add row' button. Each row is added above the previous row, the row values are decreasing integers starting from 9. After 2 rows have been added the visible area begins to display rows in the wrong place or the bottom row becomes completely blank. Mousing over a row makes it display correctly again. 

The exact nature of the artifacts varies depending on which Gtk version I use; with Git master, I see:
 - '9' in both rows on the 3rd 'add row' press
 - bottom row goes blank on the 5th 'add row' press
 - '9' is displayed in both rows on 7th 'add row' press and all subsequent ones
Comment 1 Thiago Sousa Santos 2014-01-15 03:19:03 UTC
Created attachment 266324 [details] [review]
multiqueue: prevent buffering forever with playbin

When prerolling/buffering, multiqueue has its buffers limit set
to 0, this means it can take an infinite amount of buffers.

When prerolling/buffering finishes, its limit is set back to 5, but
only if the current level is lower than 5. It should (almost) never be
and this will cause prerolling/buffering to need to wait to reach the
hard bytes and time limits, which are much higher.

This can lead to a very long startup time. This patch fixes this
by setting the single queues to the max(current, new_value) instead
of simply ignoring the new value and letting it as infinite(0)
Comment 2 Thiago Sousa Santos 2014-01-15 03:23:54 UTC
Created attachment 266325 [details] [review]
multiqueue: prevent buffering forever with playbin

When prerolling/buffering, multiqueue has its buffers limit set
to 0, this means it can take an infinite amount of buffers.

When prerolling/buffering finishes, its limit is set back to 5, but
only if the current level is lower than 5. It should (almost) never be
and this will cause prerolling/buffering to need to wait to reach the
hard bytes and time limits, which are much higher.

This can lead to a very long startup time. This patch fixes this
by setting the single queues to the max(current, new_value) instead
of simply ignoring the new value and letting it as infinite(0)
Comment 3 Thiago Sousa Santos 2014-01-15 03:24:49 UTC
Comment on attachment 266325 [details] [review]
multiqueue: prevent buffering forever with playbin

Sorry, attached to the wrong bug :(
Comment 4 Olivier Brunel (jjacky) 2014-01-31 23:58:39 UTC
Created attachment 267765 [details] [review]
treeview: Fix visual glitch on row-inserted

With fixed row height, when rows are inserted but not visible there's
a call to queue_resize_no_redraw() to avoid useless redraw operation.

However, when calling gtk_tree_view_top_row_to_dy() to adjust the
adjustment/scroll position, a redraw would be performed leading to some
invalid visual "glitches" (e.g. rows moved to wrong place).

Disabling this when called from gtk_tree_view_top_row_to_dy() avoids such
issues.
Comment 5 Sam Thursfield 2014-02-04 17:24:54 UTC
This fixes the issue for me against Gtk+ master. Thanks for the patch!
Comment 6 Matthias Clasen 2018-02-10 05:27:10 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 7 Matthias Clasen 2018-04-15 00:39:00 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new