-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add queue of ExceptionHandlerDialogs
Fixes #1093. This commit adds a queue of ExceptionHandlerDialogs, so we only show one at a time. This avoids the scenario where GTG creates dialogs in a loop, making them impossible to close. If an exception happens while the dialog is opened, its own dialog will pop up when the current one gets closed. First test with a repro of #1093, raising an exception in the TaskBox constructor. 3 dialogs pop up consecutively, and it's always possible to click on "Continue" to keep GTG running. After that, clicking on a different pane also makes 3 error dialogs pop up in sequence. Interestingly, GTG hangs on the click on the third Continue. I'm not too bothered about it because this emulates a rare case of the system being in a really bad state and it's probably a good idea to exit anyway. We could consider setting `ignorable` to False when there is already an exception in the queue, forcing an exit in the "exception while handling an exception" scenario. I'm also not sure why there are 3 dialogs and not 5 (the size of the queue) or however many times the exception is raised (it seems to stop at some point). But I don't think it matters much. I also confirmed that I'm seeing "Caught AttributeError ('ListItem' object has no attribute 'bindings') but not showing dialog for it because too many exceptions are happening." in the logs. Second test with the more common case of a single exception. I added an exception inside `on_search_toggled()`. GTG was working fine until I clicked on the magnifying glass, at which point the dialog popped up. I could click on Continue and keep using GTG.
- Loading branch information
Showing
3 changed files
with
50 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters