Tried to install tryton, but it segfaults

Hi,

first time on this forum here. I just tried to install tryton and failed.

Two hosts, one for the server and one for the client, both Debian stable. The
server seems to run. I can provide further details on the installation, if
required. The client was installed as follows:

wget -O /etc/apt/trusted.gpg.d/debian.tryton.org-archive.gpg \
  http://debian.tryton.org/debian/debian.tryton.org-archive.gpg
echo 'deb http://debian.tryton.org/debian/ stretch-5.0 main' \
  > /etc/apt/sources.list.d/tryton.list
cat <<'EOF' > /etc/apt/preferences.d/debian.tryton.org.pref
Package: *
Pin: release o=debian.tryton.org
Pin-Priority: 999
EOF
apt update && apt-get dist-upgrade -y
apt install tryton-client -y

The problem: When I open tryton and click on “Manage…” the following
error appears:

ERROR:tryton.common.common:  File "/usr/lib/python3/dist-packages/tryton/gui/window/dblogin.py", line 519, in profile_manage
    callback)
  File "/usr/lib/python3/dist-packages/tryton/gui/window/dblogin.py", line 59, in __init__
    'tryton-add', gtk.ICON_SIZE_BUTTON))
  File "/usr/lib/python3/dist-packages/tryton/common/common.py", line 161, in get_image
    pixbuf = cls.get_pixbuf(iconname, size, color)
  File "/usr/lib/python3/dist-packages/tryton/common/common.py", line 156, in get_pixbuf
    cls._pixbufs[size][iconname] = data2pixbuf(data, width, height)
  File "/usr/lib/python3/dist-packages/tryton/common/common.py", line 1309, in data2pixbuf
    return _data2pixbuf(data, width, height)
  File "/usr/lib/python3/dist-packages/tryton/common/common.py", line 1298, in _data2pixbuf
    loader = gtk.gdk.PixbufLoader()

GdkPixbuf.PixbufLoader.new_with_type() takes exactly 1 argument (0 given)
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

When I enter the actual login data and click “Connect” I get:

ERROR:tryton.common.common:  File "/usr/lib/python3/dist-packages/tryton/gui/main.py", line 285, in do_command_line
    self.do_activate()
  File "/usr/lib/python3/dist-packages/tryton/gui/main.py", line 181, in do_activate
    common.IconFactory.get_image('tryton-menu', Gtk.IconSize.BUTTON))
  File "/usr/lib/python3/dist-packages/tryton/common/common.py", line 161, in get_image
    pixbuf = cls.get_pixbuf(iconname, size, color)
  File "/usr/lib/python3/dist-packages/tryton/common/common.py", line 156, in get_pixbuf
    cls._pixbufs[size][iconname] = data2pixbuf(data, width, height)
  File "/usr/lib/python3/dist-packages/tryton/common/common.py", line 1309, in data2pixbuf
    return _data2pixbuf(data, width, height)
  File "/usr/lib/python3/dist-packages/tryton/common/common.py", line 1298, in _data2pixbuf
    loader = gtk.gdk.PixbufLoader()

GdkPixbuf.PixbufLoader.new_with_type() takes exactly 1 argument (0 given)
ERROR:tryton.common.common:  File "/usr/lib/python3/dist-packages/tryton/gui/main.py", line 300, in on_quit
    if not self.close_pages():
  File "/usr/lib/python3/dist-packages/tryton/gui/main.py", line 562, in close_pages
    if self.notebook.get_n_pages():

'Main' object has no attribute 'notebook'
ERROR:tryton.common.common:  File "/usr/lib/python3/dist-packages/tryton/gui/main.py", line 300, in on_quit
    if not self.close_pages():
  File "/usr/lib/python3/dist-packages/tryton/gui/main.py", line 562, in close_pages
    if self.notebook.get_n_pages():

'Main' object has no attribute 'notebook'
[1]    7418 segmentation fault  tryton

Any clues what might be the issue and how to fix that?

Tryton 5.0.4

It looks like your version of gdk-pixbuf is buggy. At least the introspection does not use the right constructor for Gdk.PixbufLoader without parameter.

Thanks for the quick response. It’s a stock debian stable system. No other
repos used than the one mention in the OP.

The project seems to have quite a few Debian installations since you’re
running your own repo. That’s actually why I went with Debian thinking it’s
well supported and tested. I wonder if I’m the only one running into this.

What’s the recommended way to go about this? How did others fix the issue?

The client starts on a debian testing system. So you’re right regarding a bug. It would be nice to know if there’s a workaround for a debian stable, though.

I run tryton from source on debian stable. No such problems encountered.

@fmorato Which libgdk-pixbuf version do you have? It fails here with libgdk-pixbuf2.0-0 2.36.5-2+deb9u2.

Same version here. Weird that it fails for you. Maybe it’s an issue with the packaging? I don’t understand enough of packaging to know if it would interfere in this way, though.

It may be a problem with pygobject which is responsible of introspection. Otherwise it may be that the file /usr/share/gir-1.0/GdkPixbuf-2.0.gir is not right.

Just tried it on a debian live VM and it’s definitely reproducable. Steps to
reproduce:

Boot debian live (stretch), then:

sudo su -
wget -O /etc/apt/trusted.gpg.d/debian.tryton.org-archive.gpg \
  http://debian.tryton.org/debian/debian.tryton.org-archive.gpg
echo 'deb http://debian.tryton.org/debian/ stretch-5.0 main' \
  > /etc/apt/sources.list.d/tryton.list
cat <<'EOF' > /etc/apt/preferences.d/debian.tryton.org.pref
Package: *
Pin: release o=debian.tryton.org
Pin-Priority: 999
EOF
apt update && apt install tryton-client -y
exit
tryton

Then click “Manage…” and the abovementioned error appears.

@ced No such file present:

% ls /usr/share/gir-1.0/
CScreensaver-1.0.gir

% find / -name GdkPixbuf-2.0.gir
%

On my debian sid I don’t have the issue. But I do have the file for the introspection of gdxpixbuf:

nicoe@mirabelle:~% locate GdkPixbuf-2.0.gir
/usr/share/gir-1.0/GdkPixbuf-2.0.gir
nicoe@mirabelle:~% dpkg -S /usr/share/gir-1.0/GdkPixbuf-2.0.gir
libgdk-pixbuf2.0-dev:amd64: /usr/share/gir-1.0/GdkPixbuf-2.0.gir

It works on debian sid and testing, but fails on stable. After installing the libgdk-pixbuf2.0-dev package on stable the issue persists. That means the error unlikely resides in that file.

I guess it’s still about five to six months for debian testing to become stable. Then it’ll solve itself.