-
-
Notifications
You must be signed in to change notification settings - Fork 690
NVDA freezes briefly with WASAPI enabled and receives AttributeError: 'NoneType' object has no attribute 'feed' #15311
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
Comments
Hi,
I can see this even without addons installed, and it is random.
From: Rowen ***@***.***>
Sent: Friday, August 18, 2023 1:21 PM
To: nvaccess/nvda ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [nvaccess/nvda] NVDA freezes briefly with WASAPI enabled and receives AttributeError: 'NoneType' object has no attribute 'feed' (Issue #15311)
cc @jcsteh <https://github.com/jcsteh> Maybe you can take a look at this Issue.
Steps to reproduce:
This issue may require a specific add-on to reproduce, but I've confirmed that it can only be reproduced with WASAPI enabled.
1. Install ClipBoardEnhancement add-on <https://github.com/cary-rowen/clipboardEnhancement/releases/download/v2.7.1/clipboardEnhancement-2.7.1.nvda-addon> .
2. Please press Ctrl+C copy a file to the system clipboard at will.
3. Press Ctrl+Numpad7/Numpad9.
* Laptop: NVDA+Alt+UpArrow/DownArrow
* The function of this gesture is to report the name and path of the file in the clipboard.
* nvwave.playWaveFile is called in the process.
4. Repeat step (3) repeatedly.
5. When performing steps (3) and (4), you can feel that NVDA freezes briefly, and you can find some errors in the log.
Actual behavior:
Found the following in the NVDA log:
IO - inputCore.InputManager.executeGesture (18:54:14.232) - winInputHook (8472):
Input: kb(laptop):alt+NVDA+downArrow
ERROR - stderr (18:54:16.126) - nvwave.playWaveFile(FileInClipboard.wav) (9880):
Exception in thread nvwave.playWaveFile(FileInClipboard.wav):
Traceback (most recent call last):
File "threading.pyc", line 926, in _bootstrap_inner
File "threading.pyc", line 870, in run
File "nvwave.pyc", line 710, in play
AttributeError: 'NoneType' object has no attribute 'feed'
Expected behavior:
NVDA should not brief freezes without 'AttributeError'.
NVDA logs, crash dumps and other attachments:
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
alpha-28879,a7981cad
Windows version:
Windows 10 22H2 (AMD64) build 19045.3324
Name and version of other software in use when reproducing the issue:
None
Other information about your system:
None
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.
nvda-2023.2Beta3 can also reproduce this as long as WASAPI is enabled.
If NVDA add-ons are disabled, is your problem still occurring?
No
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes
—
Reply to this email directly, view it on GitHub <#15311> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACVCDE5BOSZEWVTPBBF25K3XV5F3HANCNFSM6AAAAAA3VMJQ3A> .
You are receiving this because you are subscribed to this thread. <https://github.com/notifications/beacon/ACVCDE6TKRXS2BYEUVN4NKTXV5F3HA5CNFSM6AAAAAA3VMJQ3CWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHG5KF2ZI.gif> Message ID: ***@***.*** ***@***.***> >
|
"AttributeError: 'NoneType' object has no attribute 'feed'" I've also observed this error with other add-ons that use |
cc @jcsteh - @cary-rowen, this may be fixed in the next alpha build (building soon) |
I suspect this is a different issue, but it'll be interesting to see. I don't really understand how WASAPI could be causing this. |
If this can't be reproduced with add-ons disabled with the latest alpha, we can probably close the issue |
To clarify my previous comment, it looks like fileWavePlayer becomes None. fileWavePlayer is set up the same way regardless of whether it's WASAPI or not. Exceptions can certainly occur within WASAPI, but nothing in the WASAPI code can clear references to the actual instance altogether. |
I tested the latest alpha-29021 and it can be reproduced. |
This is the only issue I can see so far that might or not be related to Wasapi. This should not prevent Wasapi from becomming the default in 2023.3. as of now using Wasapi is the default only in alpha channel right? |
WASAPI will be default in the 2023.3beta1 and is current default in alpha. It is not default in 2023.2. We consider fixing this issue a "nice to have" for 2023.3 |
This issue is still reproduceable. |
ERROR - stderr (12:01:44.523) - MainThread (13532): |
As far as I can tell, there is no difference in playWaveFile with WASAPI enabled other than maybe timing. There is no alternative code path for playWaveFile or anything like that. My guess is that this was always possible, but timing meant that it didn't occur in practice with WinMM. |
Does the add-on play sounds from a background thread? I guess that might cause weirdness, but again, that's not unique to WASAPI. |
Ah. Is it possible there are some earlier exceptions in the log? I think the key part might be the weakref KeyError part, rather than the AttributeError part. The weakref part is specific to WASAPI, but I don't know how we're getting into that state. |
Aha. It seems to be due to playing multiple sounds rapidly. You can reproduce it intermittently with this Python console snippet:
|
It is not depended to the addon. It happens even with addons disabled.
…On 10/25/23, James Teh ***@***.***> wrote:
Aha. It intermittently seems to be due to playing multiple sounds rapidly.
You can reproduce it with this Python console snippet:
`import nvwave; nvwave.playWaveFile("waves/browseMode.wav");
nvwave.playWaveFile("waves/browseMode.wav");
nvwave.playWaveFile("waves/browseMode.wav")`
--
Reply to this email directly or view it on GitHub:
#15311 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
--
with best regards Beqa Gozalishvili
Tell: +995593454005
Email: ***@***.***
Web: https://gozaltech.org
Skype: beqabeqa473
Telegram: https://t.me/gozaltech
facebook: https://facebook.com/gozaltech
twitter: https://twitter.com/beqabeqa473
Instagram: https://instagram.com/beqa.gozalishvili
|
…d on the previous thread. (#15681) Fixes #15311. Summary of the issue: When multiple wave files are played asynchronously in rapid succession without any delay between the calls, NVDA can freeze briefly and throw exceptions such as "AttributeError: 'NoneType' object has no attribute 'feed'". Description of user facing changes NVDA no longer sometimes freezes briefly when multiple sounds are played in rapid succession. Description of development approach Previously, playWaveFile reassigned fileWavePlayer before waiting for the previous thread to complete. If the previous thread was still cleaning up, it might set fileWavePlayer to None after this new assignment. This meant that fileWavePlayer would be None when the new thread tried to run. Instead, fileWavePlayer is now reassigned after waiting for the previous thread to complete. In addition, the inner play() function now catches and logs exceptions that occur while trying to play. This would have made this problem a little easier to debug and should make related problems easier to debug in future.
cc @jcsteh Maybe you can take a look at this Issue.
Steps to reproduce:
This issue may require a specific add-on to reproduce, but I've confirmed that it can only be reproduced with WASAPI enabled.
nvwave.playWaveFile
is called in the process.Actual behavior:
Found the following in the NVDA log:
Expected behavior:
NVDA should not brief freezes without 'AttributeError'.
NVDA logs, crash dumps and other attachments:
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
alpha-28879,a7981cad
Windows version:
Windows 10 22H2 (AMD64) build 19045.3324
Name and version of other software in use when reproducing the issue:
None
Other information about your system:
None
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.
nvda-2023.2Beta3 can also reproduce this as long as WASAPI is enabled.
If NVDA add-ons are disabled, is your problem still occurring?
No
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes
The text was updated successfully, but these errors were encountered: