Exception in thread braille._BgThread


Teijo
 

As correction: there may be difference in error frequency depending on how I/O operations are done.


Exception handling would be useful. Is there any plans to implement it? If nobody is not about to do it, I could try.


Teijo kirjoitti 26.5.2022 klo 7.53:

Hello,


I have been writing driver for Caiku Albatross displays.


Occasionally I'm getting following errors. They may vary as to OSError but here are some examples:


ERROR - stderr (13:30:43.141) - braille._BgThread (10096):
Exception in thread braille._BgThread:
Traceback (most recent call last):
  File "C:\Users\teijo\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "C:\Users\teijo\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\src\nvda\source\braille.py", line 2297, in func
    ctypes.windll.kernel32.SleepEx(winKernel.INFINITE, True)
OSError: [WinError -1073741795]

ERROR - stderr (23:43:02.697) - braille._BgThread (3388):
Exception in thread braille._BgThread:
Traceback (most recent call last):
  File "C:\Users\teijo\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "C:\Users\teijo\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\src\nvda\source\braille.py", line 2297, in func
    ctypes.windll.kernel32.SleepEx(winKernel.INFINITE, True)
OSError: [WinError -1072365548] Windows Error 0xc0150014

ERROR - stderr (13:41:50.805) - braille._BgThread (8764):
Exception in thread braille._BgThread:
Traceback (most recent call last):
  File "C:\Users\teijo\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "C:\Users\teijo\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\src\nvda\source\braille.py", line 2297, in func
    ctypes.windll.kernel32.SleepEx(winKernel.INFINITE, True)
OSError: exception: privileged instruction

ERROR - stderr (14:02:13.782) - braille._BgThread (3256):
Exception in thread braille._BgThread:
Traceback (most recent call last):
  File "C:\Users\teijo\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "C:\Users\teijo\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\src\nvda\source\braille.py", line 2297, in func
    ctypes.windll.kernel32.SleepEx(winKernel.INFINITE, True)
OSError: exception: access violation reading 0xFFFFFFFF

ERROR - stderr (14:05:11.614) - braille._BgThread (12964):
Exception in thread braille._BgThread:
Traceback (most recent call last):
  File "C:\Users\teijo\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "C:\Users\teijo\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\src\nvda\source\braille.py", line 2297, in func
    ctypes.windll.kernel32.SleepEx(winKernel.INFINITE, True)
OSError: exception: access violation writing 0xB8D09824


Errors occur occasionally very shortly after starting NVDA. I think they are not specific to given driver development version.


What should I think about these errors? Have they something to do for example with automatic detection of display?


Best regards,


Teijo