[Deluge] #3328: GLib.io_add_watch error

17 views
Skip to first unread message

Deluge

unread,
Nov 24, 2019, 11:02:14 PM11/24/19
to delug...@googlegroups.com
#3328: GLib.io_add_watch error
-------------------------+-------------------------------------------------
Reporter: Lord-Kamina | Type: bug
Status: new | Priority: minor
Milestone: needs | Component: Unknown
verified | Keywords: twisted gtk crash TypeError glib2
Version: 2.0.3 | gobject gio gir
-------------------------+-------------------------------------------------
I'm trying to make a viable mac bundle (and hopefully once that is done, a
script to reliably produce them)

So far, I'm stuck and Deluge won't run; I'm getting the following error,

{{{
Traceback (most recent call last):
File "/opt/deluge/packaging/osx/app/Deluge.app/Contents/MacOS/Deluge-
bin", line 11, in <module>
load_entry_point('deluge==2.0.3', 'gui_scripts', 'deluge-gtk')()
File
"/opt/deluge/packaging/osx/app/Deluge.app/Contents/Resources/lib/python3.6/deluge-2.0.3-py3.6.egg/deluge/ui/gtk3/__init__.py",
line 63, in start
Gtk().start()
File
"/opt/deluge/packaging/osx/app/Deluge.app/Contents/Resources/lib/python3.6/deluge-2.0.3-py3.6.egg/deluge/ui/gtk3/__init__.py",
line 43, in start
from .gtkui import GtkUI
File
"/opt/deluge/packaging/osx/app/Deluge.app/Contents/Resources/lib/python3.6/deluge-2.0.3-py3.6.egg/deluge/ui/gtk3/gtkui.py",
line 33, in <module>
reactor = gtk3reactor.install()
File "twisted/internet/gtk3reactor.pyc", line 71, in install
File "twisted/internet/gtk3reactor.pyc", line 50, in __init__
File "twisted/internet/gireactor.pyc", line 117, in __init__
File "twisted/internet/_glibbase.pyc", line 109, in __init__
File "twisted/internet/base.pyc", line 512, in __init__
File "twisted/internet/posixbase.pyc", line 286, in installWaker
File "twisted/internet/_glibbase.pyc", line 197, in addReader
File "twisted/internet/_glibbase.pyc", line 188, in _add
File "twisted/internet/_glibbase.pyc", line 162, in input_add
TypeError: GLib.io_add_watch() got multiple values for keyword argument
'priority'
}}}

Technically I guess it might actually Twisted's fault but there is one
thing that bugs me... if I run Deluge in ubuntu, I don't have that
issue... I've even tried matching the versions of twisted and other
dependencies on my environment (and subsequently bundle) to what is
included in the official canonical repos but I still get that error.

Over at twisted, _glybbase.py hasn't been touched in three years. So,
there must be _something_ deluge does different in linux and mac that
works fine on one and triggers that error on the other? Maybe it's a
quartz vs x11 issue? I don't know.

P.S. I've also tried with both Python 3.7 and 3.6.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3328>
Deluge <https://deluge-torrent.org/>
Deluge Project

Deluge

unread,
Nov 28, 2019, 9:34:49 AM11/28/19
to delug...@googlegroups.com
#3328: GLib.io_add_watch error
-------------------------+-------------------------------------------------
Reporter: Lord- | Owner:

Kamina |
Type: bug | Status: new
Priority: minor | Milestone: not applicable
Component: Packaging | Version: 2.0.3
Resolution: | Keywords: twisted gtk crash TypeError glib2
| gobject gio gir
-------------------------+-------------------------------------------------
Changes (by Cas):

* component: Unknown => Packaging
* milestone: needs verified => not applicable


Comment:

That is quite odd, looking at the source code for pygobject, it should
handle that usage by twisted:
https://gitlab.gnome.org/GNOME/pygobject/blob/3.34.0/gi/overrides/GLib.py#L612

What version of pygobject are you using?

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3328#comment:1>

Deluge

unread,
Nov 28, 2019, 9:40:24 AM11/28/19
to delug...@googlegroups.com
#3328: GLib.io_add_watch error
-------------------------+-------------------------------------------------
Reporter: Lord- | Owner:

Kamina |
Type: bug | Status: new
Priority: minor | Milestone: not applicable
Component: Packaging | Version: 2.0.3
Resolution: | Keywords: twisted gtk crash TypeError glib2
| gobject gio gir
-------------------------+-------------------------------------------------

Comment (by Lord-Kamina):

I have tried both 3.34 and 3.28; coupled with Twisted 19.10, 19.7, 18.9
and 17.5
So far all have produced the same result. I have detected a potential
issue with gtk-osx-application(macports-side) that I'm currently working
on solving (no idea if it could be related though)

I plan eventually to put the whole thing through a debugger once I'm done
with that kn case I can get some insight but I've never used pdb so
🤷🏼‍♂️

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3328#comment:2>

Deluge

unread,
Nov 28, 2019, 9:58:38 AM11/28/19
to delug...@googlegroups.com
#3328: GLib.io_add_watch error
-------------------------+-------------------------------------------------
Reporter: Lord- | Owner:

