| Summary: | [terminal] Regression: No header when running "top" in Terminal, due to incorrect ESC[K handling | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] Target Management | Reporter: | Anna Dushistova <anna.dushistova> | ||||||
| Component: | Terminal | Assignee: | Martin Oberhuber <mober.at+eclipse> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||||
| Severity: | major | ||||||||
| Priority: | P2 | CC: | chris, eclipse, eliasbalasis, ruud | ||||||
| Version: | 3.4.2 | ||||||||
| Target Milestone: | 3.5 M6 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | 392107 | ||||||||
| Bug Blocks: | 404341 | ||||||||
| Attachments: |
|
||||||||
|
Description
Anna Dushistova
Try using the TM Terminal (not TE variant), using ssh, and echo $TERM in your terminal - it should be "ansi". For me, top runs just fine in a Juno SR1 TM-Terminal over ssh to OpenSuSE 12.2: 09 mober@szg-vm01-opensuse-12~>cat /etc/SuSE-release openSUSE 12.2 (x86_64) VERSION = 12.2 CODENAME = Mantis 110 mober@szg-vm01-opensuse-12~>echo $TERM ansi I can even resize the terminal at will and top keeps happy. My host was a RHEL 6.3 (Santiago) 64-bit machine running a 32-bit JVM. 1178 mober@szg-qa-lx5/$rpm -qa | grep -i gtk [some stuff stripped] gtk2-engines-2.18.4-5.el6.x86_64 gtk2-2.18.9-10.el6.x86_64 gtk2-2.18.9-10.el6.i686 gtk2-engines-2.18.4-5.el6.i686 (In reply to comment #1) > Try using the TM Terminal (not TE variant), using ssh, and echo $TERM in > your terminal - it should be "ansi". It is "ansi". I am using java 1.7.0-06 if that matters, 32 bit. Tried opening a terminal onto both my localhost and a qemu target running yocto sato image. Can you create folder /tmp/eclipselogs as per bug 209665 comment 4 . Try again via TM-Terminal/ssh, then attach a screenshot showing the problem as well as the file /tmp/eclipselogs/tmterminal.log -- let's see whether your remote sends any unexpected escape chars. And of course, trying on top of Eclipse 3.8.1 / Oracle Java 1.6.0_21 32-bit might make sense when you want to replicate my environment. Created attachment 227416 [details]
screenshot
Created attachment 227417 [details]
Log
Screenshot was taken for the tcf terminal, but ssh one looks exactly the same.The header is missing. The interesting thing here is that the Terminal does leave some empty space where the header is supposed to be. That prompts me to assume that the contents is there, but you might have a problem with colors or fonts; or some ANSI sequence like "delete-to-end-of-line" is not interpreted properly. In the log, the header is received but then I see this: VT100Emulator.processAnsiCommand_m:834: Unsupported graphics rendition parameter: 39 VT100Emulator.processAnsiCommand_m:834: Unsupported graphics rendition parameter: 49 This quite apparently refers to this escape sequence: \x1b[39;49m According to http://en.wikipedia.org/wiki/Ansi_terminal this is an SGR command saying "set default text color ; default background color" which, according to the standard again, has "implementation defined" effect. The current terminal widget doesn't interpret these codes at the moment, though adding these would likely be very easy (VT100Emulator.java line 799). But the bigger problem here is likely the \x1b[K Which your "top" sends at the end of each line. According to the standard, it's meant to "erase to end of line". I believe that you're actually seeing bug 392107 here -- older versions of the Terminal interpreted this as "erase to beginning of line" which clears your output. Please make sure that you have the Terminal widget 3.4.2 or later, then try again. In my working install, I have org.eclipse.tm.terminal_3.2.1.201209191030.jar what do you have ? Double checking again with master, I have to confirm that you did in fact find a regression due to the fix for bug 392107 . The problem is, that in the sequence ESC [ K the missing parameter is interpreted as a default value of 1, but the standard says that the default must be 0 here. Before the fix for bug 392107, the invalid default value resulted in correct behavior, since the interpretation of values 0 and 1 was switched. Fixed in master. Given that this was a regression between 3.4.1 and 3.4.2 (Juno SR1 -> SR2), I think that the fix should be backported into 3.4.2+ . CQ:WIND00must_fix Marking P2 / critical since in most real-world scenarios that do a little bit of Terminal handling (top, emacs, vi, ...) the terminal is likely quite unusable due to this bug. It's really surprising that the bug went unnoticed for so long. Looks like we don't test our Nightlies enough. *** Bug 404250 has been marked as a duplicate of this bug. *** Workaround for anyone running into this issue in TM 3.4.2 (Juno SR2): Try Help > Install New Software: http://download.eclipse.org/tm/updates/3.5milestones and pick the TM Terminal. We are working on a TM 3.4.3 release on the main TM update site, such that "Help > Check for Updates" will pull in the fix. This is tracked in bug 404341 . *** Bug 404439 has been marked as a duplicate of this bug. *** *** Bug 404787 has been marked as a duplicate of this bug. *** |