Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#47025 - [meld] Does not show any diffs; the python code produces a backtrace

Attached to Project: Arch Linux
Opened by Olivier (olive) - Tuesday, 10 November 2015, 15:53 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 12 November 2015, 15:39 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description:
The package is broken. The meld software does not show any diffs; it moreover gives the following error when launched from a terminal:

File "/usr/lib/python2.7/site-packages/meld/meldbuffer.py", line 268, in __getitem__
line_end = line_start.copy()
AttributeError: 'tuple' object has no attribute 'copy'

It appears to be an incompatibility with the current version of python2-gobject (3.18.2-1). This bug was not present before; I presume it has appeared with the upgrade of python2-gobject from version 3.16.x to 3.18.x.
Hereafter, I attach a patch that fixes the problem.

Additional info:
* package version(s)
meld 3.14.1-1
python2-gobject 3.18.2-1

* config and/or log files etc.


Steps to reproduce:

Take two text fiels with a few differences between them: file1.txt and file2.txt and launch meld file1.txt file2.txt.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Thursday, 12 November 2015, 15:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  meld 3.14.1-2
Comment by Doug Newgard (Scimmia) - Tuesday, 10 November 2015, 16:27 GMT
No problem here.

Edit: OK, it appears on the last GTK3 update.
Comment by Sergio de la Cruz (sergiodlc) - Tuesday, 10 November 2015, 17:13 GMT
I'm also experiencing the same issue. There's already a ticket created upstream: https://bugzilla.gnome.org/show_bug.cgi?id=757881

I use meld every day so I couldn't wait for them to fix it. I modified the source code and got it back to work again. Just apply the attached patches to the corresponding files in /usr/lib/python2.7/site-packages/meld/

This is only a temporary solution until the issue is fixed upstream. The problem, as mentioned in the upstream bug report, is due to gtk-3.18.3 changing the return value for GtkSource.Buffer.get_iter_at_line(). It now returns the tuple (bool, Gtk.TextIter) while it used to return the iterator alone before. A better solution would check for the GTK version installed and modify its usage accordingly.
Comment by Doug Newgard (Scimmia) - Tuesday, 10 November 2015, 17:16 GMT
"A better solution would check for the GTK version installed and modify its usage accordingly."

That might be a better solution for upstream, but it's irrelevant in Arch, since partial updates aren't supported.
Comment by Olivier (olive) - Tuesday, 10 November 2015, 17:30 GMT
@´┐╝sergiodlc Your patches does exactly the same as mine (but they are not properly formatted for patch). I don't think upstream needs our advice on this. The above modifications are surely completely obvious for him; he has been alerted of the problem, I assume this will be corrected in the next version. In the mean time, the arch package can be fixed with the proposed patch.
Comment by Sergio de la Cruz (sergiodlc) - Tuesday, 10 November 2015, 17:33 GMT
@olive. Man, I just missed your patch file. It could have saved me some time. Agree... It's simple enough that I'm pretty sure upstream will fix it pretty soon. Thank you!

Loading...