New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 648845 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug

Blocking:
issue 633924



Sign in to add a comment

hterm: Bottom line of display gets stuck below the viewing pane

Reported by stewart....@gmail.com, Sep 21 2016

Issue description

The bottom line of the hterm display intermittently (say about 50% of the time) gets stuck below the viewing pane. 

This what I expect to see: notFaulty.png (attached)
But sometimes I see this instead: Faulty.png (attached)

Problem started happening yesterday with hterm 0.8.34.4.
Problem goes away if I remove custom font (which has been working well for over a year).  http://levien.com/type/myfonts/Inconsolata.otf
Problem randomly flips on/off, say every 10 or 20 commands/seconds.
You can type commands (blindly) on the hidden line and the input is accepted. 


Chrome Version:    53.0.2785.116
OS Version:        6.1 (Windows 7, Windows Server 2008 R2)
UserAgentString:   Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36

Regards
-Stew





 
notFaulty.png
18.1 KB View Download
Faulty.png
23.8 KB View Download
Just to clarify that "remove custom font" means changing the value for font-family in the settings for hterm, from this:
   "Inconsolata","Everson Mono", FreeMono, "Menlo", "Terminal", monospace
to this (which is/was the default value): 
   "Everson Mono", FreeMono, "Menlo", "Terminal", monospace

Comment 2 by vapier@chromium.org, Sep 28 2016

Blocking: 633924
Cc: afakhry@google.com
Components: Platform>Apps>Default>Hterm
repros for me, Linux Version 54.0.2840.59 (64-bit)
Also w/ Inconsolata

A Math.round(rulerSize.height / numberOfLines) appears to help this issue.

But Inconsolate rendering is still deteriorated (gap lines visible between rows of solids, e.g. cacademo).

No problems afaict on hterm 1.58, thus[ hterm.ScrollPort.prototype.measureCharacterSize is prime suspect.
Labels: TE-NeedsTriageHelp
afakhry@ - Could you please provide any update on this issue.

Thanks...!!
Cc: -afakhry@google.com vapier@chromium.org mschilder@google.com
Owner: afakhry@chromium.org
Can you provide exact steps to repro? I haven't seen this issue repro for me at all since  bug 633924  was fixed.
Exact steps to reproduce on Windows 7:
1) Install chrome browser
2) Install app 'Secure Shell' from the chrome web store
   Version: 0.8.34.4
   Updated: September 19, 2016
3) Windows Control Panel > Fonts > install font 'Inconsolata' (url in orig post)
4) Secure Shell > options > font-family > Prepend existing value with '"Inconsolata", '
5) Start secure shell and connect to a host
6) At the command line prompt, hit lots of 'enter' to get to the bottom of the viewing pane
7) Start entering dummy commands Eg '1', '2', '3', etc.  
7) Within about 10-20 comands, the prompt dissappears below viewing pane. See attached screenshot faulty-B.png
8) Within another 10-20 dummy commands, the prompt line reappears at bottom of viewing pane where it belongs.  See attached screenshot notFaulty-B.png

HTH
-Stew

faulty-B.png
7.0 KB View Download
notFaulty-B.png
7.5 KB View Download
Sorry I should mentioned the versions of Chrome where it is reproducible on Win7
  Version 53.0.2785.143 m
  Version 54.0.2840.59 m
-Stew

Cc: rginda@chromium.org
Status: Started (was: Unconfirmed)
Able to repro as described in comment #6 on Secure Shell version 0.8.34.4. I'll work on a fix.
Cc: osh...@chromium.org wilford@google.com
Labels: -TE-NeedsTriageHelp OS-Linux OS-Mac
Here's my analysis. I believe the issue is the use of lib.f.smartFloorDivide() to calculate the topRowIndex. smartFloorDivide() favors flooring unless the difference is very small (< 0.0001)! This results in the case of the "Inconsolata" font to have the visible area shifted one row above.

Using Math.round() in:

topRowIndex = Math.round(this.screen_.scrollTop / this.characterSize.height);

fixes the issue for the "Inconsolata" font and still works with the default font.

+wilford@ who introduced lib.f.smartFloorDivide().
Since have the same problem.
Here is my setting,a default setting without any change.
Font Family :DejaVu Sans Mono", "Everson Mono", FreeMono, "Menlo", "Terminal", monospace
Font-size :16
Font-soomthing :antialiased

Did this Font like Inconsolata also cause problem?

I found that almost always favoring to floor the topRowIndex is the root cause of the issue. It leads to the problem showing for some fonts and renderer zooms.

I'll upload a fix.
Project Member

Comment 13 by bugdroid1@chromium.org, Oct 31 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/apps/libapps/+/6cec52ab8e442a4ec35c16907187f4e1a21a286f

commit 6cec52ab8e442a4ec35c16907187f4e1a21a286f
Author: Ahmed Fakhry <afakhry@google.com>
Date: Fri Oct 28 18:01:46 2016

Fix Hterm's last line sometimes disappearing for some fonts and zooms

We used to almost always prefer to floor the value of the topRowIndex
using lib.f.smartFloorDivide(). This round error didn't work in all cases
for some fonts and some zooms ('Ctrl' + '+'/'-'). It led to the index of
the top visible row being one-too-few, hence hiding the last row.

BUG= chromium:648845 
TEST=mkdeps.sh, mkzip.sh --nopromote, load it on Linux Chrome, add
the font to "Inconsolata" (must be installed first) from the options
page, type 'seq 10000' several times, try differnt zooms and sizes.
The last row must never be hidden.

Change-Id: I557ecbb6029ec1c55b067b2bce04d9378349c661
Reviewed-on: https://chromium-review.googlesource.com/404990
Reviewed-by: Rob Ginda <rginda@chromium.org>
Tested-by: Rob Ginda <rginda@chromium.org>

[modify] https://crrev.com/6cec52ab8e442a4ec35c16907187f4e1a21a286f/hterm/js/hterm_scrollport.js

Status: Fixed (was: Started)

Sign in to add a comment