Bug 139169 - Random display corruption in UTF-8 mode
Summary: Random display corruption in UTF-8 mode
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.6.4
Platform: NetBSD pkgsrc NetBSD
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-23 14:41 UTC by shattered
Modified: 2008-05-06 17:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
cat this file to stdout. (11.96 KB, text/plain)
2006-12-23 14:43 UTC, shattered
Details
corrupted display (96.81 KB, image/gif)
2006-12-23 14:51 UTC, shattered
Details
Normal display, using sed '' (16.63 KB, image/gif)
2007-02-07 16:19 UTC, Kiril Kirov
Details
Corrupted display (16.79 KB, image/gif)
2007-02-07 16:20 UTC, Kiril Kirov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description shattered 2006-12-23 14:41:10 UTC
Version:           1.6.4 (using KDE KDE 3.5.4)
Installed from:    NetBSD pkgsrc
Compiler:          gcc version 3.3.3 (NetBSD nb3 20040520) 
OS:                NetBSD

- Connect to remote machine using ssh
- Change Konsole charset to utf-8
- Use any application that will output non-ASCII characters (Cyrillic, for example).  
- From time to time, one or more characters will be substituted by 'replacement character'; these usually go away after a refresh.

I first noticed the problem in irssi (IRC client), but can easily reproduce it just by 'cat'ing a text file to stdout.
Comment 1 shattered 2006-12-23 14:43:23 UTC
Created attachment 19016 [details]
cat this file to stdout.
Comment 2 shattered 2006-12-23 14:51:34 UTC
Created attachment 19017 [details]
corrupted display
Comment 3 Kiril Kirov 2007-02-02 12:54:32 UTC
Same problem here. I get random characters corruption using UTF-8 cyrillic on Konsole 1.6.4 (FreeBSD 6.2, KDE 3.5.4). I'm working locally so the ssh seem irrelevant to the problem.
Comment 4 Robert Knight 2007-02-04 15:53:49 UTC
I am not able to reproduce this in KDE 3.5.6 using Qt 3.3.6.

There is a slightly different problem which shows up in KDE 4 when catting the attached file where three or four lines are one character shorter than the others.
Comment 5 shattered 2007-02-04 17:12:48 UTC
Perhaps the corrupted character's encoded form is split between two fixed-size buffers (given the look of corrupted display)...
Comment 6 Robert Knight 2007-02-04 18:11:01 UTC
> Perhaps the corrupted character's encoded form is split between 
> two fixed-size buffers (given the look of corrupted display)... 

I thought about that, but internally Konsole uses a Qt class to do the decoding which can remember state information between calls.  So if you decode a buffer which ends with the first half of a two-byte character, that final character will not be added to the output until the other half is available when the next batch of input comes in.  But yes, I agree that I think this is where something may be going wrong.

I cannot reproduce the problem in KDE 3, but under KDE 4 it does not show up if you execute:

cat file-attached-to-this-report | sed ''

Can anyone who is able to reproduce this in KDE 3 try running the above command?
Comment 7 shattered 2007-02-04 18:28:04 UTC
Interesting.  I no longer can reproduce this on KDE 3.5.5 / Konsole 1.6.5 / Qt 3.3.6 by cat'ing the file... I'll see if it appears in ssh session.
Comment 8 Kiril Kirov 2007-02-04 22:01:21 UTC
I tried to run the above command. It shows the text without problems. However if I try to view the file with less, it shows corrupted text. Hope that helps.
Comment 9 shattered 2007-02-06 23:07:22 UTC
Downgraded just the Konsole to 1.6.4 (KDE is still at 3.5.5) -> still cannot reproduce the bug.  Will try to downgrade to 3.5.4...
Comment 10 Kiril Kirov 2007-02-07 16:19:46 UTC
Created attachment 19577 [details]
Normal display, using sed ''
Comment 11 Kiril Kirov 2007-02-07 16:20:46 UTC
Created attachment 19578 [details]
Corrupted display
Comment 12 shattered 2007-03-27 21:46:41 UTC
Never saw the problem again in 3.5.6/1.6.6.
Comment 13 shattered 2007-07-08 10:35:48 UTC
Doesn't occur in 3.5.7/1.6.6 either.