Gtk2Reactor object has no attribute simulate

Bug #1058320 reported by Andrew Starr-Bochicchio
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Deluge
Fix Released
Unknown
deluge (Ubuntu)
Fix Released
Medium
Andrew Starr-Bochicchio
Precise
Fix Released
Medium
Andrew Starr-Bochicchio

Bug Description

[IMPACT]

Changes in Twisted cause Deluge's connection manager to not launch on start up. This is in Twisted 12 in quantal and also in precise as we backported the changes to Gtk2Reactor in a patch to Twisted 11.

This can cause confusion for users if they have disabled "classic" mode and need to start the daemon.

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 413, in fireEvent
    DeferredList(beforeResults).addCallback(self._continueFiring)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 301, in addCallback
    callbackKeywords=kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 290, in addCallbacks
    self._runCallbacks()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 551, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 426, in _continueFiring
    callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/deluge/ui/gtkui/gtkui.py", line 336, in _on_reactor_start
    self.__start_non_classic()
  File "/usr/lib/python2.7/dist-packages/deluge/ui/gtkui/gtkui.py", line 376, in __start_non_classic
    reactor.simulate()
exceptions.AttributeError: 'Gtk2Reactor' object has no attribute 'simulate'

[TESTCASE]

Make sure that "clasic" mode is not enabled in Preferences > Interface. Also make sure that "Do not show this dialog on startup" is _not_ checked in the Connection Manager dialog's options.

Launch "deluge" from the terminal. The version in precise will show you the above traceback. The verson that is in precise-proposed will launch without the traceback and the Connection Manager dialog will be shown

[Regression Potential]

There is not much regression potential as this patch backported fom upstream is simply a try/except statement:

@@ -373,7 +373,11 @@ Please see the details below for more information."), details=traceback.format_e

             if self.config["show_connection_manager_on_start"]:
                 # XXX: We need to call a simulate() here, but this could be a bug in twisted
- reactor.simulate()
+ try:
+ reactor._simulate()
+ except AttributeError:
+ # twisted < 12
+ reactor.simulate()
                 self.connectionmanager.show()

Changed in deluge (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Andrew Starr-Bochicchio (andrewsomething)
Changed in deluge (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Andrew Starr-Bochicchio (andrewsomething)
description: updated
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Adding link to upstream commit as the diff get misformetted in the above discription:

http://git.deluge-torrent.org/deluge/commit/?h=1.3-stable&id=17cac01673d479ecb4f4dbbc16a5c82bc19907e9

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package deluge - 1.3.5-1ubuntu4

---------------
deluge (1.3.5-1ubuntu4) quantal; urgency=low

  * debian/patches/twisted_reactor_stimulate.patch:
   - Deal with twisted's Gtk2Reactor refactoring (LP: #1058320).
 -- Andrew Starr-Bochicchio <email address hidden> Fri, 28 Sep 2012 16:23:14 -0400

Changed in deluge (Ubuntu):
status: In Progress → Fix Released
Changed in deluge:
status: Unknown → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Please test proposed package

Hello Andrew, or anyone else affected,

Accepted into precise-proposed. The package will build now and be available in a few hours in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in deluge (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package deluge - 1.3.5-0ubuntu2~precise2

---------------
deluge (1.3.5-0ubuntu2~precise2) precise-proposed; urgency=low

  * debian/patches/twisted_reactor_stimulate.patch:
   - Deal with twisted's Gtk2Reactor refactoring (LP: #1058320).
 -- Andrew Starr-Bochicchio <email address hidden> Fri, 28 Sep 2012 16:53:13 -0400

Changed in deluge (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.