3.1 GUI unresponsiveness

Alan Young
  • Alan Young

    Alan Young - 2005-11-09

    Since upgrading to 3.1, I have noticed some issues with the GUI being unresponsive and several times all of the widgets disappear and the list window does not redraw.

    I've been able to make the interface more responsive by adding calls to wx.Yield() in various places in the code. 
    I'm a programmer, but I'm completely new to python so I'm not sure I'm adding them in the proper places.  However, they have helped as I can usually get the menu bar and tool bar active again by double clicking a torrent and then closing the popup window.  The widgets usually redraw after that and are active for a while.  I can do a diff for these changes, but I think I'm just shooting in the dark as there appears to be mutlple bottlenecks elsewhere.  For example, if there is a torrent checking the existing pieces, it seems to cause the right click pop up not to come up on any other torrent.  Doing the double click, close and then a right click a couple of times seems to make it work.

    When the widgets disappear I have noticed it happens after a Xlib error message "Xlib: unexpected async reply".  From the limited searching I have done, this seems to happen if two threads try to use the X window Xlib functions at the same time.  I'm not sure what to do about this one as the few wxpython lists indicate the app needs to be restructured to have the main thread only process GUI events and all the child threads need to send their events to the parent.

    • Timothy Tucker

      Timothy Tucker - 2005-11-09

      Thanks -- it's due to a change that was made in between 3.0 and 3.1 that shouldn't have been made.  I'm reverting it back and the next release should behave a bit better in this regard.

    • Timothy Tucker

      Timothy Tucker - 2005-11-10
      • Alan Young

        Alan Young - 2005-11-10

        Thanks!  That appears to be much better.

        When it started up one thread said "waiting" for a status, when I think it was doing a hash check.  The progress status was counting up, but it did not say "checking existing data".

        The menu and toolbar are still disappearing after a couple of minutes.  I can get them back by double clicking on a torrent to get the popup and then closing the popup.  It is better than before as then only the toolbar was partially responding after closing the popup.  Now toolbar appears to be fully functional with drawn buttons and the menu is drawn and responding too.

        By installing the new version, it reminded me of two other problems I have been having with 3.1.

        The first is a crash on startup.  Here's the traceback:

        [work@tarrant ABC]$ python -O -OO abc.py
        Setting up languages
        filename: english.lang
        Client Starting Up.
        Build: Build 174
        Preparing GUI.
        Traceback (most recent call last):
          File "abc.py", line 604, in ?
          File "abc.py", line 599, in run
            app = ABCApp(0, params, single_instance_checker, abcpath)
          File "abc.py", line 559, in __init__
            wx.App.__init__(self, x)
          File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/_core.py", line 7473, in __init__
          File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/_core.py", line 7125, in _BootstrapApp
            return _core_.PyApp__BootstrapApp(*args, **kwargs)
          File "abc.py", line 563, in OnInit
            self.frame = ABCFrame(-1, self.params, self.utility)
          File "abc.py", line 323, in __init__
            self.window = ABCPanel(self)
          File "abc.py", line 212, in __init__
            self.list = ABCList(self)
          File "abc.py", line 83, in __init__
            ManagedList.__init__(self, parent, style, prefix, minid, maxid, rightalign)
          File "/home/work/ABC/ABC/GUI/list.py", line 395, in __init__
          File "/home/work/ABC/ABC/GUI/list.py", line 410, in loadFont
          File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/_controls.py", line 4735, in EnsureVisible
            return _controls_.ListCtrl_EnsureVisible(*args, **kwargs)
        wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed in ../src/generic/listctrl.cpp(4384): invalid index in EnsureVisible
        [work@tarrant ABC]$

        If I comment out the self.EnsureVisible(0) call, then it starts up fine.

        The other issue is with icon mode.  If it iconizes, it does not was to restore to a window.  I see these messages in the log when I click on the icon

        (python:3807): Gdk-CRITICAL **: gdk_window_invalidate_rect: assertion `window != NULL' failed
        Traceback (most recent call last):
          File "abc.py", line 432, in onIconify
          File "abc.py", line 269, in updateIcon
            self.SetIcon(self.utility.icon, "ABC")
          File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/_windows.py", line 2223, in SetIcon
            return _windows_.TaskBarIcon_SetIcon(*args, **kwargs)
        wx._core.PyAssertionError: C++ assertion "image.HasMask()" failed in ../src/common/rgncmn.cpp(111): wxBitmap::ConvertToImage doesn't preserve mask?
        Exception in thread Thread-64:
        Traceback (most recent call last):
          File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
          File "/usr/lib/python2.4/threading.py", line 605, in run
            self.function(*self.args, **self.kwargs)
          File "/home/work/ABC/ABC/Scheduler/scheduler.py", line 195, in CyclicalTasks
          File "/home/work/ABC/ABC/Scheduler/scheduler.py", line 181, in updateTrayAndStatusBar
            self.utility.frame.tbicon.SetIcon(self.utility.icon, icontext)
          File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/_windows.py", line 2223, in SetIcon
            return _windows_.TaskBarIcon_SetIcon(*args, **kwargs)
        PyAssertionError: C++ assertion "image.HasMask()" failed in ../src/common/rgncmn.cpp(111): wxBitmap::ConvertToImage doesn't preserve mask?

        Setting the preference to never iconize works around that issue.


Log in to post a comment.