gtk 2 problem with Gramps in Linux Mint 18 (beta) and ubuntu 16.04
- From: Enno Borgsteede <ennoborg gmail com>
- To: gtk-app-devel-list gnome org
- Subject: gtk 2 problem with Gramps in Linux Mint 18 (beta) and ubuntu 16.04
- Date: Wed, 22 Jun 2016 20:10:19 +0200
Hello,
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.
If I understand things right, this version of Gramps uses GtkTreeModel
for display, but not GtkTreeStore, because that would mean keeping a
whole list of person data in memory, which is not always possible. In
other words, it has its own store, which reads data from the database
when needed.
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 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, I can see 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.
With Mint 17.3, everything is OK, but since that version of Mint is
based on ubuntu 14.04, I also tried this on ubuntu 15.10, where things
are also perfectly well.
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 found both issues by adding a print line to Gramps' Python code, and
it might be obvious that this print line causes a bit of a delay when
testing problem #2. But even without it, it is quite obvious that some
sort of full tree walk is done, because even then I see a considerable
delay when I expand a surname group that sits near the end of the
alphabet, and also when I edit a person in that area, which triggers a
check for a possible rebuilding of the display tree. These delays do not
show under Mint 17.3, or ubuntu 15.10, and when I add the print line to
my code on those Linux versions, I can indeed see that the number of
on_get_iter() calls is much less. In general, I only see such calls when
the mouse pointer hovers over a display line, or when a click causes a
focus change. In Mint 18, or ubuntu 16.04, I also see that on_get_iter()
is called for every person in a surname group when I expand that, where
it is only called for a few in Mint 17.3 or ubuntu 15.10, most probably
associated with mouse hovers (hints).
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' detailed log with 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 at Witt's end.
Any ideas, anyone?
thank you,
Enno
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]