Web lists-archives.com

gtk 2 problem with Gramps in Linux Mint 18 (beta) and ubuntu 16.04


I'm a Gramps developer, who still works with Gramps version 3.4.9,
because of its data model. Gramps is a genealogy program written in
Python. The version I work with is based on GTK+ 2, using the PyGTK wrapper.

This version has worked well for me, up to Linux Mint 17.3, but when I
tried the Mint 18 beta, I ran into two problems. These problems also
show up in ubuntu 16.04, but not in 15.10. The Gramps version that I use
is always the same, installed from the same .deb file, or the same
branch on GitHub.

Problem #1 is that when I work with a list of persons grouped by surname, like John A and Jane B, expanding the 2nd surname, which is at the bottom in the displayed surname/person detail tree (two levels), I get a Python exception, saying that the node (surname) index is out of bounds.
In this example surname nodes have indexes 0 and 1, and when I expand
the 2nd node, my logs show that our store's on_get_iter method is called
with path (2,), which is obviously out of bounds, because the only valid
paths are (0,0) and (1,0). I can see that after that, on_get_iter is
also called with path (1,0), so after acknowledging the error dialog, I
can still see the expanded B surname node.

Problem #2 doesn't show up in a two person tree, but it is visible in my
real tree, with more than 8000 surnames. When I expand a surname node near the end of the alphabet in that, say at path (8000,), I can see
that on_get_iter() is not just called with that path, as is normal in
Linuxes older than Mint 18/ubuntu 16.04, but that a full tree walk is
done, starting at path (0,), ending at (8000,), or whatever node I
clicked on. Compared to older Linuxes, that is 8000 or more useless
calls. This phenomenon does not show when I click a surname near the
start of the alphabet, like my own.

I'm mentioning Mint 18 and ubuntu 16.04, because they have the same
(ubuntu) code base, but a different desktop (cinnamon vs. unity). The
problem also shows in ubuntu GNOME, so I expect it's a GNOME issue, and with the little experience that I have, I suspect it's GTK. I also do
that, because in Gramps' module info, I see different version numbers for gtk, 2.24.28 vs. 2.24.30, and no differences for PyGTK or PyGObject. Python versions and Linux kernels differ too, but I can not imagine that they are causing this, because GTK is much closer to our code.

Since the diff between the 2.24.28 and 2.24.30 provides no clues in this
area, i.e. no obvious changes in get_iter like calls, I'm sending this to the list for advice. I am not completely sure that it's a GTK issue, because the Python versions differ too, but I can't get enough information from my Python log files, so I definitely need some clues for further analysis, before adding a possibly useless entry into bugzilla.

Is there anyone that recognizes this? Can this issue be caused by a change in repaint policies or anything like that? Would it be possible to install a hacked GTK+ 2 into my home folder, and let Python use that, without affecting other ubuntu components? I'm an experience C programmer, so it's quite easy for me to add log statements to gtktreeview.c, or anywhere else where it may be appropriate.

thank you,


gtk-devel-list mailing list