Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open parameters dialog twice - NVDA alpha-35316,1065b056 #17705

Closed
MichelSuch opened this issue Feb 17, 2025 · 6 comments · Fixed by #17714
Closed

Cannot open parameters dialog twice - NVDA alpha-35316,1065b056 #17705

MichelSuch opened this issue Feb 17, 2025 · 6 comments · Fixed by #17714
Labels
bug/regression p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority release/blocking this issue blocks the milestone release triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@MichelSuch
Copy link
Contributor

Steps to reproduce:

  1. Install NVDA alpha-35316,1065b056
  2. Open parameters dialog and modify a parameter (tested with speech parameters)
  3. Close parameters dialog and try to reopen it.

Actual behavior:

Parameters does not reopen.

Expected behavior:

Parameters dialog should reopen as usual.

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

NVDA installed

NVDA version:

NVDA alpha-35316,1065b056

Windows version:

Windows 11 24H2 (AMD64) build 26100.3194

Name and version of other software in use when reproducing the issue:

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

Usual behaviour

If NVDA add-ons are disabled, is your problem still occurring?

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

@MichelSuch MichelSuch changed the title 1 Cannot open parameters dialog twice - NVDA alpha-35316,1065b056 Feb 17, 2025
@ruifontes
Copy link
Contributor

Can't reproduce.
Some NVDA version, Windows 11 ARM64 vversion 24H2 (Build 26100.3194)

@CyrilleB79
Copy link
Collaborator

I can reproduce 100% of times, on portable version or running from source.

Here is a more specific STR to reproduce:

  • Open NVDA menu -> Preferences -> Settings; do not use the shortcut NVDA+control+G
  • Toggle the value of a parameter, e.g. "Play sounds when starting or exiting NVDA"
  • Press Enter to validate
  • Open NVDA menu -> Preferences -> Settings; do not use the shortcut NVDA+control+G

The key is to open settings dialog through NVDA menu, not through one of its shortcuts.

The parameters dialog does not open at the second attempt and the following errors are logged:

ERROR - gui.settingsDialogs.MultiCategorySettingsDialog._doCategoryChange (14:10:52.404) - MainThread (1056):
Unable to change to category: Général
Traceback (most recent call last):
  File "gui\settingsDialogs.py", line 717, in _doCategoryChange
    newCat = self._getCategoryPanel(newCatId)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "gui\settingsDialogs.py", line 644, in _getCategoryPanel
    panel = cls(parent=self.container)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "gui\settingsDialogs.py", line 376, in __init__
    self._buildGui()
  File "gui\settingsDialogs.py", line 386, in _buildGui
    self.makeSettings(self.settingsSizer)
  File "gui\settingsDialogs.py", line 987, in makeSettings
    settingsSizerHelper.addLabeledControl(
  File "gui\guiHelper.py", line 432, in addLabeledControl
    labeledControl = LabeledControlHelper(parent, labelText, wxCtrlClass, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "gui\guiHelper.py", line 287, in __init__
    self._ctrl = cast(_LabeledControlT, WxCtrlWithEnableEvnt(parent, **kwargs))
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "gui\nvdaControls.py", line 487, in __init__
    configValue = self._getConfigValue()
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "gui\nvdaControls.py", line 543, in _getConfigValue
    raise ValueError(f"Config value is not a FeatureFlag, but a {type(conf)}")
ValueError: Config value is not a FeatureFlag, but a <class 'str'>
ERROR - unhandled exception (14:10:52.416) - MainThread (1056):
Traceback (most recent call last):
  File "gui\__init__.py", line 317, in onNVDASettingsCommand
    self.popupSettingsDialog(NVDASettingsDialog)
  File "gui\blockAction.py", line 111, in funcWrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "gui\__init__.py", line 242, in popupSettingsDialog
    dialog(self, *args, **kwargs).Show()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "gui\settingsDialogs.py", line 531, in __init__
    super(MultiCategorySettingsDialog, self).__init__(
  File "gui\settingsDialogs.py", line 230, in __init__
    self.makeSettings(self.settingsSizer)
  File "gui\settingsDialogs.py", line 5262, in makeSettings
    self._doOnCategoryChange()
  File "gui\settingsDialogs.py", line 5276, in _doOnCategoryChange
    self.SetTitle(self._getDialogTitle())
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "gui\settingsDialogs.py", line 5285, in _getDialogTitle
    panelTitle=self.currentCategory.title,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'title'

The issue has been introduced in commit 1065b05, from PR #17651. Cc @LeonarddeR

Adding to 2025.1 milestone since the issue has been introduced during the current dev cycle.

@CyrilleB79 CyrilleB79 added this to the 2025.1 milestone Feb 17, 2025
@SaschaCowley SaschaCowley added p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority release/blocking this issue blocks the milestone release triaged Has been triaged, issue is waiting for implementation. labels Feb 17, 2025
@SaschaCowley SaschaCowley removed this from the 2025.1 milestone Feb 17, 2025
@LeonarddeR
Copy link
Collaborator

While technically spoken, this issue was introduced by me in #17651, I have absolutely no idea what causes it. May be it has to do with the fact that general is a base only section and it has some custom validation logic. I'm happy for #17651 to be reverted. I have no time to fix the underlying issue.

@CyrilleB79
Copy link
Collaborator

CyrilleB79 commented Feb 18, 2025

@SaschaCowley you have added the release/blocking label but removed this issue from 2025.1 milestone. Did you intend to do this? This does not seem consistent. If yes, could you please explain why?

@LeonarddeR
Copy link
Collaborator

Probably the easiest way to fix this is making this a boolean rather than a feature flag.

@SaschaCowley SaschaCowley added this to the 2025.1 milestone Feb 18, 2025
@SaschaCowley
Copy link
Member

@CyrilleB79 sorry about that, I did not mean to do so. Thanks for bringing it to my attention!

seanbudd pushed a commit that referenced this issue Feb 25, 2025
Fixes #17705 
Fixup of #17651

Summary of the issue:
Pr #17651 introduced a feature flag in the general section of the config, but this is not supported yet.

Description of user facing changes
General settings panel can be reopened after saving.

Description of development approach
Rename the flag and make it a boolean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/regression p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority release/blocking this issue blocks the milestone release triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants