Page 1 of 1

A torrent file makes GTK and WebUI stop working

Posted: Thu Sep 13, 2012 1:07 pm
by Aonoa
Hello,

I am wondering if someone can shed some light on why a particular torrent file stops the WebUI and GTK UI from working. I can attempt to connect to the daemon through WebUI, but nothing happens and a little later it will say "connection lost". After this, the daemon will be listed as "Offline" in the connection manager.

When trying the GTK interface, it will seemingly be connected to the daemon, but no torrent lists or anything related to the daemon is accessible in the interface.

Only the deluge-console will actually let me access the deluged daemon after having added this torrent file.

Deleting the file from the daemon fixes the issue, and I am again able to use the WebUI and GTK UI. I have tried having this torrent file as the only torrent loaded into deluge, but the problem is still there, so it is definitely something related to this specific torrent file.

Here is a link to it: http://www.sendspace.com/file/36fo4p

It contains this file:

Code: Select all

iPhone3,1_6.0_10A403_Restore - iMZDL.com.ipsw
I am using Deluge 1.3.5 on a Gentoo Linux system with python 2.7.

Best regards,
Ao

Re: A torrent file makes GTK and WebUI stop working

Posted: Thu Sep 13, 2012 3:20 pm
by Cas
What version of libtorrent.

Re: A torrent file makes GTK and WebUI stop working

Posted: Thu Sep 13, 2012 11:33 pm
by Aonoa
It is rb_libtorrent version 0.15.6.

Re: A torrent file makes GTK and WebUI stop working

Posted: Thu Sep 13, 2012 11:52 pm
by Cas
Check the logs for an errors and test with latest lt 0.15 version: 0.15.10

Re: A torrent file makes GTK and WebUI stop working

Posted: Fri Sep 14, 2012 12:14 am
by Aonoa
Upgrading to 0.15.10 and subsequently re-installing Deluge makes no difference, sadly. I have enabled debug loglevel and outputting it to a file, but I cannot see any errors in it.

Re: A torrent file makes GTK and WebUI stop working

Posted: Fri Sep 14, 2012 12:16 pm
by Cas
Ok I have now had a chance to test it and you are correct this is a Deluge issue and it seems to be the same problem with the RPC protocol as described in this ticket: http://dev.deluge-torrent.org/ticket/2116

I tested the fix that bro suggested in that ticket and it does fix the issue however there is a problem of breaking backward compatibility (ui <-> daemon) if we apply this to 1.3 :/

Re: A torrent file makes GTK and WebUI stop working

Posted: Sun Sep 16, 2012 12:48 pm
by Cas
If you edit the deluge/rencode.py file and replace UnicodeEncodeError with UnicodeDecodeError then the problem should be fixed.

Here is a diff of the rencode fix:

Code: Select all

@@ -164,7 +164,7 @@
         t = s.decode("utf8")
         if len(t) != len(s):
             s = t
-    except UnicodeEncodeError:
+    except UnicodeDecodeError:
         pass
     return (s, colon+n)
 
@@ -223,7 +223,7 @@
                 t = s.decode("utf8")
                 if len(t) != len(s):
                     s = t
-            except UnicodeEncodeError:
+            except UnicodeDecodeError:
                 pass
             return (s, f+1+slen)
         return f