xterm.js: TypeError: Cannot read property '_data' of undefined
While resizing the terminal smaller, the following exception occurs. It’s not clear exactly how to reproduce. I cat the content of a file and then resize the terminal to a small size:
Uncaught TypeError: Cannot read property '_data' of undefined
at BufferLine.copyCellsFrom (xterm.js:887)
at Buffer._reflowSmaller (xterm.js:468)
at Buffer._reflow (xterm.js:388)
at Buffer.resize (xterm.js:370)
at BufferSet.resize (xterm.js:1140)
at Terminal.resize (xterm.js:5078)
at Terminal.resize (xterm.js:6615)
at resize (kubebox.js:1351)
at Item.run (kubebox.js:52341)
at drainQueue (kubebox.js:52311)
Details
- Browser and browser version: Chrome 69
- OS version: Mac OS X
- xterm.js version: 3.11.0
Steps to reproduce
- Resize the terminal smaller
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 18 (10 by maintainers)
Commits related to this issue
- hard downgrade xterm.js to 3.10, since 3.11 is badly broken due to https://github.com/xtermjs/xterm.js/pull/1864; we will wait until that messed is sorted out before ever upgrading xterm.js again: see... — committed to sagemathinc/cocalc by williamstein 5 years ago
- Fix reflow smaller case related to ended \t chars Part of #1932 — committed to Tyriar/xterm.js by Tyriar 5 years ago
- Fix reflow larger case Fixes #1932 — committed to Tyriar/xterm.js by Tyriar 5 years ago
- Fix reflow smaller case related to ended \t chars Part of #1932 — committed to microsoft/xterm.js by Tyriar 5 years ago
- Fix reflow larger case Fixes #1932 — committed to microsoft/xterm.js by Tyriar 5 years ago
- Fix reflow smaller case related to ended \t chars Part of #1932 — committed to Tyriar/xterm.js by Tyriar 5 years ago
- Fix reflow larger case Fixes #1932 — committed to Tyriar/xterm.js by Tyriar 5 years ago
- Merge pull request #2010 from Tyriar/3.12.1_1932_reflow Fix #1932 reflow issue in 3.12.1 — committed to xtermjs/xterm.js by Tyriar 5 years ago
I released 3.12.1 that includes just this fix https://github.com/xtermjs/xterm.js/releases/tag/3.12.1, beta for 3.13.0 coming soon so
I confirm #2002 fixes the issue.
We are hitting something like that in Theia as well: https://github.com/theia-ide/theia/pull/4680#issuecomment-476090542
I can reproduce it with running
top -c
and resizing the terminal widget.Hi @Tyriar,
After doing more tests, we found that this bug occurs when resizing cuts off
tab
symbol.e.g. Seting cols to 8 and echo
a\tb
, then resizing cols to 7.– origin –
I found a way to reproduce this bug.
After cloning the repo and installing all dependencies, I run the demo page by
yarn start
.The following c code is the program I had executed in above gif.