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

Prevent freezes on every focus change if Firefox stops responding. #7818

Merged
merged 1 commit into from Dec 20, 2017

Conversation

@jcsteh
Copy link
Contributor

commented Dec 4, 2017

Link to issue number:

None.

Summary of the issue:

If Firefox (or Chrome or any other app based on these) stopped responding, NVDA often freezes every time the focused changes, even if the browser is in the background. In the case of a freeze or crash, this makes it very difficult to recover from this situation. This also makes it extremely difficult for a developer to debug Firefox or Chrome, since debugging necessarily suspends the process.

Description of how this pull request fixes the issue:

This occurred because NVDA queried the document on every focus change to see if it was alive, but that query blocked in the case of an unresponsive process.

Now, we don't query if the process is in the background. We just assume the document is alive in this case. The chances of a document dying while the browser is in the backgroud are low anyway. However, if this did occur, the buffer will still be killed once the browser comes to the foreground or gets exited.

Testing performed:

  1. Used browse mode in a document in Firefox, then broke into the process with a debugger. Confirmed that NVDA did not freeze when I moved the focus.
  2. Confirmed that buffers are still destroyed when closing tabs or exiting Firefox.

Known issues with pull request:

None.

Change log entry:

Bug Fixes:

- NVDA no longer sometimes freezes on every focus change if Firefox or Chrome have stopped responding such as due to a freeze or crash. (#7818)
Prevent freezes on every focus change if Firefox stops responding.
Previously, if Firefox (or Chrome or any other app based on these) stopped responding, NVDA would often freeze every time the focused changed, even if the browser was in the background.
This occurred because NVDA queried the document on every focus change to see if it was alive, but that query blocked in the case of an unresponsive process.

Now, we don't query if the process is in the background.
We just assume the document is alive in this case.
The chances of a document dying while the browser is in the backgroud are low anyway.
However, if this did occur, the buffer will still be killed once the browser comes to the foreground or gets exited.

@jcsteh jcsteh added the quick fix label Dec 4, 2017

@jcsteh jcsteh requested a review from michaelDCurran Dec 4, 2017

michaelDCurran added a commit that referenced this pull request Dec 4, 2017

@michaelDCurran michaelDCurran merged commit b4ee771 into nvaccess:master Dec 20, 2017

@nvaccessAuto nvaccessAuto added this to the 2018.1 milestone Dec 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.