-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
Use a single APC and completion routine #14924
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@MarcoZehe Could you please give this try build a spin? |
@LeonarddeR Obtained it and am currently running it off the installer, without installing it first. Should that be enough, or does it need elevated privileges somewhere to test this properly? |
I don't think elevated privileges are necessary for your test case. |
I used this build without crashes today. Let's mark it ready for review. |
This comment was marked as off-topic.
This comment was marked as off-topic.
FWIW, I can definitely also confirm that this PR fixes the problem. With a regular alpha build, and working in Firefox or Thunderbird, especially in text fields, I get these crashes several times per day, sometimes even several per hour. With the try build, none of those. This definitely takes care of the issue I was having. |
Also agree! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @LeonarddeR , the approach generally looks good to me, I have some concerns in regards to API backwards compatibility.
Fixup of #14924 Summary of the issue: In #14627, we introduced weak references for APCs called as part of a waitable timer. In #14924, this was made more robust by using a single internal APC func. However in the porting process, a part of the logic was reversed, therefore in the internal APC store, we still stored strong rather than weak references. Description of user facing changes None. Description of development approach Store references instead of functions in the apc store.
Link to issue number:
Related to #14899, #14312, #14627
Fixes #14895
Summary of the issue:
Despite several attempts to fix this, NVDA's IoThread can crash without a clear cause.
Description of user facing changes
Less crashes, most likely, as tests indicate that this is the case.
Description of development approach
As proposed by @jcsteh , rather than creating a new function pointer for every APC or completion routine call, use a single internal APC and completion routine and use an internal cache to store the python functions, not the actual APC functions.
Testing strategy:
Steps to reproduce from #14895.
Known issues with pull request:
None known
Change log entries:
Deprecations:
Code Review Checklist: