Skip to content

Conversation

@feerrenrut
Copy link
Contributor

See issue: #6127

Triggered assertion (when toggling caps lock) results in the following log output:

IO - inputCore.InputManager.executeGesture (04:49:53):
Input: kb(laptop):capsLock
DEBUGWARNING - WX Widgets (04:49:53):
..\..\src\common\timerimpl.cpp, line 60:
assert wxThread::IsMain(): timer can only be started from the main thread
Stack trace:
  File "C:\Python27\lib\threading.py", line 774, in __bootstrap
    self.__bootstrap_inner()
  File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "winInputHook.py", line 70, in hookThreadFunc
    while windll.user32.GetMessageW(byref(msg),None,0,0):
  File "winInputHook.py", line 45, in keyboardHook
    if not keyDownCallback(kbd.vkCode,kbd.scanCode,bool(kbd.flags&LLKHF_EXTENDED),bool(kbd.flags&LLKHF_INJECTED)):
  File "keyboardHandler.py", line 147, in internal_keyDownEvent
    inputCore.manager.executeGesture(gesture)
  File "inputCore.py", line 439, in executeGesture
    gesture.reportExtra()
  File "keyboardHandler.py", line 428, in reportExtra
    wx.CallLater(30, self._reportToggleKey)
  File "C:\work\nvda\miscDeps\python\wx\_core.py", line 16802, in __init__
    self.Start()
  File "C:\work\nvda\miscDeps\python\wx\_core.py", line 16816, in Start
    self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
  File "C:\work\nvda\miscDeps\python\wx\_misc.py", line 1324, in Start
    return _misc_.Timer_Start(*args, **kwargs)
  File "core.py", line 213, in OnAssert
    log.debugWarning(message,codepath="WX Widgets",stack_info=True)

Replacing wx.CallLater with core.callLater in keyboardHandler.KeyboardInputGesture.reportExtra runs cleanly. I exercised this code path by toggling caps-lock.

@feerrenrut
Copy link
Contributor Author

Hi @michaelDCurran please take a look at this when you have the chance.

michaelDCurran added a commit that referenced this pull request Aug 19, 2016
@feerrenrut feerrenrut merged commit d73b28e into master Sep 5, 2016
@nvaccessAuto nvaccessAuto added this to the 2016.4 milestone Sep 5, 2016
feerrenrut added a commit that referenced this pull request Sep 5, 2016
Fixed an issue causing a warning in the NVDA log file when caps-lock is toggled. (#6127)
@feerrenrut feerrenrut deleted the i6127-fixCapsLockToggleAssertion branch January 17, 2020 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants