Re: Workaround fix - NVDA starts after logon even when this is disabled (Win 10 1903)


Luke Davis
 

On Wed, 21 Aug 2019, Joseph Lee wrote:

One route for resource leaks is import side-effects – while importing an add-on, the add-on code may load something that is volatile such as a resource
online. Once the add-on closes unexpectedly (and without a terminate method being defined), the add-on would not release the resource cleanly.
I think that is understood. What I believe is less understood, is how this is particularly different from the user exiting NVDA at this same stage--wouldn't the same resources still be allocated, and the same (potential) problem result? As he pointed out, he is doing a rather late exit.

Here is what I believe to be the most reasonable answer to that question.
This process is intended for users who would not otherwise be running NVDA. Ideally, NVDA wouldn't start at all for them. But now because of this windows bug, it is starting for them. So we have add-ons which they would never normally have run, because they wouldn't run NVDA in the first place, doing things (who knows what), prior to the exit being triggered. So resources could be allocated as described, and if those aren't released in a termination method, the situation is identical for the NVDA user calling exit, or the scratchpad script exiting NVDA. But in the case of the NVDA user, it may not matter as much, because he presumably knows he is running those add-ons, and already knows (or isn't effected by), those resource leaks. The primary audience for this script, however, knows nothing of those leaky add-ons, and now they are (briefly) active on his account.

I do wonder how many (community supported) add-ons actually have such resource leaks that are not otherwise cleaned up on NVDA exit.

As for this being an add-on: I advise holding off on that, as things might change in 20H1 that could make this unnecessary.
Just for clarity, I was suggesting that he roll it as an add-on for internal use, not for distribution. However, realizing how late the exit he is calling is, that was a pointless suggestion, and I retract it.

Luke

Join nvda-addons@nvda-addons.groups.io to automatically receive all group messages.