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

Calling nvdacontrollerclient32.dll freezes NVDA #3450

Closed
nvaccessAuto opened this issue Aug 19, 2013 · 9 comments
Closed

Calling nvdacontrollerclient32.dll freezes NVDA #3450

nvaccessAuto opened this issue Aug 19, 2013 · 9 comments

Comments

@nvaccessAuto
Copy link

Reported by grego on 2013-08-19 04:55
In my talking map application I'm extensively using nvdacontrollerclient32.dll to generate speaking messages for users. Nearly each user move is announced by speaking message so it can be thousands of calls per hour.
Everything works very well, but sometimes Nvda freezes, and no speech is generated since it happens until restarting NVDA.
I wrote a test program which generated 10 thousands of messages one by one, but it didn't crash the NVDA. Problem is hard to reproduce (there is no any known batch of things to do for generate this error), but it happens nearly always, after less than an hour... I tried to downgrade Nvda to last version 2012.3, but the problem existed there too.
Operating system is Win7 64 bit, and my application which uses NvdaControllerClient is 32-bit.

@nvaccessAuto
Copy link
Author

Attachment nvda.log added by grego on 2013-08-19 04:58
Description:
I'm attaching nvda.log documenting described behaviour, it starts at 22:42:12

@nvaccessAuto
Copy link
Author

Comment 2 by jteh on 2013-08-19 05:09
Please do the following:

  1. Restart NVDA.
  2. Set your NVDA log level to input/outpu (NVDA menu -> Preferences -> General settings).
  3. Reproduce the problem.
  4. Wait at least 20 seconds.
  5. Restart NVDA.
  6. Open %temp%\nvda-old.log and look for entries containing the text "Core frozen in stack". Provide those entries in your reply. Failing that, provide the last few entries from the log.

@nvaccessAuto
Copy link
Author

Comment 4 by grego (in reply to comment 2) on 2013-08-19 14:48
I did proposed steps, and following is the fragment from log...
It's maybe worth mentioning, that restarting NVDA is not possible until i close the client application which used nvdaControllerClient32.dll, but application itself responds normally on keys (I know it because of sound generated by program after arrow keypress.). Shortly after closing app, NVDA restarts normally.

log fragment

(i translated polish messages spoken by NVDA to English for better readability):
IO - inputCore.InputManager.executeGesture (16:23:51):
Input: kb(desktop):upArrow
IO - inputCore.InputManager.executeGesture (16:23:51):
Input: kb(desktop):upArrow
IO - inputCore.InputManager.executeGesture (16:23:51):
Input: kb(desktop):rightArrow
IO - speech.speak (16:23:51):
Speaking [- inputCore.InputManager.executeGesture (16:23:52):
Input: kb(desktop):enter
IO - speech.speak (16:23:52):
Speaking [u'unavailable'](u'railway']
IO)
IO - inputCore.InputManager.executeGesture (16:23:52):
Input: kb(desktop):enter
IO - inputCore.InputManager.executeGesture (16:23:52):
Input: kb(desktop):rightArrow
DEBUGWARNING - watchdog.watcher (16:23:53):
Trying to recover from freeze, core stack:
File "nvda.pyw", line 157, in
File "core.pyo", line 307, in main
File "wx_core.pyo", line 8010, in MainLoop
File "wx_core.pyo", line 7306, in MainLoop
File "core.pyo", line 284, in Notify
File "queueHandler.pyo", line 76, in pumpAll
File "queueHandler.pyo", line 47, in flushQueue
File "eventHandler.pyo", line 54, in queueEventCallback
File "eventHandler.pyo", line 131, in executeEvent
File "eventHandler.pyo", line 155, in doPreGainFocus
File "eventHandler.pyo", line 136, in executeEvent
File "eventHandler.pyo", line 84, in init
File "eventHandler.pyo", line 91, in next
File "NVDAObjects__init
.pyo", line 841, in event_foreground
File "speech.pyo", line 101, in cancelSpeech
File "synthDrivers\espeak.pyo", line 83, in cancel
File "synthDrivers_espeak.pyo", line 200, in stop
File "nvwave.pyo", line 225, in stop
File "threading.pyo", line 127, in acquire

WARNING - watchdog.watcher (16:24:08):
Core frozen in stack:
File "nvda.pyw", line 157, in
File "core.pyo", line 307, in main
File "wx_core.pyo", line 8010, in MainLoop
File "wx_core.pyo", line 7306, in MainLoop
File "core.pyo", line 284, in Notify
File "queueHandler.pyo", line 76, in pumpAll
File "queueHandler.pyo", line 47, in flushQueue
File "eventHandler.pyo", line 54, in queueEventCallback
File "eventHandler.pyo", line 131, in executeEvent
File "eventHandler.pyo", line 155, in doPreGainFocus
File "eventHandler.pyo", line 136, in executeEvent
File "eventHandler.pyo", line 84, in init
File "eventHandler.pyo", line 91, in next
File "NVDAObjects__init
.pyo", line 841, in event_foreground
File "speech.pyo", line 101, in cancelSpeech
File "synthDrivers\espeak.pyo", line 83, in cancel
File "synthDrivers_espeak.pyo", line 200, in stop
File "nvwave.pyo", line 225, in stop
File "threading.pyo", line 127, in acquire

WARNING - watchdog.watcher (16:24:23):
Core frozen in stack:
File "nvda.pyw", line 157, in
File "core.pyo", line 307, in main
File "wx_core.pyo", line 8010, in MainLoop
File "wx_core.pyo", line 7306, in MainLoop
File "core.pyo", line 284, in Notify
File "queueHandler.pyo", line 76, in pumpAll
File "queueHandler.pyo", line 47, in flushQueue
File "eventHandler.pyo", line 54, in queueEventCallback
File "eventHandler.pyo", line 131, in executeEvent
File "eventHandler.pyo", line 155, in doPreGainFocus
File "eventHandler.pyo", line 136, in executeEvent
File "eventHandler.pyo", line 84, in init
File "eventHandler.pyo", line 91, in next
File "NVDAObjects__init
.pyo", line 841, in event_foreground
File "speech.pyo", line 101, in cancelSpeech
File "synthDrivers\espeak.pyo", line 83, in cancel
File "synthDrivers_espeak.pyo", line 200, in stop
File "nvwave.pyo", line 225, in stop
File "threading.pyo", line 127, in acquire

DEBUGWARNING - synthDrivers._espeak.callback (16:24:27):
Error feeding audio to nvWave
Traceback (most recent call last):
File "synthDrivers_espeak.pyo", line 137, in callback
File "nvwave.pyo", line 164, in feed
File "nvwave.pyo", line 146, in open
File "nvwave.pyo", line 84, in _winmm_errcheck
WindowsError: 1 Undefined external error.
IO - speech.speak (16:24:27):
Speaking [- speech.speak (16:24:27):
Speaking [u'Edit box'](u'dialog']
IO)
IO - speech.speak (16:24:27):
Speaking [u'empty']
DEBUGWARNING - watchdog.watcher (16:24:28):
Trying to recover from freeze, core stack:
File "nvda.pyw", line 157, in
File "core.pyo", line 307, in main
File "wx_core.pyo", line 8010, in MainLoop
File "wx_core.pyo", line 7306, in MainLoop
File "core.pyo", line 284, in Notify
File "queueHandler.pyo", line 76, in pumpAll
File "queueHandler.pyo", line 47, in flushQueue
File "eventHandler.pyo", line 54, in queueEventCallback
File "eventHandler.pyo", line 136, in executeEvent
File "eventHandler.pyo", line 84, in init
File "eventHandler.pyo", line 91, in next
File "NVDAObjects\IAccessible__init
.pyo", line 1281, in event_caret
File "NVDAObjects\window\edit.pyo", line 794, in event_caret
File "api.pyo", line 252, in processPendingEvents
File "queueHandler.pyo", line 47, in flushQueue
File "speech.pyo", line 101, in cancelSpeech
File "synthDrivers\espeak.pyo", line 83, in cancel
File "synthDrivers_espeak.pyo", line 200, in stop
File "nvwave.pyo", line 225, in stop
File "threading.pyo", line 127, in acquire

@nvaccessAuto
Copy link
Author

Comment 5 by jteh on 2013-08-19 23:14
I see two freezes here. Did you notice the first one? I assume the second is the one that never returns?

It looks like this is an audio issue. I suspect it is an audio driver problem related to playing multiple simultaneous audio streams. I can't get enough info to be certain, but it looks like Windows blocks for quite a long time when we try to open the audio device and eventually throws an error. If that's the case, there's probably nothing we can do about it. The only way to test this theory is to disable sound in the application or disable speech in NVDA and just use braille.

@nvaccessAuto
Copy link
Author

Comment 6 by grego (in reply to comment 5) on 2013-08-22 08:35
Unfortunately, from user point of view I noticed only one freeze, simply in some moment of using the application, Nvda stops responding, although application itself works well, and sound is produced.
I understand, that the problem may be related to this particular sound card, and even more - on two identical computers with identical versions of the audio driver one is not affected by this problem, and an other is.
But maybe something could be done about handling such NVDA freezes in general, I mean that when program detects freeze it could possibly kill the frozen thread and restart it, or even simply close whole NVDA letting user restart it manually - as I mentioned, now NVDA can not be restarted until closing the client application, which probably means losing some work done in it.
It could be helpfull in other freezes situation too, but I guess if it could work in described way, it would be implemented already...

@nvaccessAuto
Copy link
Author

Comment 7 by jteh (in reply to comment 6) on 2013-08-22 10:45
Replying to grego:

But maybe something could be done about handling such NVDA freezes in general, I mean that when program detects freeze it could possibly kill the frozen thread and restart it,

You can't simply kill threads like this, not safely anyway.

or even simply close whole NVDA letting user restart it manually - as I mentioned, now NVDA can not be restarted until closing the client application

Pressing NVDA+control+n forceably kills the old copy of NVDA after 5 seconds. If this isn't working, that suggests Windows won't let us kill the old one or the new one can't start.

@bhavyashah
Copy link

CC @jcsteh

@Adriani90
Copy link
Collaborator

@grego is this still an issue for you?

@Adriani90
Copy link
Collaborator

We do not have an update from the initial author since more than 5 years. Unfortunately we are relying on tests from the initial author because this issue is very specific and cannot be reproduced reliably. I am closing this for now, but feel free to comment on it if you can reproduce it. We can reopen the discussion afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants