GNOME Bugzilla – Bug 316689
GtkTreeView does not resize correctly
Last modified: 2006-05-28 17:27:51 UTC
Distribution/Version: Ubuntu 5.10 preview (2005-09-19) If, for example, a GtkTreeView is inside a GtkScrolledWindow, scrolling to the bottom of this list and using a filter to shrink this list so that the current scrollbar position no longer exists results in the scrollbar not displaying correctly (the handle disappears) and the TreeView appearing empty. Clicking on the scrollbar arrows corrects the situation. This bug only occurs in gtk 2.8 and did not occur in gtk 2.6 - Also reported on Ubuntu bugzilla, https://bugzilla.ubuntu.com/show_bug.cgi?id=15694 Sure-fire way to reproduce: 1. Set application font to Bitstream Vera Sans, size 8 2. Install devhelp and devhelp-book-gtk2 3. Load devhelp and resize the window to approximately 610x520 pixels (anything around this or smaller) 4. Switch to the search tab and enter 'gtk_l' 5. Scroll to the bottom of the results 6. Enter an 'i' after 'gtk_l' 7. Observe incorrect result with gtk 2.8, but correct result with gtk 2.6
Created attachment 52385 [details] Screenshot of devhelp showing the error
The bug does seem to be with GtkTreeView - examining the diff of 2.8 vs. 2.6 (http://cvs.gnome.org/viewcvs/gtk%2B/gtk/gtktreeview.c?r1=1.429.2.26&r2=1.490.2.2), changes on lines 2019/2033, 2087/2100, 2141/2153, 4914/5016, 4929/5061, 5133/5236 and 5198/5299 seem to be relevant. A comment says "/* now the adjustments and window sizes are in sync, we can sync toprow/dy again */"
*** Bug 314487 has been marked as a duplicate of this bug. ***
Created attachment 53855 [details] [review] patch This patch fixes the issue here. I will test whether it does not break anything tomorrow; if it passes all tests I will commit it immediately.
(reassigning to owner of treeview component).
finally committed to cvs head ...
*** Bug 318727 has been marked as a duplicate of this bug. ***
*** Bug 328744 has been marked as a duplicate of this bug. ***
*** Bug 330977 has been marked as a duplicate of this bug. ***
it's being committed on 2.8.x as well and will make 2.8.14.
*** Bug 328767 has been marked as a duplicate of this bug. ***
I have been getting segfaults with our app when we were switching out the treeview model. The segfault happened when an expander was expanded, then the models switched. One user has reported the problem gone with gtk+-2.8.16 and glib-2.10.1. It seems very likely that this bug was the cause of the segfault.
This doesn't appear to be completely fixed. In the situation an application uses a reuses GtkFileChooser, for example, if you select the last file in a list (the file list has to be long enough to need a scroll-bar), after the file chooser is hidden and shown again, the list is scrolled down slightly beyond the height of the list (causing a drawing artifact in the scrollbar as well). Will attach a screenshot with wxvlc (I think glade also reuses a GtkFileChooser?)
Created attachment 62849 [details] Screenshot of wxvlc's GtkFileChooser showing the error In addition, this is with gtk+ 2.8.16
Full traceback is at http://article.gmane.org/gmane.comp.gnome.gtk%2B.python/8017 i've also tried gtk+-2.8.17 and it's still crashing.
Brain/F. Steinel: The stack trace in the article you pointed at is completely unrelated to this bug report. Please file a new bug with a minimal test case (as Johan suggested there).
Hmm, bug wasn't there in HEAD and in gtk-2-8 a chunk of the original patch was missing (and the bug didn't occur when running in gdb or under valgrind for some weird reason ...). Also fixed a little thing in gtk_tree_view_top_row_to_dy(), so this bug should really be gone now ;)
(In reply to comment #16) filed bug 343213