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

Uncaught Error: write data discarded, use flow control to avoid losing data #263

Open
jsun-sun opened this issue Feb 24, 2020 · 4 comments

Comments

@jsun-sun
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.44.0 x64
Electron: 4.2.7
OS: Mac OS X 10.15.3
Thrown From: ink package 0.12.2

Stack Trace

Uncaught Error: write data discarded, use flow control to avoid losing data

At /Users/JoanneSun/.atom/packages/ink/node_modules/xterm/lib/xterm.js:1

Error: write data discarded, use flow control to avoid losing data
    at e.write (/packages/ink/node_modules/xterm/lib/xterm.js:1:264459)
    at t.write (/packages/ink/node_modules/xterm/lib/xterm.js:1:86835)
    at e.write (/packages/ink/node_modules/xterm/lib/xterm.js:1:54799)
    at /packages/ink/lib/console/console.js:227:46)
    at PipeSocket.emit (events.js:187:15)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:260:13)
    at PipeSocket.Readable.push (_stream_readable.js:219:10)
    at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

Commands

     -9:11.6.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused)
     -6:28.7.0 julia-client:run-block (input.hidden-input)
     -6:28.7.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused.hyperclick)
  2x -5:56.8.0 core:backspace (input.hidden-input)
     -5:53.5.0 julia-client:run-block (input.hidden-input)
     -5:53.5.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused)
     -5:52 julia-client:run-block (input.hidden-input)
     -5:52 autocomplete-plus:cancel (atom-text-editor.editor.is-focused)
     -5:51.1.0 core:move-down (input.hidden-input)
     -5:50.6.0 julia-client:run-block (input.hidden-input)
     -5:50.6.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused)
     -5:32 julia-client:run-block (input.hidden-input)
     -5:32 autocomplete-plus:cancel (atom-text-editor.editor.is-focused)
     -5:31.4.0 core:move-down (input.hidden-input)
     -5:24.5.0 julia-client:run-block (input.hidden-input)
     -5:24.5.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused)

Non-Core Packages

hyperclick 0.1.5 
indent-detective 0.4.0 
ink 0.12.2 
julia-client 0.12.2 
language-julia 0.19.2 
language-weave 0.6.7 
latex 0.50.2 
latex-completions 0.3.6 
tool-bar 1.2.0 
uber-juno 0.3.0 
@pfitzseb
Copy link
Member

Why did you close the issue?

@jsun-sun
Copy link
Author

jsun-sun commented Feb 24, 2020 via email

@pfitzseb pfitzseb reopened this Feb 24, 2020
@pfitzseb
Copy link
Member

Ah, good to know. I'll reopen the issue since it seems like we could handle this more gracefully.

@jerch
Copy link

jerch commented Mar 18, 2020

Some background on this - the error is actually a safety measure by xterm.js to avoid OOM. This would happen, if xterm.js gets more than 50MB in the write buffer pending, which should never be the case (xterm.js gets unusable much earlier).
To avoid it, plz see https://xtermjs.org/docs/guides/flowcontrol/ on how to implement flow control. Sadly we cannot blueprint this in a general way, as it needs backend preparations.

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

No branches or pull requests

3 participants