Bug 1117812 - UnicodeDecodeErrors making meld 3.11 basically broken
Summary: UnicodeDecodeErrors making meld 3.11 basically broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: meld
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-09 12:41 UTC by Seb L.
Modified: 2016-11-07 20:19 UTC (History)
6 users (show)

Fixed In Version: meld-3.16.3-2.el7.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 20:19:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Seb L. 2014-07-09 12:41:46 UTC
Description of problem:
  meld from epel7 is incompatible with LANG=fr_FR.utf8

Version-Release number of selected component (if applicable):
  meld-3.11.0-1.el7.2.noarch

How reproducible:
  Always

Steps to Reproduce:
  export LANG=fr_FR.utf8
  date > 1.txt
  sleep 2
  date > 2.txt
  meld 1.txt 2.txt

Actual results:

  As is:

  Usage: 
    meld                                 Démarrer avec une fenêtre vide
    meld <fichier|folder>                Démarrer une comparaison de gestion de versions
    meld <fichier> <fichier> [<fichier>] Démarrer une comparaison de 2 ou 3 fichiers
    meld <folder> <folder> [<folder>]    Start a 2- or 3-way folder comparison


  If we use the GUI for manually selecting the two files:

    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/meld/newdifftab.py", line 112, in on_button_compare_clicked
        tab = self.diff_methods[self.diff_type](compare_paths)
      File "/usr/lib/python2.7/site-packages/meld/meldwindow.py", line 604, in append_filediff
        doc = filediff.FileDiff(len(files))
      File "/usr/lib/python2.7/site-packages/meld/filediff.py", line 321, in __init__
        self.set_num_panes(num_panes)
      File "/usr/lib/python2.7/site-packages/meld/filediff.py", line 1889, in set_num_panes
        self.recompute_label()
      File "/usr/lib/python2.7/site-packages/meld/filediff.py", line 1061, in recompute_label
        self.label_text = (" — ").decode('utf8').join(shortnames)
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 23: ordinal not in range(128)


  If we first enter "export LANG=C" or "export LANG=en_US.utf8":
    
    (seems to work, but throws those errors to the console)

    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/meld/gutterrendererchunk.py", line 125, in do_query_data
        chunk = self.linediffer.get_chunk(chunk_index, self.from_pane)
      File "/usr/lib/python2.7/site-packages/meld/diffutil.py", line 249, in get_chunk
        if from_pane in (0, 2):
    TypeError: Couldn't find conversion for foreign struct 'cairo.Context'
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/meld/gutterrendererchunk.py", line 128, in do_query_data
        action = self._classify_change_actions(chunk)
      File "/usr/lib/python2.7/site-packages/meld/gutterrendererchunk.py", line 145, in _classify_change_actions
        editable, other_editable = [v.get_editable() for v in self.views]
    TypeError: Couldn't find conversion for foreign struct 'cairo.Context'


Expected results:
  meld should display a file comparison between "1.txt" and "2.txt"

Comment 1 Lauri Nurmi 2015-08-07 10:04:08 UTC
In my experience the problem is not specific to fr_FR.utf8, but more or less all locales other than en_US.utf8 and C.

The exact symptoms may vary slightly, but the common factor is that the actual comparison functionality is completely unusable.

FWIW, I tested the meld-3-12 branch in meld's official git repo, and that meld seems to work fine on CentOS 7.

Comment 2 Thorsten Leemhuis 2015-12-27 13:55:20 UTC
Lubomir, I ran into this today as well on a fresh CentOS 7.2 install:

[thl@truhe tmp]$ date > 1.txt; sleep 1; date > 2.txt; meld 1.txt 2.txt 

** (meld:7278): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-gEaFMJ47eE: Verbindungsaufbau abgelehnt
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/meld/task.py", line 110, in iteration
    ret = next(task)
  File "/usr/lib/python2.7/site-packages/meld/filediff.py", line 1224, in _set_files_internal
    for i in self._load_files(files, self.textbuffer):
  File "/usr/lib/python2.7/site-packages/meld/filediff.py", line 1098, in _load_files
    yield _("[%s] Opening files") % self.label_text
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 21: ordinal not in range(128)

Maybe it would be wise to rebase to a later version? Want me to prepare something for you? Which version? The latest (3.14.2) might match the gnome in RHEL/CentOS now.

Comment 3 Paul-Antoine Arras 2016-01-08 13:53:37 UTC
I confirm the issue on RHEL 7.2, either with the GUI or at command line. As a result, meld is unusable for file comparison.
Can anyone provide a more recent build?

Comment 4 Thorsten Leemhuis 2016-10-09 14:34:18 UTC
Could you give this package a try please: 
https://kojipkgs.fedoraproject.org//work/tasks/5669/16015669/meld-3.16.3-2.el7.src.rpm
I plan to submit it as a update for epel7

Comment 5 Götz Waschk 2016-10-10 06:43:12 UTC
Well that new version doesn't start for me:
% meld
Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "pk-gtk-module"
Traceback (most recent call last):
  File "/usr/bin/meld", line 281, in <module>
    setup_glib_logging()
  File "/usr/bin/meld", line 264, in setup_glib_logging
    GLib.log_set_handler(log_domain, level_flag, log_adapter, None)
  File "/usr/lib64/python2.7/site-packages/gi/module.py", line 320, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib64/python2.7/site-packages/gi/module.py", line 139, in __getattr__
    self.__name__, name))
AttributeError: 'gi.repository.GLib' object has no attribute 'log_set_handler'

Comment 6 Thorsten Leemhuis 2016-10-10 08:02:59 UTC
(In reply to Götz Waschk from comment #5)
> Well that new version doesn't start for me:

What the… Seeing this problem now as well here; wondering why I didn't see it yesterday (did I test on the wrong machine?). Anyway: Scratch the request for testing, I'll look into this

Comment 7 Thorsten Leemhuis 2016-10-18 19:11:42 UTC
(In reply to Thorsten Leemhuis from comment #6)
> (In reply to Götz Waschk from comment #5)
> > Well that new version doesn't start for me:
> What the… Seeing this problem now as well here; wondering why I didn't see
> it yesterday (did I test on the wrong machine?). Anyway: Scratch the request
> for testing, I'll look into this

Please give this build a try (yes, this time I tested it for real…):
http://koji.fedoraproject.org/koji/taskinfo?taskID=16117588

Comment 8 Götz Waschk 2016-10-19 06:01:09 UTC
Great, the new version is working fine so far.

Comment 9 Paul-Antoine Arras 2016-10-21 09:32:56 UTC
Works for me too. Thanks!

Comment 10 Fedora Update System 2016-10-23 00:20:07 UTC
meld-3.16.3-2.el7.1 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-c3428883ac

Comment 11 Fedora Update System 2016-11-07 20:19:43 UTC
meld-3.16.3-2.el7.1 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.