-
-
Notifications
You must be signed in to change notification settings - Fork 679
Fixup of #13542: Do not call IA2 install and uninstall code from NVDA itself #15517
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
Conversation
…rom NVDA itself
3c41455
to
120f637
Compare
@LeonarddeR Can you further elaborate on your statement: "The calls in NVDA core were actually obsolete, as IA2 support is registered by injection_initialize and injection_terminate."? |
This was indeed my assumption.
A, I wasn't aware of that. Turns out we need to test that thoroughly. What would be the best way to test this? Probably a Windows 8.1 VM or similar, then ensure an IA2 application is started and NVDA's gui doesn't receive events (i.e. don't open the NVDA menu)? |
Yep, that testing sounds sufficient to me.
I think you are right to remove the call from nvdaHelper.py as it can't
be called from C. In fact, providing it with an argument causes a write
error. Though I think that is more to do with space for the large return
type in c++.
But, if testing shows on 8.1 that IA2 is not functioning, then I think
you'd need to call it from injection_initialize, or outprocThreadFunc,
within c++.
Or write a c-friendly wrapper for it and again call it from nvdaHelper.py.
|
I'm not sure whether testing this is worth the investment. I created #15517 to fix this, i.e. the state is now back to what it was before on the public side of NVDAHelper. Better safe than sorry. |
Yep, looks good.
|
Replaces #15517 Summary of the issue: It was pointed out by @michaelDCurran in #15517 (comment) that proxy registration in NVDA's main thread is essential. Description of user facing changes Probably nothing noticeable. Description of development approach Rename installIA2Support and uninstallIA2Support to installIA2SupportForThread and uninstallIA2SupportForTrhead, respectively. Introduce new installIA2Support and uninstallIA2Support wrappers that install/uninstall for the current thread. Also restored installation/uninstallation in NVDAHelper.py
This was reported by @codeofdusk as part of his work for the Py 3.11 upgrade.
Link to issue number:
Fixup of #13542
Summary of the issue:
In #13542, we introduced support for multi thread IA2 initialization. As part of that, the signature of the install- and uninstallIA2Support functions were changed. Somehow, it was an oversight from my end that these functions were also called from NVDAHelper.py. This causes:
As per point 2, given the risk of NVDA calling a code path that results in undefined behavior and possible segfaults, I strongly recommend to merge this into beta.
Description of user facing changes
No crashes during NVDA startup.
Description of development approach
Removed the calls from NVDAHelper.py and no longer export the functions from NVDAHelper. The calls in NVDA core were actually obsolete, as IA2 support is registered by injection_initialize and injection_terminate. Note that the install and uninstall IA2 functions aren't called in de 64 bit loader of NVDAHelper, yet IA2 works as expected in X64 applications. Also, installIA2Support is no longer C friendly anyway. Note that an add-on author should never call these functions, therefore I don't consider this as an API breaking change.
Testing strategy:
Known issues with pull request:
None known
Code Review Checklist: