vscode
vscode copied to clipboard
resizing terminal stretches text somtimes
We have written the needed data into your clipboard because it was too large to send. Please paste.
Type: Bug
sometimes when resizing some panes have text super large & distorted, other panes do not have the issue.
VS Code version: Code - Insiders 1.71.0-insider (Universal) (b0895f9fcc5b49587a2b187a92bbe6d7efae35fa, 2022-08-08T05:19:27.279Z) OS version: Darwin x64 21.6.0 Modes: Sandboxed: Yes
System Info
Item | Value |
---|---|
CPUs | Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
Load (avg) | 5, 4, 3 |
Memory (System) | 32.00GB (4.36GB free) |
Process Argv | --crash-reporter-id 4f6f994d-06c3-4289-b6cd-8f17e07dfe06 |
Screen Reader | no |
VM | 0% |
Extensions (6)
Extension | Author (truncated) | Version |
---|---|---|
vscode-eslint | dba | 2.2.6 |
prettier-vscode | esb | 9.5.0 |
vscode-jest-runner | fir | 0.4.48 |
vscode-graphql | Gra | 0.7.1 |
vscode-graphql-syntax | Gra | 1.0.4 |
angular-console | nrw | 17.19.1 |
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256197
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
cmake_vspar411cf:30542925
vsaa593cf:30376535
pythonvs932:30404738
wslgetstarted:30449409
vscscmwlcmt:30465136
cppdebug:30492333
pylanb8912:30522163
vsclangdf:30492506
c4g48928:30535728
dsvsc012cf:30540253

Same problem here (but horizontally) and for me scrolling in the pane with stretched/squashed text doesn't work anymore. I can still move the scrollbar, but nothing happens.
This may be fixed with the fix for https://github.com/microsoft/vscode/issues/157444
Steps to repro and the error we've been seeing in the console described here https://github.com/microsoft/vscode/issues/158468
Don't think it's fixed as I've seen the error in the console in insiders
The error from https://github.com/microsoft/vscode/issues/158468
Uncaught TypeError: Cannot read properties of undefined (reading 'ext')
at e._loadColorsForCell (WebglRenderer.ts:404:95)
at e._updateModel (WebglRenderer.ts:351:14)
at e.renderRows (WebglRenderer.ts:298:10)
at t._renderRows (RenderService.ts:124:20)
at e._renderCallback (RenderService.ts:64:70)
at e._innerRefresh (RenderDebouncer.ts:72:10)
at RenderDebouncer.ts:51:68
Related: https://github.com/microsoft/vscode/issues/157715
I wonder if this is related to the resize observer occurring for a previous canvas update but it not firing for the current change when resizes occur in quick succession? https://github.com/xtermjs/xterm.js/blob/c0ef2ccb5a0b2f22f28ed594f3962d75cc83da00/src/browser/renderer/DevicePixelObserver.ts#L9
Example:
- Canvas is changed to to 5x10, resize observer is queued
- Canvas is changed to 10x10, resize observer does not get queued for some reason?
- Resize observer is fired for 5x10 only?
Just stumbled over this in the final 1.71 release. Like @LeanderD said, this also breaks scrolling in terminal.
Consistently gets this error. It seems it occurs when outpout in a bash terminal window is larger than the current window, e.g. I can replicate it by running a "npm outdated" command that has a wide and long output. Window content including characters will then crudely be zoomed in/out when terminal window is resized, and not re-rendered as it used to be before 1.71
Scrolling does not work, and will eventually make the output disappear totally, leaving the terminal window in an unusable state (kill is the only option out)
+1 I am able to reproduce this every time and it is quite annoyin
Same issue for me:
Same here on 1.71.0
Anyone seeing this could you provide you window.zoomLevel
setting and what the output is when you open developer tools (help menu), go to console and run window.devicePixelRatio
?
Anyone seeing this could you provide you window.zoomLevel setting and what the output is when you open developer tools (help menu), go to console and run window.devicePixelRatio?
Zoom level normal, window.devicePixelRatio=1
I also noticed that I keep getting the following error in VS Code Dev tools:
WebglRenderer.ts:404 Uncaught TypeError: Cannot read properties of undefined (reading 'ext') at e._loadColorsForCell (WebglRenderer.ts:404:95) at e._updateModel (WebglRenderer.ts:351:14) at e.renderRows (WebglRenderer.ts:298:10) at t._renderRows (RenderService.ts:124:20) at e._renderCallback (RenderService.ts:64:70) at e._innerRefresh (RenderDebouncer.ts:72:10) at RenderDebouncer.ts:51:68
Thanks @gkn and @dmitri-suvorov-sumup, that's useful
A workaround until this bug is fixed, is to disable WebGL in settings, e.g.: "terminal.integrated.gpuAcceleration": "canvas"
Looks like all reports are on macOS
Hey @Tyriar, I'm having the same issue on Fedora 36 running on Gnome. I can include more details if needed. The solution posted by @gkn did work for me as a temp workaround.
@brauliolledo thanks for letting me know
Recording showing the issue: https://github.com/microsoft/vscode/issues/160508#issuecomment-1241796756
I've tried and tried, can't reproduce. Will dig into the code and make a defensive change for the thrown exception if I can't find the problem.
This is probably where undefined slips in: https://github.com/xtermjs/xterm.js/blob/f9db65c52e4702cf906c14cda1c640342a7b6dca/src/common/buffer/BufferLine.ts#L183-L185
Can reproduce 🎉 it's an issue with extended attributes (ie. underline style and color) conflicting with line reflow:
- Open bash on macOS or Linux
- Run
ls -la
to fill viewport - Run
echo -e '\x1b[4:1masnmdnasdkjlanmlsdkmnalskdmnlaksdmnlaksdmnlaksdlaksdmlkasmdlas\x1b[0m'
- Reduce the size of the window, errors appear in the console
Repro may be easier in split panes
Upstream issue: https://github.com/xtermjs/xterm.js/issues/4108
Seems like @Tyriar has found the issue now but for the record, I get this error on VS Code running on Windows 10 with WSL2 Ubuntu 20.
I'm seeing similar behavior to the described issue using the latest VSCode on macOS:
This is new, only occurring in the past few weeks.
Same story here: The issue is happening to me on the latest versions of Visual Studio Code and macOS. It seems like turning off GPU rendering for the terminal works for the time being, while the issue is being fixed…
Pretty sure we gotta wait till https://github.com/microsoft/vscode/commit/b24fefc5403ae8152db6d79eb80333f77e199a6f makes it into one of the release tags and an update published.
Same story here: The issue is happening to me on the latest versions of Visual Studio Code and macOS. It seems like turning off GPU rendering for the terminal works for the time being, while the issue is being fixed…
@leafac what's the setting for that please?
edit:
...
"terminal.integrated.gpuAcceleration": "off"
...