Loss of lines when resizing and creating tab

Bug #378361 reported by Ken Arnold
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-terminal (Fedora)
Fix Released
Medium
gnome-terminal (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-terminal

Steps to reproduce:
1. Open a new terminal.
2. seq 1 500
3. Go full-screen (F11)
4. Make a new tab (Ctrl-Shift-T)
5. Go back to normal (F11)
6. Switch back to the first tab.

Expected result:
...
498
499
500
prompt.

Actual result:
...
461
462
prompt.

Lines 463-500 are lost forever -- they're not in the scrollback buffer, missing from a copy-paste, etc.

Full screen is just the most drastic; the problem occurs whenever you increase the terminal size. The critical factor seems to be creating a new tab. This might be the same as https://bugzilla.redhat.com/show_bug.cgi?id=466897

And perhaps https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/172604 was valid after all.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: openafs nvidia
Package: gnome-terminal 2.26.0-0ubuntu2
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-terminal
Uname: Linux 2.6.28-11-generic i686

Revision history for this message
In , Mads (mads-redhat-bugs) wrote :

Description of problem:
When tab headers are shown in maximized window then the 2nd and 3rd lines from the bottom are hidden.

Version-Release number of selected component (if applicable):
gnome-terminal-2.24.0-2.fc10.i386

Steps to Reproduce:
1. start gnome-terminal and maximize
2. run for example "seq 100" and write your name without hitting enter and memorize the topmost and last lines
3. start new tab with shift-ctrl-tab
4. back to tab 1 with alt-1

Actual results:
5. notice how the top and bottom lines have been preserved even though the available area has shrinked - but in the example the lines 99 and 100 have disappeared

Expected results:
The window should threat the introduction of tabs as a resize and scroll the topmost lines out of view.

Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Revision history for this message
In , Mads (mads-redhat-bugs) wrote :

Same problem with gnome-terminal-2.25.91-1.fc11.i586 in rawhide

Revision history for this message
In , Josh (josh-redhat-bugs) wrote :

I discovered that this actually happens with ANY event that reduces the number of lines, which makes this a bit nastier. It doesn't have to be maximized:

1. Start a gnome-terminal with two tabs.
2. Run "seq 100" in both tabs.
3. Resize the window so that it's a few lines shorter.

The active tab will scroll lines off the top, so nothing is lost. The other tab will permanently lose a few lines from the bottom, as in the initial report.

Also note that the loss doesn't occur until you actually switch to the background tab. If you resize the window shorter, return it to the original size, and then look at the background tab, then nothing will be lost.

Revision history for this message
In , Behdad (behdad-redhat-bugs) wrote :

Humm. Can't reproduce.

Revision history for this message
In , Mads (mads-redhat-bugs) wrote :

I still can with gnome-terminal-2.25.91-2.fc11.i586:
shift-ctrl-n
alt-f10
seq 100
shift-ctrl-t
alt-1
- and notice that 98 now is the last number

Revision history for this message
In , Josh (josh-redhat-bugs) wrote :

Created attachment 339613
[vte] ensure that scroll_delta is always adjusted

When gnome-terminal's height is reduced, the active tab's terminal gets
a vte_terminal_size_allocate() call, which queues an adjustment to the
scroll_delta based on visible_rows to ensure that the scrollback moves
correctly.

However, when you then switch to a different tab, that terminal gets a
vte_terminal_set_size() first, which will update terminal->row_count
with the new height. Only after it's visible does it get
vte_terminal_size_allocate(), and there the computation of visible_rows
thinks that there's no reduction (since terminal->row_count already
matches the new height), so it doesn't compute the new scroll_delta.

This patch moves the scroll_delta computation into set_size so it is
always kept current.

Revision history for this message
In , Mads (mads-redhat-bugs) wrote :

I am running with the patch and can confirm that it works.

Revision history for this message
Ken Arnold (kenneth-arnold) wrote :
Revision history for this message
Pedro Villavicencio (pedro) wrote :

thanks for the report.

Changed in gnome-terminal (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
status: New → Triaged
Changed in gnome-terminal (Fedora):
status: Unknown → Confirmed
Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Revision history for this message
In , Josh (josh-redhat-bugs) wrote :

I've now copied this bug upstream:
http://bugzilla.gnome.org/show_bug.cgi?id=588033

Revision history for this message
In , Josh (josh-redhat-bugs) wrote :

This problem still exists on rawhide, and the patch still works to fix it.

Revision history for this message
In , Mateus (mateus-redhat-bugs) wrote :

Behdad, do you still can't reproduce the problem? I just saw Gnome 2.28 Release Planning and noticed the Hard Code Freeze is entering September 14.

Revision history for this message
In , Behdad (behdad-redhat-bugs) wrote :

Fixed upstream. Will be in f12.

Changed in gnome-terminal (Fedora):
status: Confirmed → Fix Released
Revision history for this message
JC Hulce (soaringsky) wrote :

The upstream fixed version has landed in Ubuntu.

Changed in gnome-terminal (Ubuntu):
status: Triaged → Fix Released
Changed in gnome-terminal (Fedora):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.