
Repro:
- open demo in browser
- call
term.dispose()
The culprit seems to be the disposal of the webgl addon:
|
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);
}));
Repro:
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
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: