Work around wxWidgets assertion - #12292
Merged
Merged
Conversation
michaelDCurran
approved these changes
Apr 15, 2021
feerrenrut
added a commit
that referenced
this pull request
May 6, 2021
Fixes: #12336 Fixes: #12220 # Summary of the issue: Issue#12220 Causes a wx assertion message when either the Braille or Speech settings panels are open. This seems to be related to the expando text control used on both panels. The assertion is in wx's accessibility code, which has been introduced in our latest upgrade of wxPython. The PR #12292 attempted to fix this by explicitly destroying the expando text control when closing. In #12292 it was missed that the onSave callback was also called for the apply button. # Description of how this pull request fixes the issue: While looking at adding an explicit close callback for panels, I noticed that Destroy was being called manually during the event handler. Scheduling a destroy call after the event handler seems to resolve this issue. As I understand, destroying children explicitly is not required. While here also: - Tidy onSave / onApply - Add type info for 'catIdToInstanceMap' and 'categoryClasses'
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
#12220
Summary of the issue:
There is a wxAssertion error when closing braille or speech settings panels.
There is a lot more information about the investigation on the issue.
Description of how this pull request fixes the issue:
This PR provides a workaround, the true cause of this assertion has not yet been determined.
However in the meantime this PR will prevent the log error, and any aditional instability in WX that may occur due to ending up
in this situation.
Testing strategy:
Exited both the speech and the braille settings panels via pressing enter, esc, clicking on ok, and clicking on cancel.
Known issues with pull request:
None
Change log entry:
None, this issue has not been in a release yet.
Code Review Checklist:
This checklist is a reminder of things commonly forgotten in a new PR.
Authors, please do a self-review and confirm you have considered the following items.
Mark items you have considered by checking them.
You can do this when editing the Pull request description with an x:
[ ]becomes[x].You can also check the checkboxes after the PR is created.