Opened 12 years ago

Closed 12 years ago

#1623 enhancement closed invalid (invalid)

wxreactor/wxpython does not work well together - GUI "hangs"

Reported by: robertckcheung Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: itamarst Branch:


OS: Windows XP Twisted 2.0.1 Python 2.3.4 and 2.3.5 wxPython

Hi, we have been using wxReactor in a wxPython application. While it works MOST of the time on MOST machines, we have found that on certain machines (mainly virtual machines and machines with slow graphics cards), the creations of "large" GUIs causes the programs to "hang". ie a process that should take say 1 second might take 5-10 minutes. Furthermore, it turns out that if you "force" GUI refreshes by waving another window in front of the application's GUI, it speeds things up (ie it might take around 5 seconds to create the GUI).

Whilst we have not discovered the root of this problem, we are lead to believe it is some sort of GUI refresh race condition. So by tweaking line 49 of twisted/internet/ to say -

self.Start(100) instead of self.Start(1)

fixed our problems.

Speculation: The 1 millisecond timer is far too agressive and calling the paint function of wxPython this rapidly causes a serious race condition. When we make the calls to wxPython every 100ms instead the race condition disappeared (not saying it cannot happen under a different condition).

Request: Change to use a more conservative timer (100ms works for us).


Robert Cheung

Change History (2)

comment:1 Changed 12 years ago by itamarst

Cc: itamarst added
Resolution: invalid
Status: newclosed

wxreactor was extensively rewritten in Twisted 2.1 (with some improvements in 2.2), so this change is no longer relevant.

I am closing this bug on the assumption that this issue does not occur in 2.2. Please reopen if you still have problems/other problems.

comment:2 Changed 7 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.