Michael-48/Iris

Demo Style Window is broken

Closed this issue · 2 comments

Updating properties leads to an error, this should be fixed asap.

I've attempted to look into this and discover what's causing the issue. From what I can see, it seems to be due to the order of destruction for objects, defined in the VDOM. If you delete a parent (ie. window), then the instance is deleted, but so is the widget table. However, this widget table reference does not get updated for its children, which are destroyed later, and then invoke the ChildDiscarded method on a 'dead' widget table which attempts to access a destroyed instance.

I presume a rewrite of how a refresh works would be needed, because the parent is always called before the child and because the refresh is always done within the next frame in order defined by the user's code, rather than within Iris, I'm not sure how to go around fixing this.

@Michael-48 An update of what I think has caused this. My previous explanation was true, but I think I've found a bigger culprit. When adding in Menus, I had to specifically tell the window to remove the MenuBar when it was destroyed. However, there were not the appropriate checks in place to make sure that it didn't attempt to use the destroyed window instance. In the latest push on window-flex, I have removed this, so it should not fail anymore. I don't whether that was the main or root cause, but if it doesn't happen again, I think it is safe to close this issue.