Skip to content

Once again warn about instances of settings dialog kept alive after they are closed#16054

Merged
seanbudd merged 4 commits into
nvaccess:masterfrom
lukaszgo1:warnLiveDialogs
Jan 22, 2024
Merged

Once again warn about instances of settings dialog kept alive after they are closed#16054
seanbudd merged 4 commits into
nvaccess:masterfrom
lukaszgo1:warnLiveDialogs

Conversation

@lukaszgo1

Copy link
Copy Markdown
Contributor

Link to issue number:

Follow up from PR #16019

Summary of the issue:

Normally it should not be possible to open the same NVDA's settings dialog multiple times. To make sure this does not happen settings dialog constructor verifies if the given dialog is already opened, and either focuses it when it is, or creates a new dialog when it is not. In rare cases the dialog should be destroyed after user closed it, but due to circular reference Python's garbage collector cannot clean it up. Before PR #15105 this was causing an error making it impossible to reopen the dialog. In that PR the behavior was changed, so that when the instance is still kept alive it is just marked as created and reused. As described in PR #16019 when dialogs are not destroyed properly NVDA may malfunction, so having an error and non working dialog is better than a hard to debug error in other part of NVDA.

Description of user facing changes

This should not have user visible impact, as long as there are no dialogs which fail to be destroyed when they are closed.

Description of development approach

When there is an existing instance of a given dialog which is marked as destroyed there is an error in the log, and no other instances of this dialog can be created.

Testing strategy:

Temporarily reintroduced a circular reference for the Add-on Store dialog, and verified that it cannot be reopened. Ensured that expected warning is in the log.

Known issues with pull request:

None known

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@lukaszgo1 lukaszgo1 requested a review from a team as a code owner January 16, 2024 15:59
@lukaszgo1 lukaszgo1 requested a review from seanbudd January 16, 2024 15:59
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Jan 17, 2024
Comment thread source/gui/__init__.py Outdated
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 0ab7c7409d

@seanbudd seanbudd merged commit 647f7e4 into nvaccess:master Jan 22, 2024
@nvaccessAuto nvaccessAuto added this to the 2024.2 milestone Jan 22, 2024
@lukaszgo1 lukaszgo1 deleted the warnLiveDialogs branch January 22, 2024 10:38
Nael-Sayegh pushed a commit to Nael-Sayegh/nvda that referenced this pull request Feb 15, 2024
…hey are closed (nvaccess#16054)

Follow up from PR nvaccess#16019

Summary of the issue:
Normally it should not be possible to open the same NVDA's settings dialog multiple times. To make sure this does not happen settings dialog constructor verifies if the given dialog is already opened, and either focuses it when it is, or creates a new dialog when it is not. In rare cases the dialog should be destroyed after user closed it, but due to circular reference Python's garbage collector cannot clean it up. Before PR nvaccess#15105 this was causing an error making it impossible to reopen the dialog. In that PR the behavior was changed, so that when the instance is still kept alive it is just marked as created and reused. As described in PR nvaccess#16019 when dialogs are not destroyed properly NVDA may malfunction, so having an error and non working dialog is better than a hard to debug error in other part of NVDA.

Description of user facing changes
This should not have user visible impact, as long as there are no dialogs which fail to be destroyed when they are closed.

Description of development approach
When there is an existing instance of a given dialog which is marked as destroyed there is an error in the log, and no other instances of this dialog can be created.
SaschaCowley pushed a commit to SaschaCowley/nvda that referenced this pull request Feb 27, 2024
…hey are closed (nvaccess#16054)

Follow up from PR nvaccess#16019

Summary of the issue:
Normally it should not be possible to open the same NVDA's settings dialog multiple times. To make sure this does not happen settings dialog constructor verifies if the given dialog is already opened, and either focuses it when it is, or creates a new dialog when it is not. In rare cases the dialog should be destroyed after user closed it, but due to circular reference Python's garbage collector cannot clean it up. Before PR nvaccess#15105 this was causing an error making it impossible to reopen the dialog. In that PR the behavior was changed, so that when the instance is still kept alive it is just marked as created and reused. As described in PR nvaccess#16019 when dialogs are not destroyed properly NVDA may malfunction, so having an error and non working dialog is better than a hard to debug error in other part of NVDA.

Description of user facing changes
This should not have user visible impact, as long as there are no dialogs which fail to be destroyed when they are closed.

Description of development approach
When there is an existing instance of a given dialog which is marked as destroyed there is an error in the log, and no other instances of this dialog can be created.
Adriani90 pushed a commit to Adriani90/nvda that referenced this pull request Mar 13, 2024
…hey are closed (nvaccess#16054)

Follow up from PR nvaccess#16019

Summary of the issue:
Normally it should not be possible to open the same NVDA's settings dialog multiple times. To make sure this does not happen settings dialog constructor verifies if the given dialog is already opened, and either focuses it when it is, or creates a new dialog when it is not. In rare cases the dialog should be destroyed after user closed it, but due to circular reference Python's garbage collector cannot clean it up. Before PR nvaccess#15105 this was causing an error making it impossible to reopen the dialog. In that PR the behavior was changed, so that when the instance is still kept alive it is just marked as created and reused. As described in PR nvaccess#16019 when dialogs are not destroyed properly NVDA may malfunction, so having an error and non working dialog is better than a hard to debug error in other part of NVDA.

Description of user facing changes
This should not have user visible impact, as long as there are no dialogs which fail to be destroyed when they are closed.

Description of development approach
When there is an existing instance of a given dialog which is marked as destroyed there is an error in the log, and no other instances of this dialog can be created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants