Skip to content

Update nvda_dmp to possibly address an autoread hang#11998

Merged
michaelDCurran merged 2 commits into
nvaccess:masterfrom
codeofdusk:update-dmp-20210111
Jan 11, 2021
Merged

Update nvda_dmp to possibly address an autoread hang#11998
michaelDCurran merged 2 commits into
nvaccess:masterfrom
codeofdusk:update-dmp-20210111

Conversation

@codeofdusk

Copy link
Copy Markdown
Contributor

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:

  • This PR definitely improves behaviour for me, but should be merged ASAP to allow for testing on master.

Change log entry:

None needed.

@codeofdusk

Copy link
Copy Markdown
Contributor Author

Cc @feerrenrut, @Neurrone.

@michaelDCurran michaelDCurran merged commit 04858db into nvaccess:master Jan 11, 2021
@nvaccessAuto nvaccessAuto added this to the 2021.1 milestone Jan 11, 2021
@codeofdusk codeofdusk deleted the update-dmp-20210111 branch January 11, 2021 23:36
@feerrenrut

Copy link
Copy Markdown
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.

@feerrenrut

Copy link
Copy Markdown
Contributor

So for instance after line 80 DiffMatchPatch._proc.stdin.write(new)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants