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 TypeError: Cannot read property 'copyCellsFrom' of undefined #145

Closed
ywanHK opened this issue Aug 24, 2020 · 10 comments
Closed

Uncaught TypeError: Cannot read property 'copyCellsFrom' of undefined #145

ywanHK opened this issue Aug 24, 2020 · 10 comments
Labels
bug report 🐛 When something isn't working unable to duplicate !! When the issue cannot be duplicated

Comments

@ywanHK
Copy link

ywanHK commented Aug 24, 2020

[Enter steps to reproduce:]

  1. open terminal in the right dock
  2. make the dock as narrow as possible
  3. clear the console by typing "clear" (MSYS2 command)
  4. resize the dock (first making it wider and then narrower)

Atom: 1.50.0 x64
Electron: 5.0.13
OS: Windows 10
Thrown From: x-terminal package 9.1.1

Stack Trace

Uncaught TypeError: Cannot read property 'copyCellsFrom' of undefined

At C:\Users\Lenovo\.atom\packages\x-terminal\node_modules\xterm\lib\xterm.js:1

TypeError: Cannot read property 'copyCellsFrom' of undefined
    at e._reflowSmaller (/packages/x-terminal/node_modules/xterm/lib/xterm.js:1:269077)
    at e._reflow (/packages/x-terminal/node_modules/xterm/lib/xterm.js:1:267570)
    at e.resize (/packages/x-terminal/node_modules/xterm/lib/xterm.js:1:267189)
    at t.resize (/packages/x-terminal/node_modules/xterm/lib/xterm.js:1:263460)
    at r.resize (/packages/x-terminal/node_modules/xterm/lib/xterm.js:1:261400)
    at t.resize (/packages/x-terminal/node_modules/xterm/lib/xterm.js:1:253139)
    at t.resize (/packages/x-terminal/node_modules/xterm/lib/xterm.js:1:127968)
    at e.resize (/packages/x-terminal/node_modules/xterm/lib/xterm.js:1:98529)
    at e.fit (/packages/x-terminal/node_modules/xterm-addon-fit/lib/xterm-addon-fit.js:1:1723)
    at HTMLElement.refitTerminal (/packages/x-terminal/src/element.js:692:18)
    at /packages/x-terminal/src/element.js:95:10)

Commands

  2x -0:26.5.0 x-terminal:open (ul.list-inline.tab-bar.inset-panel)

Non-Core Packages

x-terminal 9.1.1 
@ywanHK ywanHK changed the title Uncaught TypeError: Cannot read property 'copyCellsFrom' of undefined [BR] Uncaught TypeError: Cannot read property 'copyCellsFrom' of undefined Aug 24, 2020
@ywanHK ywanHK changed the title [BR] Uncaught TypeError: Cannot read property 'copyCellsFrom' of undefined Uncaught TypeError: Cannot read property 'copyCellsFrom' of undefined Aug 24, 2020
@UziTech
Copy link
Member

UziTech commented Aug 24, 2020

x-terminal

I am not able to reproduce this. Can you show the error happening. It seems this is an issue with xterm trying to resize when it shouldn't but I can't seem to make this happen.

@UziTech UziTech added bug report 🐛 When something isn't working unable to duplicate !! When the issue cannot be duplicated labels Aug 24, 2020
@the-j0k3r
Copy link
Member

the-j0k3r commented Aug 25, 2020

In my experience the error is garbage and meaningless, If I were you, I would remove x-terminal by hand from %userprofile%\.atom\packages and reinstall it via command line.

Next time you have upgrades for x-terminal, make sure that you have x-terminal not in use (check the task manager processes and kill all terminals, powershell, bash etc)), because if x-terminal is active, the upgrade is botched by APM and you likely will see this error and other errors as a consequence if not actually a totally broken install which errors out saying it failed to load the package (the install dir will be half empty or mostly empty).

In any case, unrelated a bit, electron 6.x Atom will be making its way out the doors soon which should take care of a few electron bugs that cause further instability.

I also cannot duplicate this.

generic

@the-j0k3r
Copy link
Member

on another unrelated note, I dislike the fact that Atom stack traces such as this prompt users to open an issue that doesn't contain half of the needed information, like OS version/type for one. It be great if packages could bypass this.

@ywanHK
Copy link
Author

ywanHK commented Aug 25, 2020

It seems that WebGL Renderer has a bug in it

If I disable it, the error doesn't show anymore

@the-j0k3r
Copy link
Member

AH webgl, have it disabled will try with it enabled.

However my previous reply applies, stacktrace errors like this are a dime a dozen and none point to the right direction.

@UziTech
Copy link
Member

UziTech commented Aug 25, 2020

I have WebGL enabled in my gif. The error looks like it is coming from https://github.com/xtermjs/xterm.js/blob/106d74caa270bcee61e87895b3c2a6536b04a803/src/common/buffer/Buffer.ts#L370 after x-terminal calls refitTerminal

@UziTech
Copy link
Member

UziTech commented Aug 25, 2020

WebGL is still listed as an experimental addon. Maybe we should put a note in the settings about this?

@the-j0k3r
Copy link
Member

the-j0k3r commented Aug 25, 2020

Something in

description: 'Enable the WebGL-based renderer using the xterm.js [WebGL addon](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-webgl)',

Enable the experimental WebGL-based renderer using the xterm.js [WebGL addon](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-webgl)

Just added experimental word, its already disabled by default so tbh thers not much else to add here, ppl generally dont read docs or what settings say, so adding more verbose description wont do much for anything.

@UziTech
Copy link
Member

UziTech commented Aug 25, 2020

I created #149 to add the note

@UziTech
Copy link
Member

UziTech commented Oct 7, 2020

I'm going to close this as it is not reproducible and disabling WebGL seemed to fix it.

@UziTech UziTech closed this as completed Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🐛 When something isn't working unable to duplicate !! When the issue cannot be duplicated
Development

No branches or pull requests

3 participants