Opened 12 years ago

Closed 10 years ago

#4489 defect closed fixed (fixed)

gtk2reactor not servicing gui events when using producer/consumer or recursive callbacks

Reported by: gabriele.lanaro Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch: branches/gtk2-io-deprioritize-4489
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun

Description

The problem appeared in two test-cases, when producing a "series" (one following another) callbacks the problem appear.

The first test case I'm recursively adding callbacks to a deferred (after a pb call).

Test 1: untar twistsample1.tar.gz

$ python runner.py
click on the button

minimize/unminimize window to force a widget redraw, the window should be blank. you can click another time on the button, the event is catched but no "button animation" is performed

Test2: launch twisted_block.py You should have symilar symptoms.

Attachments (3)

twistsample.tar.gz (942 bytes) - added by gabriele.lanaro 12 years ago.
First test case
twisted_block.py (817 bytes) - added by gabriele.lanaro 12 years ago.
second test case
gtk2unresponsive.py (722 bytes) - added by Jean-Paul Calderone 12 years ago.

Download all attachments as: .zip

Change History (11)

Changed 12 years ago by gabriele.lanaro

Attachment: twistsample.tar.gz added

First test case

Changed 12 years ago by gabriele.lanaro

Attachment: twisted_block.py added

second test case

comment:1 Changed 12 years ago by Jean-Paul Calderone

I can reproduce this on Ubuntu 9.10. I can also reproduce it with a pure pygtk app (attached). :/

Changed 12 years ago by Jean-Paul Calderone

Attachment: gtk2unresponsive.py added

comment:2 Changed 12 years ago by Jean-Paul Calderone

It's a problem on Ubuntu 10.04 as well. I filed an upstream bug report. We'll see what they say. https://bugzilla.gnome.org/show_bug.cgi?id=620901

comment:3 Changed 12 years ago by Jean-Paul Calderone

Author: exarkun
Branch: branches/gtk2-io-deprioritize-4489

(In [29243]) Branching to 'gtk2-io-deprioritize-4489'

comment:4 Changed 12 years ago by Jean-Paul Calderone

(In [29244]) The minimal fix required

refs #4489

comment:5 Changed 12 years ago by Jean-Paul Calderone

So the change I checked in to the branch makes gtk2reactor set an explicit priority for the I/O events we ask gobject to monitor for us. The level selected is one that is lower priority than servicing GUI events (like expose). This means rendering the GUI will be given priority over servicing network events. I think this makes sense for GUI apps.

It's possible this makes sense as an application-configurable parameter of some sort, though.

I ran into problems testing this which may stem from #4481 so I'm going back to that to try to finish it off before proposing this to be merged.

comment:6 Changed 11 years ago by <automation>

Owner: Glyph deleted

comment:7 Changed 10 years ago by itamarst

(In [33928]) Lower priority of I/O and timeout callbacks.

Refs #5067 and #4489

comment:8 Changed 10 years ago by itamarst

Resolution: fixed
Status: newclosed

(In [33931]) Merge gtk-ui-priority-5067: Lower priority for Twisted callbacks in gtk/glib.

Author: thomasvs, exarkun Review: itamar Fixes: #4489, #5067

Lower the priority of Twisted events in the glib/gtk reactor so that the UI will always refresh.

Note: See TracTickets for help on using tickets.