Bug 127516 - dropped lines in program output to console
Summary: dropped lines in program output to console
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Robert Knight
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-17 17:30 UTC by Thomas Duebendorfer
Modified: 2007-07-28 07:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Duebendorfer 2006-05-17 17:30:04 UTC
Version:           1.5 (using KDE 3.4.0, Debian Package 4:3.4.0-0ubuntu3.5 (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-8ubuntu2)
OS:                Linux (i686) release 2.6.13.4-gg6

When a program writes a lot of text (a few thousand lines) to stdout, some arbitrary lines are missing, when copying them from the scrollback buffer by selecting them with the mouse. Bug happens on an unregular basis and could easily be repeated.
Comment 1 Robert Knight 2006-08-07 18:35:05 UTC
Is there a reliable method for reproducing this?
Comment 2 Thomas Duebendorfer 2006-08-08 16:25:23 UTC
The problem seems to be connected to resizing the konsole window and then copying from the konsole scrollback buffer. I can easily reproduce missing characters but could not reproduce missing lines. I use konsole with a 80 char default window width.

Using the following C program megaoutput.c, I write 100 lines of text to stdout:
#include <stdio.h>
int main(int argc, char** argv) {
  char *s = "This is a rather long line of English written nonsense text " \
    "that somewhat exceeds 80 characters per line.";
  int i = 100;

  while(i > 0) {
   printf("%d - %s\n", i, s);
   i--;
  }
}

# gcc megaoutput.c; mv a.out megaoutput
# Then run it with ./megaoutput

Now I select the last ~50 lines with the left mouse button and scroll up (move mouse over top window border). Pasting it to e.g. emacs with the middle mouse button yields the correct text with complete text lines.

Now I resize konsole to ~60 chars window width and copy the same text from the scrollback buffer again. Now each line is missing some characters. Even when resizing the window again to 80 chars and copying again, some previously output characters stay missing. Apparently the scrollback buffer looses some of its content when resizing the konsole window and copying and/or scrolling.
Comment 3 Robert Knight 2007-02-10 03:50:52 UTC
> Now each line is missing some characters

Are these characters missing from the end of the line or from elsewhere in the line?
Comment 4 Thomas Duebendorfer 2007-02-10 11:57:52 UTC
The characters are chopped off the end of each line.
Comment 5 Shriramana Sharma 2007-04-14 18:43:43 UTC
A clearer (I hope) restatement:

If an output line in Konsole has 75 chars, and I decrease the width of the Konsole window to hold less than that, many chars are cut off from the line. I thought this was only due to absence of space to display those lines. But I found that when I increase it to sufficient width to hold 75 chars or even more, the chars are not restored.

Also, the summary should be changed to something more clear like:

"decreasing the konsole window width causes loss of history information horizontal-wise"
Comment 6 Robert Knight 2007-04-16 03:02:53 UTC
I believe what you are describing is a known problem with Konsole which is fixed in KDE 4, the fix is not straightforward to backport to KDE 3 however.

Comment 7 Robert Knight 2007-07-28 07:38:41 UTC
As I said before, I'm fairly sure this is a duplicate of another report and a problem which is resolved in KDE 4 but not easy to backport.  Please re-open if you still have problems with beta or final releases of KDE 4's Konsole.