Bug 224818 - Several KDE application crashes when scrolling on a special utf8 document (Qt-harfbuzz assert)
Summary: Several KDE application crashes when scrolling on a special utf8 document (Qt...
Status: RESOLVED UPSTREAM
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: qt (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 221415 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-29 21:17 UTC by Stefan Seyfried
Modified: 2010-02-01 05:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testfile to crash konsole with less (199.56 KB, patch)
2010-01-29 21:19 UTC, Stefan Seyfried
Details
backtrace of crashed konsole (5.97 KB, text/plain)
2010-01-30 11:29 UTC, Stefan Seyfried
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Seyfried 2010-01-29 21:17:04 UTC
Version:           Version 2.4 - KDE 4.3.95 (KDE 4.3.95 (KDE 4.4 RC2)) "release 214" (using Devel)
OS:                Linux
Installed from:    Compiled sources

konsolepart crashes when displaying the diff of busybox 1.16.0 to current git in a pager (less) or vim.

I'll attach a testfile, that, when viewed with less, crashes konsole. (jump to the end and scroll a few pages up to trigger the crash quickly).

Yakuake crashes in exactly the same way, so it's probably a konsolepart problem.

The triggered assert() is:

konsole: ../3rdparty/harfbuzz/src/harfbuzz-shaper.cpp:436: void HB_HeuristicSetGlyphAttributes(HB_ShaperItem*): Assertion `item->num_glyphs <= length' failed.
Comment 1 Stefan Seyfried 2010-01-29 21:19:02 UTC
Created attachment 40362 [details]
testfile to crash konsole with less

view with less from the end, scroll up, to crash konsole
Comment 2 Stefan Seyfried 2010-01-29 21:23:33 UTC
It is not only konsole that's affected, konqueror crashes also when viewing this file. Just scroll down ;)
Comment 3 Stefan Seyfried 2010-01-30 11:29:47 UTC
Created attachment 40377 [details]
backtrace of crashed konsole

I was able to get a useful backtrace today, in case it helps.

This is not a konsole-only problem, it seems to affect the fontrenderer or whatever directly. Kate and Konqueror also crash on this file.
Comment 4 Dario Andres 2010-01-30 23:03:35 UTC
Yes, this seems to be a problem in the font rendering layer (and helpers) from the Qt library.

- What is your Qt4 version ?

It seems I can't reproduce the crash here using:

Qt: 4.6.1 (kde-qt master commit 5ccbae0c2d9254efe67599137afec763d4fec0f6
        Date:   Tue Jan 19 20:42:24 2010 +0100)
KDE Development Platform: 4.4.61 (KDE 4.4.61 (KDE 4.5 >= 20100127))
kdelibs svn rev. 1082077 / kdebase svn rev. 1082077
on ArchLinux i686 - Kernel 2.6.32.3

(I tested with Konsole and Konqueror)

Regards
Comment 5 Dario Andres 2010-01-30 23:04:35 UTC
- Also, it could be useful if you could try to repeat the crash with a Qt-only application (to report the bug to Qt)
Regards
Comment 6 Christoph Feck 2010-01-31 00:32:05 UTC
It may be possible that this depends on the installed fonts. You could try removing/adding fonts to see if this has any effect.
Comment 7 Dario Andres 2010-01-31 02:07:08 UTC
*** Bug 221415 has been marked as a duplicate of this bug. ***
Comment 8 Stefan Seyfried 2010-01-31 11:02:24 UTC
strolchi:~ # rpm -qi libqt4
Name        : libqt4                       Relocations: (not relocatable)
Version     : 4.6.0                             Vendor: openSUSE
Release     : 2.10                          Build Date: Mon Jan 25 08:13:13 2010
Install Date: Thu Jan 28 14:16:39 2010         Build Host: build15
Group       : System/Libraries              Source RPM: libqt4-4.6.0-2.10.src.rpm

Unfortunately, SUSE does not seem to update QT4 for FACTORY (i'm already running the latest available builds AFAICT)

Is there a QT-only terminal program (or editor or something like that) that I could use to double-check this bug? (After SUSE updated the QT packages, of course)

The font I use is (AFAICT):
seife@strolchi:~> fc-match Monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
Comment 9 Dario Andres 2010-01-31 18:52:12 UTC
To test, you could try some of the applications in here:
http://qt-apps.org/index.php?xsortmode=high&page=0&xcontentmode=4241

or ... create a UI file with the Qt Designer... put a Text Edit on it, preview it and paste the diff contents.. then you could try to repeat the crash
Comment 10 Stefan Seyfried 2010-01-31 21:15:48 UTC
reproduced with qterminal => looks like this is QT Bug 6436

http://bugreports.qt.nokia.com/browse/QTBUG-6436

Not sure if there is a special notation for "Upstrem QT Bug number ###", so I  leave the resolution of this bug to you.

Thanks for the help!
Comment 11 Dario Andres 2010-01-31 21:25:21 UTC
According to that page it is fixed in Qt 4.6.1.
- Test with that version and if it still crashes, then this is a different issue. 
Closing as UPSTREAM in the meantime
Comment 12 Christoph Feck 2010-02-01 05:44:12 UTC
Re comment #8, openSUSE has several repositories for Qt; the one I am using is http://download.opensuse.org/repositories/KDE:/Qt46/ which has weekly Qt from 4.6 branch (currently 4.6.1+ some revisions).