hterm: last line disappears depending on zoom level |
|||||||
Issue descriptionCHROMEOS_RELEASE_DESCRIPTION: 8350.55.0 (Official Build) beta-channel What steps will reproduce the problem? 1. ssh into your corp machine 2. type seq 1000 a few times: scrolling through lots of text triggers this. 3. Last terminal line is lost, see screenshot, then should be a "drinkcat@drinkcat:~$" on the last line. What is the expected result? Last line is not lost. What happens instead of that? Can't use the terminal, need to restart hterm. Please provide any additional information below. Attach a screenshot if possible. From internal thread: drinkcat@: I think there is something weird happening with the (now) default resolution 1536x864 and scaling. Changing back the resolution to 1920x1080 fixes the problem. (All at 100% zoom) - Using 1920x1080 + 125%/150% zoom also triggers the issue. Or 1536x864 + 110%. - 1920x1080 +110% is fine. So is 1536x864 + 90%/75%/125%. Feels like some rounding error... I tried the dev version as well (0.8.34.2), same issue. --- rginda@: The browser zoom function in chrome causes problems for hterm. As a result, hterm is only known to work at 100% browser zoom. At other zoom levels it will depend on the font, window size, and operating system. --- abodenha@: The new device scale model fixes a lot of really serious issues. It's unfortunate that hterm can't deal with it. --- oshima@: *In theory*, web app should work with any zooming (because apps can't tell zoom level), and if it doesn't, it's a bug. Can I take a look at the code that does not work with zooming? -- abodenha@: It's probably somewhere in the hterm.ScrollPort.prototype.measureCharacterSize function which attempts to measure the size of a character. Or it could be in syncRowNodesDimensions_ which determines the number of text rows/columns that should be visible.
,
Sep 9 2016
This is happening even when I minimize my browser/CrOSH window on lulu and even without tweaking any zoom settings. I tried the default as well as higher/lower resolutions- I hit this problem sooner or later. My work requires to cat large chunks of data from /var/log/messages, so this is a bit annoying, having to hit Ctrl-L after each command. Maybe I should edit my bashrc to append a clear to each command or something?
,
Sep 9 2016
Re#3: Press Ctrl+- will show you that last hidden line.
,
Sep 9 2016
There seems to be a rounding error in hterm.ScrollPort.prototype.getTopRowIndex() [1]. This function always returns (the correct top row index - 1) when the bug is reproduced. Who owns this code? [1]: https://cs.corp.google.com/webstore/crx/d/djddabimpcicofmjnlkahgbbpfigocpn/js/nassh_deps.concat.js?type=cs&q=f:+nassh_deps&l=10101
,
Sep 10 2016
Best to avoid posting links to internal repos in public bugs.
,
Sep 10 2016
#6: https://chromium.googlesource.com/apps/libapps/+blame/HEAD/hterm/js/hterm_scrollport.js#1178 Last changed here, precisely to try fixing this sort of zoom issue: https://chromium.googlesource.com/apps/libapps/+/f4e90e86bec06b124eaf4a0c01ea924cdc7f49a4%5E%21/hterm/js/hterm_scrollport.js wilford/rginda?
,
Sep 10 2016
I think it just needs to compute the height of character using multiple lines like it does for width.
,
Sep 10 2016
I fixed it locally as Oshima suggested by calculating the character height. I can send a CL.
,
Sep 10 2016
hterm/nassh/libapps is all public code. internal links are irrelevant.
,
Sep 14 2016
The following revision refers to this bug: https://chromium.googlesource.com/apps/libapps/+/7354202ec171287e200ec075c40e34784005fa97 commit 7354202ec171287e200ec075c40e34784005fa97 Author: Ahmed Fakhry <afakhry@google.com> Date: Wed Sep 14 00:18:48 2016 Fix hterm's last line disappearing depending on the zoom level We need to average the height of the character the same way we average the width to avoid rounding errors. BUG= chromium:633924 TEST=mkdeps.sh, mkzip.sh --nopromote and then load it on the device and try seq 1000 several times. The last line shouldn't disappear Change-Id: I0d0dfe749a6e02f8023e2709c7222446d6e136e0 Reviewed-on: https://chromium-review.googlesource.com/385075 Reviewed-by: Rob Ginda <rginda@chromium.org> Tested-by: Rob Ginda <rginda@chromium.org> [modify] https://crrev.com/7354202ec171287e200ec075c40e34784005fa97/hterm/js/hterm_scrollport.js
,
Sep 14 2016
What do we need to do in order to release a new version for Hterm using the fix in #12 to be part of ChromeOS? Or does that happen automatically?
,
Sep 14 2016
rob or i will take care of it. we need to do one anyways for the breakage in canary builds.
,
Sep 15 2016
this seems to be breaking horizontal cursor position tracking i have a 1599x899 pixel window which is 204x58. when writing a long line, the cursor slowly falls out of sync. see attached screenshots -- the cursor should have been to the right of the "f" in every one, but it drifted.
,
Sep 15 2016
that is SecureShell (beta) 0.8.34.3
,
Sep 15 2016
In order to get this into the default version of crosh that ships as part of the ChromeOS image, you'll have to update crosh. See https://chromium.googlesource.com/chromiumos/platform/assets/+/master/chromeapps/crosh_builtin/
,
Sep 15 2016
Re#15: Do you mean the change in #12 broke the cursor tracking?
,
Sep 15 2016
i'm fairly certain that is the case. 0.8.34.2 works. the only changes in 0.8.34.3 are: bf85c3b1f30696dca576bfdcb285ca11055876e5: hterm: disable ligatures 15ed49071379e51ae47d929134366eb156a6943a: copySelectionToClipboard fixes. 7354202ec171287e200ec075c40e34784005fa97: Fix hterm's last line disappearing depending on the zoom level b976c0b956121d3e10934dea16d61417b6b17f1d: hterm: fix order of parameters to postMessage seems highly unlikely any of the other commits caused this.
,
Sep 15 2016
I'll take a look at what happened. I think I have an idea where the problem is.
,
Sep 15 2016
i've verified that reverting your CL fixes the drift i'd like to post a new dev version by thur evening, so if you can't fix by then, i'll have to revert. i'm not saying this as a threat, i just don't have a choice. there's a bug where SecureShell doesn't work in M54+ and we need to get that fix out by monday which means we need a version in testing before that. you can always reland.
,
Sep 15 2016
I've just uploaded a fix.
,
Sep 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/apps/libapps/+/ccbc9ba0f0015da2b545dfb1751496eeeb92a5f6 commit ccbc9ba0f0015da2b545dfb1751496eeeb92a5f6 Author: Ahmed Fakhry <afakhry@google.com> Date: Thu Sep 15 16:04:24 2016 Fix hterm horizontal cursor position tracking A regression caused by https://chromium-review.googlesource.com/#/c/385075/3 that resulted in another round error causing the horizontal cursor position to be wrong when filling the line with characters. This CL fixes the problem. BUG= chromium:633924 TEST=mkdeps.sh, mkzip.sh --nopromote, load it on device, and type until the line wraps around. Cursor position should remain correct. Change-Id: Idfc51a1eddf0ef53949822498ac57c89d51d5d7f Reviewed-on: https://chromium-review.googlesource.com/385916 Reviewed-by: Rob Ginda <rginda@chromium.org> Tested-by: Rob Ginda <rginda@chromium.org> [modify] https://crrev.com/ccbc9ba0f0015da2b545dfb1751496eeeb92a5f6/hterm/js/hterm_scrollport.js
,
Sep 20 2016
I noticed crosh hasn't been updated yet. Should I go ahead and do that?
,
Sep 20 2016
no need ... i have CLs in flight to rework how crosh is integrated into builds
,
Sep 20 2016
Awesome. Thanks!
,
Sep 20 2016
i opened issue 648422 for that if you want to follow along. once the CQ starts working again we can start landing things. then CrOS ToT will follow ToT crosh/hterm automatically.
,
Sep 28 2016
,
Jan 24 2017
Verified on Chrome OS 9202.1.0, 57.0.2987.6 |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by vapier@chromium.org
, Sep 8 2016