Kamina |
Type: bug | Status: new
Priority: minor | Milestone: not applicable
Component: Packaging | Version: 2.0.3
Resolution: | Keywords: twisted gtk crash TypeError glib2
| gobject gio gir
-------------------------+-------------------------------------------------

Comment (by Cas):

Can you test from a Python prompt that the function call will accept the
old-style arguments?

e.g.

{{{
from gi import version_info
version_info
from gi.repository import GLib
GLib.io_add_watch(1,GLib.IOCondition(1),print,priority=1)
}}}

I get:
{{{
>>> version_info
(3, 34, 0)
>>> GLib.io_add_watch(1,GLib.IOCondition(1),print,priority=1)
1
}}}

I don't think a debugger would provide any more information so perhaps if
you are still facing this issue ask the PyGobject or Twisted devs for
their thoughts.

For reference there is an old Twisted ticket about this:
https://twistedmatrix.com/trac/ticket/6369 but since pygobject shims this
function it was never fixed in twisted.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3328#comment:3>

Deluge

unread,
Nov 28, 2019, 11:39:21 AM11/28/19
to delug...@googlegroups.com
#3328: GLib.io_add_watch error
-------------------------+-------------------------------------------------
Reporter: Lord- | Owner:

Kamina |
Type: bug | Status: new
Priority: minor | Milestone: not applicable
Component: Packaging | Version: 2.0.3
Resolution: | Keywords: twisted gtk crash TypeError glib2
| gobject gio gir
-------------------------+-------------------------------------------------

Comment (by Lord-Kamina):

Will try it when I got some time (tonight or tomorrow).
I also opened a new ticket over at twisted and referenced that and another
one but so far there's no answer.

The reason I think a debugger might help is... I tried using the same
versions as packaged in Ubuntu (where deluge works) and ran into the
error. So, I figure there might be a branch somewhere in the code that
triggers the error in my version and not that one (or apparently,
homebrew's either)

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3328#comment:4>

Deluge

unread,
Nov 29, 2019, 4:43:43 PM11/29/19
to delug...@googlegroups.com
#3328: GLib.io_add_watch error
-------------------------+-------------------------------------------------
Reporter: Lord- | Owner:

Kamina |
Type: bug | Status: new
Priority: minor | Milestone: not applicable
Component: Packaging | Version: 2.0.3
Resolution: | Keywords: twisted gtk crash TypeError glib2
| gobject gio gir
-------------------------+-------------------------------------------------

Comment (by Lord-Kamina):

So... I just tried it, definitely appears to be a packaging issue; using
python3 from the macports prefix works fine; but using the python
executable insie my bundle throws the error.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3328#comment:5>

Deluge

unread,
Nov 30, 2019, 2:03:43 PM11/30/19
to delug...@googlegroups.com
#3328: GLib.io_add_watch error
-------------------------+-------------------------------------------------
Reporter: Lord- | Owner:

Kamina |
Type: bug | Status: new
Priority: minor | Milestone: not applicable
Component: Packaging | Version: 2.0.3
Resolution: | Keywords: twisted gtk crash TypeError glib2
| gobject gio gir
-------------------------+-------------------------------------------------

Comment (by Lord-Kamina):

Replying to [comment:5 Lord-Kamina]:


> So... I just tried it, definitely appears to be a packaging issue; using
python3 from the macports prefix works fine; but using the python
executable insie my bundle throws the error.

And, adding
{{{
packages = gi
}}}

to setup.cfg seems to have fixed that; I'm now getting a different error:

{{{
(Deluge-bin:62329): Gtk-WARNING **: 15:58:51.386: Locale not supported by
C library.
Using the fallback 'C' locale.
Trace/BPT trap: 5
}}}

Which seems pretty generic but I expect the solution will most likely be
the same: Some nondescript module dependence py2app failed to pick-up.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3328#comment:6>

Deluge

unread,
Dec 6, 2019, 6:01:32 AM12/6/19
to delug...@googlegroups.com
#3328: GLib.io_add_watch error
-------------------------+-------------------------------------------------
Reporter: Lord- | Owner:

Kamina |
Type: bug | Status: new
Priority: minor | Milestone: not applicable
Component: Packaging | Version: 2.0.3
Resolution: | Keywords: twisted gtk crash TypeError glib2
| gobject gio gir
-------------------------+-------------------------------------------------

Comment (by Lord-Kamina):

Close this please, it was indeed a packaging issue.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3328#comment:7>

Deluge

unread,
Dec 6, 2019, 6:09:24 AM12/6/19
to delug...@googlegroups.com
#3328: GLib.io_add_watch error
-------------------------+-------------------------------------------------
Reporter: Lord- | Owner:
Kamina |
Type: bug | Status: closed

Priority: minor | Milestone: not applicable
Component: Packaging | Version: 2.0.3
Resolution: Fixed | Keywords: twisted gtk crash TypeError glib2

| gobject gio gir
-------------------------+-------------------------------------------------
Changes (by Cas):

* status: new => closed
* resolution: => Fixed


--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3328#comment:8>

Reply all
Reply to author
Forward
0 new messages