Update nvda_dmp to possibly address an autoread hang#11998
Merged
Conversation
Contributor
Author
|
Cc @feerrenrut, @Neurrone. |
michaelDCurran
approved these changes
Jan 11, 2021
Contributor
|
From https://stackoverflow.com/a/54063928 I expected that at each "synchronization boundary" between NVDA and the DMP process there should be a call to flush, in both processes. Eg if this code is sending some data and waiting for DMP to read it and respond, there should be a flush of std-out before the read. Otherwise you could end up with the DMP process waiting on extra data from NVDA, and NVDA waiting on data from DMP, therefore a deadlock. |
Contributor
|
So for instance after line 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Possible resolution for #11992.
Summary of the issue:
Currently, nvda_dmp sends the number of Unicode characters in the response header, then sends utf-8 encoded data. NVDA expects the header to contain the number of bytes, resulting in the diff hanging when the number of characters is fewer than the number of bytes.
Description of how this pull request fixes the issue:
nvda_dmp now sends the number of bytes (not characters) in the response header.
Testing performed:
I can no longer reproduce the hang described in #11992 and #11639 (comment) (I previously thought it was an issue with locking until further testing revealed this bug).
Known issues with pull request:
Change log entry:
None needed.