Hi,
I'm having trouble with the issue described in this bug report: https://dev.deluge-torrent.org/ticket/3010
I'm using version 1.3.15 with libtorrent: 1.1.9.0 and on some older ubuntu.
After a while deluge stop updating the screen because of some error inside twisted-framework about the overflowing int.
Any chance of a fix? Or anyone knows of any workarounds? I'd rather not upgrade due to losing the current files
Help with freezing deluge
Re: Help with freezing deluge
Cas posted a workaround in that ticket(catching the exception), in which you can apply yourself manually if wanted, or e.g. something like:
Code: Select all
sudo find /usr -path "*/deluge/ui/gtkui/gtkui.py" -exec sed -i 's/reactor.run()/try: reactor.run()\n except OverflowError: pass/' {} \;
-
- New User
- Posts: 3
- Joined: Thu Jul 21, 2022 10:49 am
Re: Help with freezing deluge
Unfortunately, it didn't seem to help, i got overflow error anyway :/
Re: Help with freezing deluge
Sorry to hear that, though very puzzling when said OverflowError should be catched and ignored as per Cas's comment/code. Could you please check applied correctly, through running following line:
Which if applied correctly should output:
Anyway, if did apply fine, which I guess as tested it firstly before posting, then I don't know sorry. However, i'd follow euphoria's helpfull comment in that ticket, and see if can find the troublesome torrent and recheck/start, or delete:
Code: Select all
find /usr -path "*/deluge/ui/gtkui/gtkui.py" -exec grep "try: reactor.run" -A1 {} \;
Code: Select all
try: reactor.run()
except OverflowError: pass
For what it's worth, I see the same issue. When it happens, there is an affected torrent that shows Progress as "Paused 0.00%" but if I click on the Files tab all of the pieces are 100% downloaded, and on the Status / Details tabs it looks active. I am on Ubuntu 16.04.2 with Deluge 1.3.15 through the PPA.
[...]
Restarting Deluge the torrent shows Paused 0.00% like it did while logging the error, forcing a re-check shows that it actually did complete some pieces, and the torrent can be started normally without continuing to log.
-
- New User
- Posts: 3
- Joined: Thu Jul 21, 2022 10:49 am
Re: Help with freezing deluge
I think the real problem is that GTK / twisted / GLIB or whatever has an internal "id" or something which is accumulated, and if you run a lot of torrents and leave the app running for a long time, this ID overflows because of incorrect type of integer used somewhere in the C-backend.
I patched _glibbase.py by adding a try/except around the source_remove. will see if it makes any difference, although i suspect it will just lead to other problems :/
def _reschedule(self):
"""
Schedule a glib timeout for C{_simulate}.
"""
if self._simtag is not None:
try:
self._source_remove(self._simtag) #kludge
except:
pass
self._simtag = None
timeout = self.timeout()
if timeout is not None:
self._simtag = self._timeout_add(
int(timeout * 1000), self._simulate,
priority=self._glib.PRIORITY_DEFAULT_IDLE)
I patched _glibbase.py by adding a try/except around the source_remove. will see if it makes any difference, although i suspect it will just lead to other problems :/
def _reschedule(self):
"""
Schedule a glib timeout for C{_simulate}.
"""
if self._simtag is not None:
try:
self._source_remove(self._simtag) #kludge
except:
pass
self._simtag = None
timeout = self.timeout()
if timeout is not None:
self._simtag = self._timeout_add(
int(timeout * 1000), self._simulate,
priority=self._glib.PRIORITY_DEFAULT_IDLE)