-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
type/bugSomething is misbehavingSomething is misbehaving
Milestone
Description
Repro:
- open demo in browser
- call
term.dispose()
The culprit seems to be the disposal of the webgl addon:
xterm.js/addons/addon-webgl/src/WebglAddon.ts
Lines 90 to 94 in 9186c72
| this._register(toDisposable(() => { | |
| const renderService: IRenderService = (this._terminal as any)._core._renderService; | |
| renderService.setRenderer((this._terminal as any)._core._createRenderer()); | |
| renderService.handleResize(terminal.cols, terminal.rows); | |
| })); |
Those lines recreate & attach a DOM renderer instance, which fails, if we are in the middle of terminal disposal. Imho it can be fixed by:
this._register(toDisposable(() => {
if ((this._terminal as any)._core._store._isDisposed) {
return;
}
const renderService: IRenderService = (this._terminal as any)._core._renderService;
renderService.setRenderer((this._terminal as any)._core._createRenderer());
renderService.handleResize(terminal.cols, terminal.rows);
}));Metadata
Metadata
Assignees
Labels
type/bugSomething is misbehavingSomething is misbehaving
