Closed robmcmullen closed 7 years ago
Gettin' closer:
name: 'changed'
obj: <pyface.ui.wx.action.menu_manager.MenuManager object at 0x11339d170>
old_value: <undefined>
new_value: True
obj_dict: {'_groups': [<pyface.action.group.Separator object at 0x112bbb590>, <pyface.action.group.Separator object at 0x112bbb5f0>, <pyface.action.group.Separator object at 0x112bbb650>, <pyface.action.group.Separator object at 0x112bbb6b0>, <pyface.action.group.Separator object at 0x113324c50>, <pyface.action.group.Separator object at 0x113324cb0>, <pyface.action.group.Separator object at 0x1133525f0>, <pyface.action.group.Group object at 0x113352170>, <pyface.action.group.Separator object at 0x113352710>, <pyface.action.group.Separator object at 0x113352770>, <pyface.action.group.Separator object at 0x1133527d0>, <pyface.action.group.Separator object at 0x113352dd0>, <pyface.tasks.action.dock_pane_toggle_group.DockPaneToggleGroup object at 0x113352830>, <pyface.tasks.action.task_toggle_group.TaskToggleGroup object at 0x113352890>, <pyface.action.group.Separator object at 0x113352e30>, <pyface.action.group.Separator object at 0x113352e90>, <pyface.action.group.Separator object at 0x113352ef0>, <pyface.action.group.Group object at 0x11339d1d0>], 'name': u'View', 'parent': <pyface.action.group.Group object at 0x1134172f0>, 'controller': <pyface.tasks.action.task_action_controller.TaskActionController object at 0x11338a170>, 'separator': False, 'id': 'View'}
Looks like it is in the view menu. Lots of sub-menus there. Maybe we have to explicitly remove the sub-menus somehow?
The workaround causes the Segments menu to fail; the items in this menu are all radio buttons and they aren't erased when switching tabs among open files.
This menu seems to work on Mac even before the hack, so maybe it's just when the app is exiting? So a possible hack is to include a flag in pyface when the app is about to close so it won't delete radio buttons then.
This also happens when adding a task to a window that has radio buttons when the current task has radio buttons. One way this can happen:
File -> New -> Blank Atari DOS SD image File -> New -> Jumpman Level
crash
Should add a workaround for the 1.0 release, and if that means turning all radio buttons into regular menu items, maybe that's what it takes.
That workaround does seem to keep it from crashing...
Because of how the trait callbacks work, I can change all the radios to toggles and it still works! Every menu item gets a trait notification and sets itself to the correct state. Woohoo!
The app usually crashes when exiting with a big huge stack trace:
but I think the real culprit is in the ctraits stuff. I think a trait change event is being called after the menu item (or whatever) has been deleted.