-
Notifications
You must be signed in to change notification settings - Fork 1.8k
TypeError: Cannot read properties of undefined (reading '31') #4545
Copy link
Copy link
Closed
Labels
Milestone
Description
Details
- Browser and browser version: VSCode
- OS version: Ubuntu 23.04
- xterm.js version: 5.2.0-beta.35
Steps to reproduce
I'm not quite sure of any consistent reproduction steps, but
- I was using the VSCode terminal as usual
- noticed high cpu load and then
- opened devtools and saw this error (~250 times)
workbench.js:2699 [uncaught exception]: TypeError: Cannot read properties of undefined (reading '31')
workbench.js:2702 TypeError: Cannot read properties of undefined (reading '31')
at g._setCellUnderline (DomRenderer.ts:388:33)
at g._handleLinkLeave (DomRenderer.ts:384:10)
at DomRenderer.ts:82:66
at t.EventEmitter.fire (EventEmitter.ts:55:16)
at c._fireUnderlineEvent (Linkifier2.ts:368:13)
at c._linkLeave (Linkifier2.ts:375:14)
at c._clearCurrentLink (Linkifier2.ts:263:12)
at c._handleHover (Linkifier2.ts:115:12)
at c._handleMouseMove (Linkifier2.ts:106:12)
Additional Information
VSCode issue: microsoft/vscode#184255
XTermjs code:
xterm.js/src/browser/renderer/dom/DomRenderer.ts
Lines 395 to 397 in 118915c
| private _setCellUnderline(x: number, x2: number, y: number, y2: number, cols: number, enabled: boolean): void { | |
| x = this._cellToRowElements[y][x]; | |
| x2 = this._cellToRowElements[y2][x2]; |
There might be an edge case in this code when y or y2 is larger than _cellToRowElements.length, then a TypeError is thrown. Another possibility could be that for some reason y or y2 is NaN . But it's still unclear to me why/when this would happen.
Reactions are currently unavailable