Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxPython recursion overflow #21

Open
GoogleCodeExporter opened this issue Aug 16, 2015 · 0 comments
Open

wxPython recursion overflow #21

GoogleCodeExporter opened this issue Aug 16, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Start from cmd.exe without any arguments.


What is the expected output? What do you see instead?
GUI fails to initialize. Endless loop of "Exception RuntimeError: 'maximum 
recursion depth exceeded'"


What version of the product are you using? On what operating system?
* Windows 7
* Python 2.7.5.6
* wxPython 2.9.5.0

Details
I opened a thread on the wxPython-users mailing list 
@https://groups.google.com/forum/#!topic/wxpython-users/7hA7ZXXMx20. The 
suggestions there fix the problem, though I can't be sure because the UI 
continues to randomly lock-up for short intervals quite often. While this is 
probably a different issue, it means I can't comprehensively test the following 
summarized solutions:

#1: get rid of ClusterList.on_size, use built-in auto-layout
ClusterList.__init__
...     
        #self.Bind(wx.EVT_SIZE, self.on_size)
        #self.info.Bind(wx.EVT_SIZE, self.on_size)
        #self.list.Bind(wx.EVT_SIZE, self.on_size)
...
ClusterList.on_size
    #def on_size(self, event):
    #    """Update layouts on size event"""
    #    self.list.Refresh()
    #    self.list.Layout()
    #    self.info.Refresh()
    #    self.info.Layout()
    #    self.Refresh()
    #    self.Layout()

#2: 
ClusterList.__init__
...
        self.Bind(wx.EVT_SIZE, self.on_size_self)
        self.info.Bind(wx.EVT_SIZE, self.on_size_special)
        self.list.Bind(wx.EVT_SIZE, self.on_size_special)
...
ClusterList.on_size*
    def on_size_self(self, event):
        """Update layouts on size event"""
        self.list.Refresh()
        self.list.Layout()
        self.info.Refresh()
        self.info.Layout()
        self.Refresh()
        self.Layout()
        event.Skip()

    def on_size_special(self, event):
        """Under no circusmtances call self.Layout(), will case *massive* problems"""
        pass

Original issue reported on code.google.com by [email protected] on 14 Dec 2013 at 7:46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant