QT Applications are not accessible until I restart NVDA


Ravi Pinapaka
 

Hi Lukas,

I tried with VirtualBox 6.1.26 but I was more concerned about the program I created as I started to learn GUI development and was considering using Qt as the framework.

Good news - I managed to fix the issue. I examined the debug logs for both situations where it was accessible as well as not accessible. Looks like NVDA was processing the application events but not speaking the result when I started the app with NVDA turned on.

The fix was a simple one: I went to NVDA Settings > Advanced > checked the "Enable selective registration for UI Automation events and property changes" checkbox. It immediately started working and all controls in the app were accessible.

Here is what the NVDA user guide says about that option for your reference:
"This option changes how NVDA registers for events fired by the Microsoft UI Automation accessibility API. When this option is disabled, NVDA registers for many UIA events that are processed and discarded within NVDA itself. This has a major negative impact on performance, especially in applications like Microsoft Visual Studio. Therefore, when this option is enabled, NVDA will limit event registration to the system focus for most events. If you suffer from performance issues in one or more applications, We recommend you to try this functionality to see whether performance improves."

Thanks for trying to help. Appreciate it a lot :)

Best regards,
Ravi


Lukasz Golonka
 

On Mon, 09 Aug 2021 03:17:29 -0700
"Ravi Pinapaka" <psvkravi@gmail.com> wrote:

I tried with VirtualBox, Qt Online Installer and a small sample program that I wrote myself.
What version of Virtual Box have you tried?

ERROR - NVDAObjects.behaviors.LiveText._monitor (10:13:17.490) - EnhancedLegacyWinConsole._monitorThread (1628):
Error getting initial text
Traceback (most recent call last):
File "NVDAObjects\behaviors.pyc", line 310, in _monitor
File "NVDAObjects\window\winConsole.pyc", line 66, in _getText
File "winConsoleHandler.pyc", line 127, in getConsoleVisibleLines
File "wincon.pyc", line 77, in GetConsoleScreenBufferInfo
OSError: [WinError 6] The handle is invalid.
This is certainly not causing QT apps to become inaccessible.
Have you tried with all add-ons disabled?


--
Regards
Lukasz


Ravi Pinapaka
 

I tried with VirtualBox, Qt Online Installer and a small sample program that I wrote myself.

I recently reinstalled my operating system and now this issue occurs only half the time. Other times, it's immediately accessible. I got an error in the NVDA log. The full log is as follows:

INFO - __main__ (10:12:39.729) - MainThread (6212):
Starting NVDA version 2021.1
INFO - core.main (10:12:39.847) - MainThread (6212):
Config dir: C:\Users\psvkr\AppData\Roaming\nvda
INFO - config.ConfigManager._loadConfig (10:12:39.847) - MainThread (6212):
Loading config: C:\Users\psvkr\AppData\Roaming\nvda\nvda.ini
INFO - core.main (10:12:40.161) - MainThread (6212):
Windows version: Windows 10 21H1 (10.0.19043) workstation
INFO - core.main (10:12:40.161) - MainThread (6212):
Using Python version 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:01:55) [MSC v.1900 32 bit (Intel)]
INFO - core.main (10:12:40.161) - MainThread (6212):
Using comtypes version 1.1.8
INFO - core.main (10:12:40.161) - MainThread (6212):
Using configobj version 5.1.0 with validate version 1.0.1
INFO - synthDriverHandler.setSynth (10:12:40.621) - MainThread (6212):
Loaded synthDriver oneCore
INFO - core.main (10:12:40.621) - MainThread (6212):
Using wx version 4.1.1 msw (phoenix) wxWidgets 3.1.5 with six version 1.16.0
INFO - brailleInput.initialize (10:12:40.621) - MainThread (6212):
Braille input initialized
INFO - braille.initialize (10:12:40.626) - MainThread (6212):
Using liblouis version 3.17.0
INFO - braille.initialize (10:12:40.626) - MainThread (6212):
Using pySerial version 3.5
INFO - braille.BrailleHandler.setDisplayByName (10:12:40.632) - MainThread (6212):
Loaded braille display driver noBraille, current display has 0 cells.
INFO - core.main (10:12:40.881) - MainThread (6212):
Java Access Bridge support initialized
INFO - _UIAHandler.UIAHandler.MTAThreadFunc (10:12:40.966) - _UIAHandler.UIAHandler.MTAThread (10544):
UIAutomation: IUIAutomation6
INFO - core.main (10:12:41.251) - MainThread (6212):
NVDA initialized
INFO - speechDictHandler.dictFormatUpgrade._doSynthVoiceDictBackupAndMove (10:12:52.306) - MainThread (6212):
Upgrading voice dictionaries for ibmeci
INFO - synthDriverHandler.setSynth (10:12:52.311) - MainThread (6212):
Loaded synthDriver ibmeci
ERROR - NVDAObjects.behaviors.LiveText._monitor (10:13:17.490) - EnhancedLegacyWinConsole._monitorThread (1628):
Error getting initial text
Traceback (most recent call last):
  File "NVDAObjects\behaviors.pyc", line 310, in _monitor
  File "NVDAObjects\window\winConsole.pyc", line 66, in _getText
  File "winConsoleHandler.pyc", line 127, in getConsoleVisibleLines
  File "wincon.pyc", line 77, in GetConsoleScreenBufferInfo
OSError: [WinError 6] The handle is invalid.
 


Lukasz Golonka
 

On Thu, 5 Aug 2021 22:41:11 +0530
"Ravi Pinapaka" <psvkravi@gmail.com> wrote:

Hi,

Applications that are built using the QT GUI framework are not accessible
until I restart NVDA.
Cannot reproduce here. Apps I've tried are VirtualBox, MikTeX console
and XAMPP. With what software are you experiencing this exactly?

--
Regards
Lukasz


Ravi Pinapaka
 

Hi,

Applications that are built using the QT GUI framework are not accessible until I restart NVDA.

Here's what's happening step-by-step:
1. I opened a QT application. Application is not accessible.
2. I restart NVDA. Application is now accessible.
3. I closed and reopened the application. Not accessible again until I restart NVDA again.

I've checked with multiple QT applications and all of them have this issue. There's nothing in the log either after "NVDA Initialized". Pretty sure it's an NVDA issue as it's working after restarting NVDA and Jaws is working without any issues at all.

Does anyone know what's causing this and how to fix it?

Thanks,
Ravi