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

Crash when repeatedly removing and adding a List containing an editable column #54

Open
justvanrossum opened this issue Jan 11, 2018 · 5 comments

Comments

@justvanrossum
Copy link
Collaborator

Run the following, and hit the "Click" button repeatedly until it crashes. The crash occurs in a fairly deep key/value binding callback.

If in the code below you change editable=True to editable=False, no crash occurs.

I am not sure how to further debug this.

from vanilla import Window, Button, List

class ListTest(object):

    def __init__(self):
        self.w = Window((600, 400), "Test")
        self.w.button = Button((10, 10, 100, 25), "Click", self.buttonClick)
        self.setList()
        self.w.open()

    def buttonClick(self, sender):
        del self.w.list
        self.setList()

    def setList(self):
        items = [dict(a=100) for i in range(3)]
        descriptions = [dict(title="a", key="a", editable=True)]
        self.w.list = List((120, 0, 0, 0), items, columnDescriptions=descriptions)

ListTest()
@justvanrossum justvanrossum changed the title Crash when repeatedly removing a List containing an editable column Crash when repeatedly removing and adding a List containing an editable column Jan 11, 2018
@justvanrossum
Copy link
Collaborator Author

You may ask: why remove the list and add it again: well, that seems currently the only public way to change the column descriptions.

@michielkauwatjoe
Copy link

Here's a crash log:

vanilla-list-crash-log.txt

In addition I sometimes get this error message:

/Applications/RoboFont1.8.app/Contents/Resources/lib/python2.7/vanilla/vanillaList.py:467: UninitializedDeallocWarning: leaking an uninitialized object of type VanillaArrayController

@typesupply
Copy link
Member

@justvanrossum

You may ask: why remove the list and add it again: well, that seems currently the only public way to change the column descriptions.

Do you remember what you needed to change in the column descriptions? I want to enable adding/removing columns after creation and I can address this issue at the same time. (The change will apply to List2. List2 is a billion times better than List :)

@justvanrossum
Copy link
Collaborator Author

Do you remember

That's... close to six years ago, I haven't got the faintest...

@typemytype
Copy link
Member

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

No branches or pull requests

4 participants