Problems with twisted version 10.0.0

Bug #585504 reported by Bartek Wilczynski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PyBridge
Fix Committed
Undecided
Unassigned

Bug Description

pybridge developmental version does not work with new twisted installed in ubuntu lucid lynx.

The first problem is that the dependency assumes that the newer versions of twisted are > "2.5.0", which fails fore the current version "10.0.0". I guess this might as well be a bug in twisted versioning. In version 0.3 of pybridge, changing this dependency solves the problem.

In development branch, the problem persists even if the dependency is changed. Namely, after creating a new table the client displays an empty window entitled program error...

Changed in pybridge:
status: New → Confirmed
Revision history for this message
Michael Banks (michaelbanks) wrote :

Thanks for your report. The first problem is indeed a bug in the bin/pybridge script, as documented at https://bugs.launchpad.net/ubuntu/+source/pybridge/+bug/580224

I have not managed to replicate your second problem. The development version of the PyBridge client not currently compatible with the PyBridge 0.3 server: are you connecting to a 0.3 server? Furthermore, if you run "pybridge" from a terminal and repeat the steps that cause the error, do you receive any error messages in the terminal?

Revision history for this message
Bartek Wilczynski (bartek) wrote :

It seems that these problems are in fact unrelated. The empty window comes from ui/excepthook being broken for reasons unknown to me. The cause of those Program errors seem to be the use of context.reset_clip(), which now requires parameters. It seems, that this patch fixes the problems:

=== modified file 'pybridge/ui/__init__.py'
--- pybridge/ui/__init__.py 2009-12-13 14:49:27 +0000
+++ pybridge/ui/__init__.py 2010-05-25 18:52:54 +0000
@@ -45,7 +45,7 @@
     # Set exception hook to display error dialog.
     import sys
     from excepthook import excepthook
- sys.excepthook = excepthook
+ #sys.excepthook = excepthook

     from manager import wm
     from window_main import WindowMain

=== modified file 'pybridge/ui/canvas.py'
--- pybridge/ui/canvas.py 2007-07-12 15:44:44 +0000
+++ pybridge/ui/canvas.py 2010-05-25 19:04:45 +0000
@@ -134,6 +134,7 @@
         """
         context = cairo.Context(self.backing)
         context.rectangle(x, y, width, height)
+ context.save()
         context.clip() # Set clip region.

         # Redraw background pattern in area.
@@ -151,7 +152,8 @@
             context.set_source_surface(item['source'], pos_x, pos_y)
             context.paint_with_alpha(item['opacity'])

- context.reset_clip()
+ #context.reset_clip()
+ context.restore()
         self.window.invalidate_rect((x, y, width, height), False) # Expose.

@@ -212,9 +214,11 @@
     def _expose(self, widget, event):
         context = widget.window.cairo_create()
         context.rectangle(*event.area)
+ context.save()
         context.clip() # Only redraw the exposed area.
         context.set_source_surface(self.backing, 0, 0)
         context.paint()
- context.reset_clip()
+ #context.reset_clip()
+ context.restore()
         return False # Expected to return False.

Changed in pybridge:
status: Confirmed → Fix Committed
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.