GNOME Bugzilla – Bug 757963
3.18.3 get_iter functions break programs
Last modified: 2015-11-16 10:00:46 UTC
Hey. As reported here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804798 GTK 3.18.3 break applications, e.g. meld which doesn't show its "diff" colours anymore, thereby becoming unusable. Michael Biebl, found and confirmed the reason to be the changes from commit: cf51c4f6dbd91dae1878a0cb0d08b24c67e15232: "textbuffer: nicer get_iter functions" Cheers, Chris.
don't really see the 'found and confirmed' part in the debian bug... sounds more like a blind guess :-
Hi Matthias, what I did was a git bisect run which identified cf51c4f6dbd91dae1878a0cb0d08b24c67e15232 as the faulty commit. Do you need more information?
$:andre\> rpm -q meld meld-3.14.1-1.fc23.noarch $:andre\> rpm -q gtk3 gtk3-3.18.3-1.fc23.x86_64 $:andre\> meld ~/git/triagescripts/task.user.js ~/.mozilla/firefox/12345678.default/gm_scripts/foo/task.user.js Traceback (most recent call last):
+ Trace 235715
ret = next(task)
for i in self._diff_files():
while next(step) is None:
while next(work) is None:
a, b = self.preprocess()
a, b = self.preprocess_remove_prefix_suffix(self.a, self.b)
self.common_prefix = find_common_prefix(a, b)
if a[0] == b[0]:
line_end = line_start.copy()
(In reply to Michael Biebl from comment #2) > Hi Matthias, > > what I did was a git bisect run which identified > cf51c4f6dbd91dae1878a0cb0d08b24c67e15232 as the faulty commit. > > Do you need more information? But yeah, my first reply was just an educated* guess based on looking at git log. * or blind :-)
The commit "nicer get_iter functions" adds boolean return values, which is perfectly fine in C but it breaks Python code, for example this line needs to be adapted: https://git.gnome.org/browse/meld/tree/meld/sourceview.py?id=7dcfef038ed9dbac7d17f2f36d1039995db32873#n136 > it = buf.get_iter_at_line(line) Since the commit changes the API (in a backward-compatible way), I think it should not have been backported on the 3.18 version.
I don't know what's the policy for GTK+ about API compatibility for GIR bindings. But the boolean return value is not very useful. It tells whether the exact position was found, which can also be checked by calling gtk_text_iter_get_line(), gtk_text_iter_get_line_index() etc on the returned iter.
I've reverted the commit now on both branches. We can maybe try again without the boolean return added ?
See bug #735341 for the new attempt. We can close this one.
*** Bug 757881 has been marked as a duplicate of this bug. ***
*** Bug 758098 has been marked as a duplicate of this bug. ***
*** Bug 758150 has been marked as a duplicate of this bug. ***