Skip to content

After changing symbol level and saving configuration NVDA corrupts its own config. #12630

@lukaszgo1

Description

@lukaszgo1

Regression from PR #11856

Steps to reproduce:

  1. Start latest NVDA Alpha with the existing config.
  2. Change symbol level either with NVDA+p or from the speech settings.
  3. Save config.
  4. Restart NVDA.

Actual behavior:

NVDA starts using the default config and displays a dialog explaining that your config is invalid. The following is in the log:

Config before schema update:
{'schemaVersion': '4', 'development': {'enableScratchpadDir': 'True'}, 'upgrade': {}, 'update': {}, 'general': {'language': 'en', 'saveConfigurationOnExit': 'True', 'askToExit': 'True', 'playStartAndExitSounds': 'True', 'loggingLevel': 'INFO', 'showWelcomeDialogAtStartup': 'False'}, 'speech': {'synth': 'espeak', 'autoLanguageSwitching': 'False', 'outputDevice': 'Mapowanie dźwięku Microsoft', 'symbolLevel': 'SYMLVL.MOST', 'espeak': {'voice': 'pl', 'variant': 'max', 'rate': '75', 'pitch': '40', 'inflection': '75', 'volume': '55', 'rateBoost': 'True'}, 'silence': {}, 'sapi5': {'voice': 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices\\Tokens\\Speak3', 'rate': '100', 'volume': '100'}, 'sapi4': {'voice': '{C99D1CDD-B5CF-4CE7-BA42-FF07ED282DCB}', 'rate': '100', 'pitch': '48', 'volume': '15'}}, 'braille': {'noBraille': {}, 'freedomScientific': {}}, 'vision': {'NVDAHighlighter': {'highlightFocus': 'False', 'highlightNavigator': 'False', 'highlightBrowseMode': 'False', 'enabled': 'False'}, 'screenCurtain': {}}, 'keyboard': {'useCapsLockAsNVDAModifierKey': 'True', 'speakTypedCharacters': 'False'}, 'reviewCursor': {'followCaret': 'False', 'followFocus': 'False', 'simpleReviewMode': 'False'}, 'UIA': {'selectiveEventRegistration': 'True'}, 'speechViewer': {'showSpeechViewerAtStartup': 'False', 'x': '150', 'y': '150', 'width': '500', 'height': '500', 'displays': ['(1366, 768)'], 'autoPositionWindow': 'False'}, 'presentation': {'reportDynamicContentChanges': 'True'}, 'debugLog': {'MSAA': 'False'}, 'virtualBuffers': {'autoPassThroughOnCaretMove': 'True', 'autoSayAllOnPageLoad': 'False', 'autoFocusFocusableElements': 'True'}, 'documentFormatting': {'autoLanguageSwitching': 'False'}, 'featureFlag': {'cancelExpiredFocusSpeech': '0'}, 'unicorn': {}, 'mouse': {'enableMouseTracking': 'True'}}
ERROR - config.ConfigManager._initBaseConf (17:19:43.321) - MainThread (6540):
Error loading base configuration
Traceback (most recent call last):
  File "config\__init__.py", line 398, in _initBaseConf
    profile = self._loadConfig(fn) # a blank config returned if fn does not exist
  File "config\__init__.py", line 432, in _loadConfig
    raise e
  File "config\__init__.py", line 428, in _loadConfig
    profileUpgrader.upgrade(profile, self.validator, writeProfileFunc)
  File "config\profileUpgrader.py", line 25, in upgrade
    _doValidation(deepcopy(profile), validator) # copy the profile, since validating mutates the object
  File "config\profileUpgrader.py", line 66, in _doValidation
    raise ValueError(errorString)
ValueError: Unable to validate config file after upgrade: Key symbolLevel : the value "SYMLVL.MOST" is of the wrong type.
Full result: (value of false means the key was not present)
[(['brailleViewer'], 'displays', False), (['brailleViewer'], 'x', False), (['brailleViewer'], 'y', False), (['speech'], 'symbolLevel', VdtTypeError('the value "SYMLVL.MOST" is of the wrong type.'))]
INFO - config.ConfigManager._loadConfig (17:19:43.336) - MainThread (6540):
Loading config: None


I've intentionally posted a little bit more than just the error to show how my config file looked like before failed validation attempt.

Expected behavior:

NVDA does not consider the config to be invalid and uses the newly set symbol level.

System configuration

NVDA installed/portable/running from source:

From source and installed.

NVDA version:

Latest master as of July 9-th.

Windows version:

From sources on Windows 7 as an installed copy on Windows 11 preview.

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

None

Other information about your system:

None relevant.

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.

Introduced by #11856

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

I have no add-ons in my source copy

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

Not tried

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions