Bug 244182 - empty lines are shown
empty lines are shown
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: gtkterm (Show other bugs)
7
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Hans de Goede
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-14 08:58 EDT by Dan Horák
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 0.99.5-4.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-19 17:38:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
listing with additional empty lines (37.16 KB, image/png)
2007-06-14 09:00 EDT, Dan Horák
no flags Details
it should look like this (47.71 KB, image/png)
2007-06-14 09:01 EDT, Dan Horák
no flags Details
added debugging (7.08 KB, patch)
2007-06-15 14:22 EDT, Dan Horák
no flags Details | Diff
debugging results (658 bytes, application/x-gzip)
2007-06-15 14:22 EDT, Dan Horák
no flags Details
PATCH fixing the crlf issues (4.44 KB, patch)
2007-06-16 07:00 EDT, Hans de Goede
no flags Details | Diff

  None (edit)
Description Dan Horák 2007-06-14 08:58:24 EDT
Description of problem:
The terminal adds empty lines during listing a configuration from a Cisco
switch. After switching the view to HEX and the back to ASCII, lines are
displayed correctly. For details see the attachments.

Version-Release number of selected component (if applicable):
0.99.5-3.fc6


How reproducible:
use gtkterm as a console for Cisco switch/router


Expected results:
no additional empty lines displayed

Additional info:
- maybe a problem of the vte library
- EOL characters from Cisco are CR+LF
Comment 1 Dan Horák 2007-06-14 09:00:14 EDT
Created attachment 156988 [details]
listing with additional empty lines
Comment 2 Dan Horák 2007-06-14 09:01:03 EDT
Created attachment 156989 [details]
it should look like this
Comment 3 Hans de Goede 2007-06-14 14:25:55 EDT
Is this with the configuration -> CR LF auto feature on / checkbox checked?

Can you do a file -> Save Raw file of a session reproducing this?
Comment 4 Dan Horák 2007-06-15 08:14:59 EDT
"CR LF auto" feature doesn't have effect on the displayed text, but makes a
change in the saved "Raw file".

results from captured files:
minicom => EOL = LF
gtkterm + CRLF auto = off => EOL = CR+LF
gtkterm + CRLF auto = on => EOL = doubled CR+LF (but not every time)

I would tell that EOL handling is a bit broken :-) Candidates are put_text()
from widgets.c and put_chars() from buffer.c. I will try to compile a version
with some debugging enabled during the weekend and do more tests.
Comment 5 Hans de Goede 2007-06-15 08:42:39 EDT
Thanks, I'm awaiting your results
Comment 6 Dan Horák 2007-06-15 14:22:00 EDT
Created attachment 157139 [details]
added debugging

The handling is really broken. The attached patch creates 3 files - raw output
from serial line, preprocessed output stored in a buffer and displayed output.

With "CR+LF auto" = off the raw and buffer files are the same, but the
displayed result has doubled CR+LF.
With "CR+LF auto" = on, the doubled CR+LF are already in the buffer.
Comment 7 Dan Horák 2007-06-15 14:22:45 EDT
Created attachment 157140 [details]
debugging results
Comment 8 Hans de Goede 2007-06-16 05:32:26 EDT
Thanks!

I believe I've found the culprit for this happening even with autocrlf off and
I'll also fix autocrlf behaviour. This is just a headsup as I don't want us to
be wasting time by working on the samething independently.

I'll report back when I have something to test for you.
Comment 9 Hans de Goede 2007-06-16 07:00:18 EDT
Created attachment 157187 [details]
PATCH fixing the crlf issues

This patch should fix the issues you've been seeing, independend of the auto
crlf setting, and when auto crlf is needed it should even do the right thing.

Can you please test this both with and without auto crlf, I currently don't
have the hardware to test this.

Thanks!
Comment 10 Dan Horák 2007-06-16 08:44:53 EDT
...
+      /* BUFFER_RECEPTION*2 for worst case scenario, all \n or \r chars */
+      char out_buffer[BUFFER_RECEPTION*2];
+      int i, out_size;
...

+      int i, out_size = 0; !!!


CRLF auto = off => OK
CRLF auto = on => OK with initialized out_size variable in buffer.c (in
put_chars()) to zero, you have probably missed the compiler warning

Great work, Hans. Thank you.
Comment 11 Hans de Goede 2007-06-16 15:45:54 EDT
(In reply to comment #10)
> 
> Great work, Hans. Thank you.
> 

Your welcome, and thank you too!

I'll build a version with the patch included for FC-6, F-7 and devel. The F-7
version will first become available in updates-testing, at which time the
updates system will post a comment here saying so. I would be much obliged if
you could test the version from updates-testing when it becomes available, so
that I can move it to the regular updates repository.
Comment 12 Fedora Update System 2007-06-18 12:38:33 EDT
gtkterm-0.99.5-4.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Dan Horák 2007-06-19 02:10:28 EDT
just done some testing and it looks good
Comment 14 Fedora Update System 2007-06-19 17:38:43 EDT
gtkterm-0.99.5-4.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.