`tput init' works inconsistently in gnome-terminal, but not xterm, etc.

Bug #251105 reported by Ralph Corderoy
2
Affects Status Importance Assigned to Milestone
vte (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Ubuntu 8.04, gnome-terminal 2.22.1-0ubuntu2, libvte9 1:0.16.13-1ubuntu1.

Using tput(1) to send the terminal's terminfo init string to
gnome-terminal, and hence vte as I understand it, gives inconsistent
results. It often fails to initialise the terminal back to its
defaults.

Here's a command to show the desired behaviour.

    tr \\0 \\012 </dev/zero | head -100 |
    while read f; do tput setf 4; printf X; tput setf 0; printf Y; done

It gives an alternating sequence of red X's and black Y's. Replacing
the `setf 0', which is setting the foreground colour to black, with
`init', as in

    tr \\0 \\012 </dev/zero | head -100 |
    while read f; do tput setf 4; printf X; tput init; printf Y; done

gives many red Y's, i.e. the `tput init' is *sometimes* failing to have
effect. I suspect it's a subtle timing issue where vte is examining the
time between characters in escape sequences to determine if they are, in
fact, an escape *sequence*.

Note, xterm(1), and other terminal emulators I've tried, give consistent
results, the `tput init' is always interpreted the same way.

Here's a couple of bits of information that may be useful to confirm it
isn't something odd on my local setup.

    $ echo $TERM
    xterm
    $ tput init | od -c
    0000000 033 [ ! p 033 [ ? 3 ; 4 l 033 [ 4 l 033
    0000020 >
    0000021
    $

This bug causes legacy programs that work consistently on other Unix and
Linux systems to have display glitches with varying impact depending on
when vte decides not to honour the request. The red/black XYs is just
my simplification. :-)

Revision history for this message
Pedro Villavicencio (pedro) wrote :

do you get the same with vte 0.17 available on intrepid?

Changed in vte:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote : Re: [Bug 251105] Re: `tput init' works inconsistently in gnome-terminal, but not xterm, etc.

Hi Pedro, Sorry I have only one machine here and it's running 8.04. I
suppose I could try the Alpha CD under qemu or something.

BTW, is this a correct use of the Incomplete status? I gave a very full
description of how to produce the problem in 8.04 but if it remains
Incomplete for four weeks then the next step is to make it Invalid.
That doesn't seem right.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Yes it's correct to set it as Incomplete, vte and gnome-terminal has been changed a lot during the last Gnome cycle and test the same with the new packages is needed, i don't get the bug with the package and intrepid and that's also why i'm asking you to confirm that, will wait until you can provide more info. thanks.

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Hi Pedro, Thanks, I found
https://wiki.ubuntu.com/Bugs/Responses#Needing+testing+in+the+development+release
and followed the instructions there.

Under qemu using Intredpid Alpha 3 with gnome-terminal 2.23.4.2-0ubunut2
and libvte9 1:0.16.14-1ubuntu1, I can re-produce the bug. The attached
screenshot has three red Ys in the first `tput init' output and two in
the second, none in the third. This is a lower frequency than with 8.04
but I suspect this is just a side effect of using qemu as I think the
bug is a timing issue in VTE's handling of escape sequences. With qemu,
a whole load of XYs would draw on the screen at once. Natively, I can
see them appearing one by one.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

could someone getting the issue forward it upstream to bugzilla.gnome.org? thanks.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!.

Changed in vte:
status: Incomplete → Invalid
Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Re-opening it because I think the required information was provided on 2008-08-16; the bug is present in Intredpid Alpha 3.

Changed in vte:
status: Invalid → Confirmed
Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Also easily re-created following my above instructions on 8.10, gnome-terminal 2.24.1.1-0ubuntu1, libvte9 1:0.17.4-0ubuntu1 by someone else on their machine, so it should be Confirmed.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for the report Ralph Corderoy , It has been a long time without any comment or a duplicate in this bug report and It is possible that the bug has been fixed. May you please try to reproduce it with the latest Stable Release of Ubuntu the Natty Narwhal and add the respective comments to the report? You can learn how to get that release at http://www.ubuntu.com/download . Thanks again and we appreciate your help.

Changed in vte (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
status: Confirmed → Incomplete
Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Yes, a friend with 11.04 confirms it's still readily apparent and easily testable in a gnome-terminal.

Changed in vte (Ubuntu):
status: Incomplete → Confirmed
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.