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 316689 - GtkTreeView does not resize correctly
GtkTreeView does not resize correctly
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.8.x
Other Linux
: Normal major
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
: 314487 318727 328744 328767 330977 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-09-19 08:50 UTC by Chris Lord
Modified: 2006-05-28 17:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Screenshot of devhelp showing the error (46.33 KB, image/png)
2005-09-19 08:51 UTC, Chris Lord
  Details
patch (1.59 KB, patch)
2005-10-24 22:32 UTC, Kristian Rietveld
none Details | Review
Screenshot of wxvlc's GtkFileChooser showing the error (39.83 KB, image/png)
2006-04-06 12:46 UTC, Chris Lord
  Details

Description Chris Lord 2005-09-19 08:50:47 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
Comment 1 Chris Lord 2005-09-19 08:51:47 UTC
Created attachment 52385 [details]
Screenshot of devhelp showing the error
Comment 2 Chris Lord 2005-09-26 10:55:51 UTC
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 */"
Comment 3 Kristian Rietveld 2005-09-28 13:08:30 UTC
*** Bug 314487 has been marked as a duplicate of this bug. ***
Comment 4 Kristian Rietveld 2005-10-24 22:32:38 UTC
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.
Comment 5 Kristian Rietveld 2005-10-25 08:21:44 UTC
(reassigning to owner of treeview component).
Comment 6 Kristian Rietveld 2006-01-14 19:41:39 UTC
finally committed to cvs head ... 
Comment 7 Kristian Rietveld 2006-01-14 20:02:50 UTC
*** Bug 318727 has been marked as a duplicate of this bug. ***
Comment 8 Kristian Rietveld 2006-03-08 13:36:20 UTC
*** Bug 328744 has been marked as a duplicate of this bug. ***
Comment 9 Kristian Rietveld 2006-03-08 13:36:32 UTC
*** Bug 330977 has been marked as a duplicate of this bug. ***
Comment 10 Kristian Rietveld 2006-03-08 13:39:44 UTC
it's being committed on 2.8.x as well and will make 2.8.14.
Comment 11 Richard Hult 2006-03-14 19:59:11 UTC
*** Bug 328767 has been marked as a duplicate of this bug. ***
Comment 12 Brian Dolbec 2006-03-20 05:32:24 UTC
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.
Comment 13 Chris Lord 2006-04-06 12:45:13 UTC
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?)
Comment 14 Chris Lord 2006-04-06 12:46:38 UTC
Created attachment 62849 [details]
Screenshot of wxvlc's GtkFileChooser showing the error

In addition, this is with gtk+ 2.8.16
Comment 15 Florian Steinel 2006-04-14 09:48:00 UTC
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.
Comment 16 Kristian Rietveld 2006-05-25 23:07:11 UTC
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).
Comment 17 Kristian Rietveld 2006-05-26 00:04:24 UTC
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 ;)
Comment 18 Florian Steinel 2006-05-28 17:27:51 UTC
(In reply to comment #16)
filed bug 343213