Bug 705348 - (qtfontconfig) qt: per-font autohint fontconfig directives globally disable the bytecode interpreter
qt: per-font autohint fontconfig directives globally disable the bytecode int...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: qt (Show other bugs)
15
x86_64 Linux
unspecified Severity low
: ---
: ---
Assigned To: Ngo Than
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-17 08:43 EDT by Kun Zhang
Modified: 2013-10-03 20:20 EDT (History)
19 users (show)

See Also:
Fixed In Version: qt-4.7.3-6.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-08 14:04:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Comparison of font rendering between kwrite and gedit (67.22 KB, image/png)
2011-05-17 08:43 EDT, Kun Zhang
no flags Details
Patch (8.38 KB, patch)
2011-06-06 18:03 EDT, Behdad Esfahbod
no flags Details | Diff
upstream fix for QTBUG-19947 (8.69 KB, patch)
2011-06-20 10:24 EDT, Rex Dieter
no flags Details | Diff
konqueror still crashes (7.90 KB, text/plain)
2011-06-20 13:28 EDT, Rex Dieter
no flags Details
upstream fix for QTBUG-19947 (9.25 KB, patch)
2011-06-21 10:52 EDT, Rex Dieter
no flags Details | Diff

  None (edit)
Description Kun Zhang 2011-05-17 08:43:38 EDT
Created attachment 499346 [details]
Comparison of font rendering between kwrite and gedit

Description of problem:
The font rendering in KDE/Qt apps looks like freetype byte-code interpreter (BCI) is not enabled, while gtk apps renders fonts as BCI enabled. 

Version-Release number of selected component (if applicable):
freetype-2.4.4-4.fc15.x86_64
qt-4.7.2-8.fc15.x86_64


How reproducible: every time


Steps to Reproduce:
1. Enable full hinting in KDE system settings
2. Open kwrite and gedit; select DejaVu Sans 12 as editor font in both
3. Open the same file in both editors
  
Actual results:
font rendering in kwrite (both menu and contents) looks like BCI not enabled (poor hinting); while in gedit, BCI looks as working.

This difference applies to all Qt applications (KDE and non-KDE) and all Gtk-based applications.


Expected results:
BCI enabled in both Qt and Gtk-based applications

Additional info:
I was using Fedora 15 RC3 downloaded from http://serverbeach1.fedoraproject.org/pub/alt/stage/15.RC3/Fedora/x86_64/iso/
Comment 1 Kevin Kofler 2011-05-17 10:08:00 EDT
CCing the other Qt maintainers, to see if anybody has an idea what's up there…

I tested the auto-autohint patch for the BCI code with KCharSelect (using a freetype-freeworld build for F14), it definitely picked up the BCI for DejaVu (both for the menu and inside the character selector). I also had the BCI working fine when testing the F15 nightly KDE live images (using F15's stock freetype). What's going on now?
Comment 2 Miroslav Lichvar 2011-05-31 07:42:58 EDT
Interestingly, I see this on one F15 machine, but not on another. After comparing strace outputs when starting psi and trying to get them close by uninstalling various font packages, I could get correctly rendered fonts on both machines. It seems to be caused by configuration in lohit fonts packages. 

In /etc/fonts/conf.d/66-lohit*.conf there seem to be misplaced autohint assignments. Can anyone confirm this?
Comment 3 Kun Zhang 2011-06-01 08:34:41 EDT
(In reply to comment #2)
> Interestingly, I see this on one F15 machine, but not on another. After
> comparing strace outputs when starting psi and trying to get them close by
> uninstalling various font packages, I could get correctly rendered fonts on
> both machines. It seems to be caused by configuration in lohit fonts packages. 
> 
> In /etc/fonts/conf.d/66-lohit*.conf there seem to be misplaced autohint
> assignments. Can anyone confirm this?

Yes. I removed lohit-* packages, and BCI is working in Qt now.
Comment 4 Rex Dieter 2011-06-01 09:09:38 EDT
CC'ing lohit-*-fonts maintainer, any comment/advice/input?
Comment 5 Pravin Satpute 2011-06-02 05:48:38 EDT
can you try with installing grimmer-proggy-tinysz-fonts

these font also enabled autohint, if it happens with this also. Then may be it is problem from fontconfig side.

can one review lohit config file as well?
Comment 6 Kun Zhang 2011-06-02 09:36:05 EDT
(In reply to comment #5)
> can you try with installing grimmer-proggy-tinysz-fonts
> 
> these font also enabled autohint, if it happens with this also. Then may be it
> is problem from fontconfig side.
> 
> can one review lohit config file as well?

I installed grimmer-proggy-tinysz-fonts as you said, but BCI is still working.
Comment 7 Kevin Kofler 2011-06-02 10:02:45 EDT
FWIW, I'm now also seeing this bug on my notebook, whereas IIRC it worked fine on the live image.
Comment 8 Kevin Kofler 2011-06-02 10:15:21 EDT
What's fun is that for some reason, lohit-assamese-fonts doesn't trigger the problem on my machine, whereas at least oriya, punjabi and tamil do. They all ship what looks like the same fontconfig setup. They have different numbering, but both assamese and tamil use 65-0 numbering, yet assamese doesn't trigger this bug and tamil does.
Comment 9 Kevin Kofler 2011-06-02 10:24:03 EDT
So what I see is that if I change the:
  <test name="family" compare="eq">
    <string>Lohit Tamil</string>
  </test>
to some non-existent nonsense (like "Lohit Tamilll"), the bug stops happening (with the other lohit-*-fonts removed).

What seems to be happening is that the test passes as soon as any characters from Lohit Tamil are looked up, which is not what we want. :-(
Comment 10 Kevin Kofler 2011-06-02 10:27:46 EDT
(The characters get looked up because DejaVu itself doesn't provide them.)

I think the easiest solution would be to drop this fontconfig trick and instead zap the hinting bytecode from the fonts themselves as was done for devanagari.
Comment 11 Akira TAGOH 2011-06-03 04:23:31 EDT
That would be nice to see some debugging log from fontconfig what exactly happens there. try to run apps with FC_DEBUG=4. you might see some different on logs with/without the above rule.
Comment 12 Nicolas Mailhot 2011-06-03 05:14:49 EDT
It may just be yet another QT fontconfig bug. It wouldn't be the first time a fontconfig setting that worked perfectly in gtk/pango/cairo was not interpreted correctly there. In that case, it's best to push the bug where it belongs (QT-side) rather than blocking fontconfig enhancements needed otherwise
Comment 13 Kevin Kofler 2011-06-03 20:13:59 EDT
So the log in a Qt app (KCharSelect) at the point where the switch happens is this:

Append list before 
Append list after  FcTrue(w)
FcConfigSubstitute editPattern has 18 elts (size 32)
        family: "DejaVu Sans"(w) "DejaVu LGC Sans"(w) "DejaVu LGC Sans"(w) "Bits
tream Vera Sans"(w) "DejaVu Sans"(w) "Verdana"(w) "Arial"(w) "Albany AMT"(w) "Lu
xi Sans"(w) "Nimbus Sans L"(w) "Helvetica"(w) "Lucida Sans Unicode"(w) "BPG Glah
o International"(w) "Tahoma"(w) "Nachlieli"(w) "Lucida Sans Unicode"(w) "Yudit U
nicode"(w) "Kerkis"(w) "ArmNet Helvetica"(w) "Artsounk"(w) "BPG UTF8 M"(w) "Ware
e"(w) "Loma"(w) "Garuda"(w) "Umpush"(w) "Saysettha Unicode"(w) "JG Lao Old Arial
"(w) "GF Zemen Unicode"(w) "Pigiarniq"(w) "B Davat"(w) "B Compset"(w) "Kacst-Qr"
(w) "Urdu Nastaliq Unicode"(w) "Raghindi"(w) "Mukti Narrow"(w) "malayalam"(w) "S
ampige"(w) "padmaa"(w) "Hapax Berbère"(w) "MS Gothic"(w) "UmePlus P Gothic"(w) "
SimSun"(w) "PMingLiu"(w) "WenQuanYi Zen Hei"(w) "WenQuanYi Bitmap Song"(w) "AR P
L ShanHeiSun Uni"(w) "AR PL New Sung"(w) "MgOpen Modata"(w) "VL Gothic"(w) "IPAM
onaGothic"(w) "IPAGothic"(w) "Sazanami Gothic"(w) "Kochi Gothic"(w) "AR PL Kaiti
M GB"(w) "AR PL KaitiM Big5"(w) "AR PL ShanHeiSun Uni"(w) "AR PL SungtiL GB"(w) 
"AR PL Mingti2L Big5"(w) "MS ゴシック"(w) "ZYSong18030"(w) "TSCu_Paranar"(w) "
UnDotum"(w) "Baekmuk Dotum"(w) "Baekmuk Gulim"(w) "KacstQura"(w) "Lohit Bengali"
(w) "Lohit Gujarati"(w) "Lohit Hindi"(w) "Lohit Marathi"(w) "Lohit Maithili"(w) 
"Lohit Kashmiri"(w) "Lohit Konkani"(w) "Lohit Nepali"(w) "Lohit Sindhi"(w) "Lohi
t Punjabi"(w) "Lohit Tamil"(w) "Meera"(w) "Lohit Malayalam"(w) "Lohit Kannada"(w
) "Lohit Telugu"(w) "Lohit Oriya"(w) "LKLUG"(w) "FreeSans"(w) "FreeSans"(w) "Arial Unicode MS"(w) "Arial Unicode"(w) "Code2000"(w) "Code2001"(w) "sans-serif"(w) "Roya"(w) "Koodak"(w) "Terafik"(w) "sans-serif"(w) "sans-serif"(w) "sans-serif" (w) "sans-serif"(w) "sans-serif"(w) "sans-serif"(w) "sans-serif"(w) "sans-serif"(w) "sans-serif"(w)
        slant: 0(i)(s)
        weight: 100(i)(s)
        width: 100(i)(s)
        pixelsize: 13,33(f)(s)
        antialias: FcTrue(w)
        hintstyle: 2(i)(w)
        hinting: FcTrue(w)
        verticallayout: FcFalse(s)
        autohint: FcFalse(s)
        globaladvance: FcTrue(s)
        outline: FcTrue(s)
        scalable: FcTrue(s)
        rgba: 1(i)(w)
        lang: "de-AT"(s)
        fontversion: 2147483647(i)(s)
        embeddedbitmap: FcTrue(w)
        decorative: FcFalse(s)

FcConfigSubstitute test font any family Equal "Lohit Assamese"
No match
FcConfigSubstitute test font any family Equal "Lohit Tamil"
Substitute match
        font any family Equal "Lohit Tamil"
edit
        Edit autohint Assign true;

Append list before 
Append list after  FcTrue(w)
FcConfigSubstitute editPattern has 18 elts (size 32)
        family: "DejaVu Sans"(w) "DejaVu LGC Sans"(w) "DejaVu LGC Sans"(w) "Bitstream Vera Sans"(w) "DejaVu Sans"(w) "Verdana"(w) "Arial"(w) "Albany AMT"(w) "Luxi Sans"(w) "Nimbus Sans L"(w) "Helvetica"(w) "Lucida Sans Unicode"(w) "BPG Glaho International"(w) "Tahoma"(w) "Nachlieli"(w) "Lucida Sans Unicode"(w) "Yudit Unicode"(w) "Kerkis"(w) "ArmNet Helvetica"(w) "Artsounk"(w) "BPG UTF8 M"(w) "Waree"(w) "Loma"(w) "Garuda"(w) "Umpush"(w) "Saysettha Unicode"(w) "JG Lao Old Arial"(w) "GF Zemen Unicode"(w) "Pigiarniq"(w) "B Davat"(w) "B Compset"(w) "Kacst-Qr"(w) "Urdu Nastaliq Unicode"(w) "Raghindi"(w) "Mukti Narrow"(w) "malayalam"(w) "Sampige"(w) "padmaa"(w) "Hapax Berbère"(w) "MS Gothic"(w) "UmePlus P Gothic"(w) "SimSun"(w) "PMingLiu"(w) "WenQuanYi Zen Hei"(w) "WenQuanYi Bitmap Song"(w) "AR PL ShanHeiSun Uni"(w) "AR PL New Sung"(w) "MgOpen Modata"(w) "VL Gothic"(w) "IPAMonaGothic"(w) "IPAGothic"(w) "Sazanami Gothic"(w) "Kochi Gothic"(w) "AR PL KaitiM GB"(w) "AR PL KaitiM Big5"(w) "AR PL ShanHeiSun Uni"(w) "AR PL SungtiL GB"(w) "AR PL Mingti2L Big5"(w) "MS ゴシック"(w) "ZYSong18030"(w) "TSCu_Paranar"(w) "UnDotum"(w) "Baekmuk Dotum"(w) "Baekmuk Gulim"(w) "KacstQura"(w) "Lohit Bengali"(w) "Lohit Gujarati"(w) "Lohit Hindi"(w) "Lohit Marathi"(w) "Lohit Maithili"(w) "Lohit Kashmiri"(w) "Lohit Konkani"(w) "Lohit Nepali"(w) "Lohit Sindhi"(w) "Lohit Punjabi"(w) "Lohit Tamil"(w) "Meera"(w) "Lohit Malayalam"(w) "Lohit Kannada"(w) "Lohit Telugu"(w) "Lohit Oriya"(w) "LKLUG"(w) "FreeSans"(w) "FreeSans"(w) "Arial Unicode MS"(w) "Arial Unicode"(w) "Code2000"(w) "Code2001"(w) "sans-serif"(w) "Roya"(w) "Koodak"(w) "Terafik"(w) "sans-serif"(w) "sans-serif"(w) "sans-serif"(w) "sans-serif"(w) "sans-serif"(w) "sans-serif"(w) "sans-serif"(w) "sans-serif"(w) "sans-serif"(w)
        slant: 0(i)(s)
        weight: 100(i)(s)
        width: 100(i)(s)
        pixelsize: 13,33(f)(s)
        antialias: FcTrue(w)
        hintstyle: 2(i)(w)
        hinting: FcTrue(w)
        verticallayout: FcFalse(s)
        autohint: FcTrue(w)
        globaladvance: FcTrue(s)
        outline: FcTrue(s)
        scalable: FcTrue(s)
        rgba: 1(i)(w)
        lang: "de-AT"(s)
        fontversion: 2147483647(i)(s)
        embeddedbitmap: FcTrue(w)
        decorative: FcFalse(s)


As you can see, there is a long font substitution list being built up as one logical font (including some fonts I don't even have installed, I do not have "Arial Unicode MS"!), which includes all those Lohit fonts. This is then used as the default font, and the settings from Lohit get applied to the whole composite font.
Comment 14 Kevin Kofler 2011-06-03 20:20:21 EDT
In GTK+ apps, there is only:
family: "DejaVu Sans"(s)
so only the settings for the DejaVu Sans family are being used.
Comment 15 Kevin Kofler 2011-06-03 20:42:16 EDT
So this is what Qt does:
http://www.qt.gitorious.org/qt/qt/blobs/4.7/src/gui/text/qfontengine_x11.cpp#line1038

I think the difference is that Pango has its own class to represent a set of fonts, so it will only pass one font at a time to fontconfig (which allows getting the settings for the exact font containing the glyph), whereas Qt actually uses freetype's glyph lookup, which unfortunately means fontconfig gets only the whole list of fonts to work with.

The Pango approach looks pretty much like a hack around the limitations in fontconfig and freetype to me.

So I still think that it is impractical to change Qt and that the lohit fonts must be fixed to zap the unwanted hinting bytecode from the fonts themselves as was done for lohit-devanagari-fonts and drop the fontconfig settings.
Comment 16 Nicolas Mailhot 2011-06-04 06:23:32 EDT
(In reply to comment #13)

> As you can see, there is a long font substitution list being built up as one
> logical font (including some fonts I don't even have installed, I do not have
> "Arial Unicode MS"!), which includes all those Lohit fonts. This is then used
> as the default font, and the settings from Lohit get applied to the whole
> composite font.

Well that's really broken IMHO, the whole point of fontconfig is to create a patchwork from different fonts with different characteristics, it can't work if one can't set characteristics for each of those bits separately.

(and BTW even font-file level granularity is too coarse, current fonts are huge an uneaven, theyr really want intra-font-file tweaking)
Comment 17 Akira TAGOH 2011-06-05 21:30:32 EDT
Does modifying matching rules in all lohit fonts' fontconfig files like:

<match target="font">
  <test name="family" compare="eq">
    <string>Lohit blahblahblah</string>
  </test>
  <edit name="autohint" mode="assign">
    <bool>true</bool>
  </edit>
</match>

To:

<match target="font">
  <test qual="first" name="family" compare="eq">
    <string>Lohit blahblahblah</string>
  </test>
  <edit name="autohint" mode="assign">
    <bool>true</bool>
  </edit>
</match>

help?
Comment 18 Kevin Kofler 2011-06-05 21:39:29 EDT
Yes:
sed -i -e 's/<test name="family" /<test qual="first" name="family" /g' \
/etc/fonts/conf.d/*lohit*
fixed the problem. So this looks like an acceptable workaround, can we get the Lohit packages updated for this?

The following packages need fixing:
lohit-assamese-fonts
lohit-bengali-fonts
lohit-kannada-fonts
lohit-malayalam-fonts
lohit-oriya-fonts
lohit-punjabi-fonts
lohit-tamil-fonts
lohit-telugu-fonts

Reassigning to the alphabetically first of the affected font packages.
Comment 19 Akira TAGOH 2011-06-05 22:07:28 EDT
Okay. running apps with any indic locale, which would possibly needs lohit fonts, still turns 'autohint' property on:

...
FcConfigSubstitute test font first family Equal "Lohit Bengali"
Substitute match
        font first family Equal "Lohit Bengali"
edit
        Edit autohint Assign true;

Append list before 
Append list after  FcTrue(w)
FcConfigSubstitute editPattern has 28 elts (size 32)
        family: "Lohit Bengali"(s)
        familylang: "en"(s)
        style: "Regular"(s)
        stylelang: "en"(s)
        fullname: "Lohit Bengali"(s)
        fullnamelang: "en"(s)
        slant: 0(i)(s)
        weight: 80(i)(s)
        width: 100(i)(s)
        pixelsize: 13.33(f)(s)
        foundry: "unknown"(s)

        hintstyle: 3(i)(s)
        hinting: FcFalse(s)
        verticallayout: FcFalse(s)
        autohint: FcTrue(w)
...

So that would be better workaround for this issue yeah.
Aside from that, there might be more packages modifying flags and any properties which is sharing in the pattern but not applying it font-by-font. so we may need to have a look at all of fontconfig files to find problematic config files out.
Comment 20 Pravin Satpute 2011-06-06 07:10:42 EDT
Yes, i am building lohit fonts with this update.

Thanks tagoh for this workaround
Comment 21 Behdad Esfahbod 2011-06-06 12:18:24 EDT
The way Pango is using fontconfig is completely correct and the way fontconfig is designed to be used.  In short, this is how to use fontconfig:

  - Create a pattern specifying the characteristics you are looking for (ie. "sans bold 18").  Call this pat.

  - Call FcConfigSubstitute (NULL, pat, FcMatchPattern).  That's where target="pattern" configuration is applied.

  - Call FcDefaultSubstitute (pat)

  - Then either: {

    - Call FcFontSort (NULL, pat, ...).  This will return a fontset, lets call it fs.

    - For any item in fs that you want to use (call that 'font'), you should:

      - Call FcRenderPrepare (NULL, pat, font).  This will implicitly call FcConfigSubstituteWithPat (NULL, res, pat, FcMatchFont) on the pattern that it returns.  That's where target="font" configuration is applied.

      - Use the resulting pattern to open the font and render it.

  } or {

    - Call FcFontMatch (NULL, pat, &result).  This will return what we call a "font" pattern.  It already has FcFontRenderPrepare (NULL, pat, font) called on it by FcFontMatch.

  }



Now!  The way Qt is abusing fontconfig is:

 - qt_fontSetForPattern calls FcFontSort (NULL, pat, ...) and gets the resulting fontset 'fs' and saves it.

    *** Note that it should have called FcConfigSubstitute (pattern, FcMatchPattern) and FcDefaultSubstitute (pattern) first, but it didn't.


  - In QFontEngineMultiFT::loadEngine(), it gets font patterns out of fs, and calls it pattern.  Note that this is a target="font" kind of pattern.

  - Then it calls:

      FcConfigSubstitute(0, pattern, FcMatchPattern);
      FcDefaultSubstitute(pattern);

    *** This is completely wrong, since pattern is a font pattern, not a query pattern!

So, that's it.  It's completely b0rked.  Those two calls should be made before FcFontSort(), and FcRenderPrepare called in place of those two.
Comment 22 Kevin Kofler 2011-06-06 14:41:14 EDT
So how do we fix Qt? Can you come up with a patch? I have a hard time understanding what the Qt font engines even do and in what order, I didn't managet to produce a step-by-step description like yours.
Comment 23 Behdad Esfahbod 2011-06-06 14:59:00 EDT
I'm checking out Qt to give it a try coming up with a patch.  But given all the different (non-fontconfig) settings going on in the code, I would have a low confidence in any patch I come up with.  Even in Pango it took me weeks to be confident of the code I wrote :).
Comment 24 Behdad Esfahbod 2011-06-06 18:03:26 EDT
Created attachment 503338 [details]
Patch

Ok, I digged this more.  In fact, it was far far worse than I thought.  The code is stupid.  It calls FcFontMatch() every other function...

I hacked up a patch together.  It should improve things a lot.  Can you test?  It's against qt master, but should apply to the fedora package just fine I guess.
Comment 25 Kevin Kofler 2011-06-06 18:18:28 EDT
Let's bounce this back to Qt and see if the patch helps.
Comment 26 Ngo Than 2011-06-07 11:20:55 EDT
> Created attachment 503338 [details]
> Patch
> 
> Ok, I digged this more.  In fact, it was far far worse than I thought.  The
> code is stupid.  It calls FcFontMatch() every other function...
> 
> I hacked up a patch together.  It should improve things a lot.  Can you test? 
> It's against qt master, but should apply to the fedora package just fine I
> guess.

i will rebuilt qt with the patch for testing. thanks Behdad
Comment 27 Ngo Than 2011-06-07 12:24:38 EDT
could someone please test the new qt from
http://koji.fedoraproject.org/koji/taskinfo?taskID=3116903
Comment 28 Rex Dieter 2011-06-08 10:01:45 EDT
OK, initial testing is not so good.  Most kde apps crash shortly after launch.  i tried konqueror, yakuake/konsole, konversation so far.

Here's a backtrace for konqueror,

Application: Konqueror (konqueror), signal: Aborted
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7f5ca97b8840 (LWP 3034))]

Thread 3 (Thread 0x7f5c96885700 (LWP 3035)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:165
#1  0x00007f5c98cd509a in WTF::TCMalloc_PageHeap::scavengerThread (this=0x7f5c994da2a0) at wtf/FastMalloc.cpp:2378
#2  0x00007f5c98cd5189 in WTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at wtf/FastMalloc.cpp:1497
#3  0x00007f5ca8789af1 in start_thread (arg=0x7f5c96885700) at pthread_create.c:305
#4  0x00007f5ca6e3dc2d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x7f5c95084700 (LWP 3040)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:219
#1  0x00007f5ca8a1154e in wait (time=30000, this=0x2bded70) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2c02d40, time=30000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f5ca8a05edf in QThreadPoolThread::run (this=0x2bd51c0) at concurrent/qthreadpool.cpp:140
#4  0x00007f5ca8a11145 in QThreadPrivate::start (arg=0x2bd51c0) at thread/qthread_unix.cpp:320
#5  0x00007f5ca8789af1 in start_thread (arg=0x7f5c95084700) at pthread_create.c:305
#6  0x00007f5ca6e3dc2d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7f5ca97b8840 (LWP 3034)):
[KCrash Handler]
#6  0x00007f5ca6d93285 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x00007f5ca6d94b9b in abort () at abort.c:93
#8  0x00007f5ca6dceb7e in __libc_message (do_abort=2, fmt=0x7f5ca6eba348 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:198
#9  0x00007f5ca6dd4fea in malloc_printerr (action=3, str=0x7f5ca6eb820d "free(): invalid pointer", ptr=<optimized out>) at malloc.c:6283
#10 0x0000003f0ca18454 in FcValueListDestroy (l=0x7f5ca70f2438) at fcpat.c:153
#11 0x0000003f0ca1877f in IA__FcPatternDestroy (p=0x2d842d0) at fcpat.c:297
#12 IA__FcPatternDestroy (p=0x2d842d0) at fcpat.c:281
#13 0x00007f5ca7d24a0e in QFontEngineMultiFT::loadEngine (this=0x2c26670, at=1) at text/qfontengine_x11.cpp:940
#14 0x00007f5ca7c61af5 in QFontEngineMulti::stringToCMap (this=0x2c26670, str=0x7f5c941aa9e0, len=14, glyphs=0x7fff2803d978, nglyphs=0x7fff2803d15c, flags=...) at text/qfontengine.cpp:1329
#15 0x00007f5ca7c729b0 in QFontMetrics::width (this=<optimized out>, text=..., len=14, flags=<optimized out>) at text/qfontmetrics.cpp:551
#16 0x00007f5c989f326d in (anonymous namespace)::Font::floatWidthForSimpleText (this=0x7f5c96046aa0, run=..., glyphBuffer=<optimized out>, fallbackFonts=<optimized out>, glyphOverflow=<optimized out>) at platform/graphics/qt/FontQt.cpp:218
#17 0x00007f5c98986b49 in (anonymous namespace)::RenderMenuList::updateOptionsWidth (this=0x7f5c95fd2d58) at rendering/RenderMenuList.cpp:154
#18 0x00007f5c98987515 in (anonymous namespace)::RenderMenuList::updateFromElement (this=0x7f5c95fd2d58) at rendering/RenderMenuList.cpp:169
#19 0x00007f5c986ab3c6 in (anonymous namespace)::SelectElement::setSelectedIndex (data=..., element=0x7f5c95ffa900, optionIndex=<optimized out>, deselect=true, fireOnChangeNow=false, userDrivenChange=false) at dom/SelectElement.cpp:336
#20 0x00007f5c9878fc1c in (anonymous namespace)::HTMLOptionElement::insertedIntoTree (this=0x7f5c960713c0, deep=false) at html/HTMLOptionElement.cpp:248
#21 0x00007f5c986554e7 in (anonymous namespace)::ContainerNode::insertedIntoDocument (this=0x7f5c960713c0) at dom/ContainerNode.cpp:634
#22 0x00007f5c98678f92 in (anonymous namespace)::Element::insertedIntoDocument (this=0x7f5c960713c0) at dom/Element.cpp:805
#23 0x00007f5c98655322 in (anonymous namespace)::ContainerNode::addChild (this=0x7f5c95ffa900, newChild=...) at dom/ContainerNode.cpp:556
#24 0x00007f5c98797462 in (anonymous namespace)::HTMLParser::insertNode (this=0x7f5c95fd6f30, n=0x7f5c960713c0, flat=false) at html/HTMLParser.cpp:370
#25 0x00007f5c98799a25 in insertNodeAfterLimitBlockDepth (flat=false, n=0x7f5c960713c0, this=0x7f5c95fd6f30) at html/HTMLParser.cpp:227
#26 (anonymous namespace)::HTMLParser::parseToken (this=0x7f5c95fd6f30, t=0x7f5c95fa1438) at html/HTMLParser.cpp:299
#27 0x00007f5c987ac454 in (anonymous namespace)::HTMLTokenizer::processToken (this=0x7f5c95fa1400) at html/HTMLTokenizer.cpp:1949
#28 0x00007f5c987af320 in (anonymous namespace)::HTMLTokenizer::parseTag (this=0x7f5c95fa1400, src=..., state=<optimized out>) at html/HTMLTokenizer.cpp:1521
#29 0x00007f5c987b0d0e in (anonymous namespace)::HTMLTokenizer::write (this=0x7f5c95fa1400, str=<optimized out>, appendData=<optimized out>) at html/HTMLTokenizer.cpp:1772
#30 0x00007f5c987b15c8 in (anonymous namespace)::HTMLTokenizer::executeExternalScriptsIfReady (this=0x7f5c95fa1400) at html/HTMLTokenizer.cpp:2103
#31 0x00007f5c986712f9 in (anonymous namespace)::Document::removePendingSheet (this=0x7f5c95f9fc00) at dom/Document.cpp:2534
#32 0x00007f5c98787e41 in (anonymous namespace)::HTMLLinkElement::sheetLoaded (this=0x7f5c95f913c0) at html/HTMLLinkElement.cpp:329
#33 0x00007f5c98643bbd in (anonymous namespace)::CSSStyleSheet::checkLoaded (this=0x7f5c95fcdd10) at css/CSSStyleSheet.cpp:213
#34 0x00007f5c987889a1 in (anonymous namespace)::HTMLLinkElement::setCSSStyleSheet (this=0x7f5c95f913c0, href=..., baseURL=..., charset=..., sheet=0x7f5c95fdb380) at html/HTMLLinkElement.cpp:314
#35 0x00007f5c987f1678 in (anonymous namespace)::CachedCSSStyleSheet::checkNotify (this=0x7f5c95fdb380) at loader/CachedCSSStyleSheet.cpp:116
#36 0x00007f5c987f182f in (anonymous namespace)::CachedCSSStyleSheet::data (this=0x7f5c95fdb380, data=<optimized out>, allDataReceived=<optimized out>) at loader/CachedCSSStyleSheet.cpp:104
#37 0x00007f5c9882d832 in (anonymous namespace)::Loader::Host::didFinishLoading (this=0x7f5c95fcdbb0, loader=0x7f5c96028600) at loader/loader.cpp:399
#38 0x00007f5c98845eca in (anonymous namespace)::SubresourceLoader::didFinishLoading (this=0x7f5c96028600) at loader/SubresourceLoader.cpp:184
#39 0x00007f5c98a0706e in (anonymous namespace)::QNetworkReplyHandler::finish (this=0x2d854d0) at platform/network/qt/QNetworkReplyHandler.cpp:261
#40 0x00007f5c98a07934 in (anonymous namespace)::QNetworkReplyHandler::qt_metacall (this=0x2d854d0, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff2803e600) at .moc/release-shared/moc_QNetworkReplyHandler.cpp:84
#41 0x00007f5ca8b09eba in QMetaObject::activate (sender=0x2d85cd0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3278
#42 0x0000003f11cbcfdb in KDEPrivate::AccessManagerReply::slotResult (this=0x2d85cd0, kJob=0x2e1d800) at /usr/src/debug/kdelibs-4.6.3/kio/kio/accessmanagerreply_p.cpp:319
#43 0x0000003f11cbd163 in KDEPrivate::AccessManagerReply::qt_metacall (this=0x2d85cd0, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff2803e7d0) at /usr/src/debug/kdelibs-4.6.3/x86_64-redhat-linux-gnu/kio/accessmanagerreply_p.moc:84
#44 0x00007f5ca8b09eba in QMetaObject::activate (sender=0x2e1d800, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff2803e7d0) at kernel/qobject.cpp:3278
#45 0x0000003f0f3396a2 in KJob::result (this=<optimized out>, _t1=0x2e1d800) at /usr/src/debug/kdelibs-4.6.3/x86_64-redhat-linux-gnu/kdecore/kjob.moc:194
#46 0x0000003f0f3396e0 in KJob::emitResult (this=0x2e1d800) at /usr/src/debug/kdelibs-4.6.3/kdecore/jobs/kjob.cpp:312
#47 0x0000003f11cf44a4 in KIO::SimpleJob::slotFinished (this=0x2e1d800) at /usr/src/debug/kdelibs-4.6.3/kio/kio/job.cpp:525
#48 0x0000003f11cfde92 in KIO::TransferJob::slotFinished (this=0x2e1d800) at /usr/src/debug/kdelibs-4.6.3/kio/kio/job.cpp:1112
#49 0x0000003f11cfa911 in KIO::TransferJob::qt_metacall (this=0x2e1d800, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff2803eba0) at /usr/src/debug/kdelibs-4.6.3/x86_64-redhat-linux-gnu/kio/jobclasses.moc:367
#50 0x00007f5ca8b09eba in QMetaObject::activate (sender=0x2e1c590, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3278
#51 0x0000003f11d9d7e1 in KIO::SlaveInterface::dispatch (this=<optimized out>, _cmd=104, rawdata=...) at /usr/src/debug/kdelibs-4.6.3/kio/kio/slaveinterface.cpp:173
#52 0x0000003f11d9a645 in KIO::SlaveInterface::dispatch (this=<optimized out>) at /usr/src/debug/kdelibs-4.6.3/kio/kio/slaveinterface.cpp:89
#53 0x0000003f11d8ddee in KIO::Slave::gotInput (this=0x2e1c590) at /usr/src/debug/kdelibs-4.6.3/kio/kio/slave.cpp:348
#54 0x0000003f11d8e43c in KIO::Slave::qt_metacall (this=0x2e1c590, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff2803efc0) at /usr/src/debug/kdelibs-4.6.3/x86_64-redhat-linux-gnu/kio/slave.moc:82
#55 0x00007f5ca8b09eba in QMetaObject::activate (sender=0x2b6eab0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3278
#56 0x0000003f11cc5c77 in dequeue (this=<optimized out>) at /usr/src/debug/kdelibs-4.6.3/kio/kio/connection.cpp:82
#57 KIO::ConnectionPrivate::dequeue (this=0x2d923d0) at /usr/src/debug/kdelibs-4.6.3/kio/kio/connection.cpp:71
#58 0x0000003f11cc5d1d in KIO::Connection::qt_metacall (this=0x2b6eab0, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x2e58b20) at /usr/src/debug/kdelibs-4.6.3/x86_64-redhat-linux-gnu/kio/connection.moc:79
#59 0x00007f5ca8b0da7a in QObject::event (this=0x2b6eab0, e=<optimized out>) at kernel/qobject.cpp:1217
#60 0x00007f5ca7a4e394 in notify_helper (e=0x2b11aa0, receiver=0x2b6eab0, this=0x256f7f0) at kernel/qapplication.cpp:4462
#61 QApplicationPrivate::notify_helper (this=0x256f7f0, receiver=0x2b6eab0, e=0x2b11aa0) at kernel/qapplication.cpp:4434
#62 0x00007f5ca7a53221 in QApplication::notify (this=0x7fff2803fb50, receiver=0x2b6eab0, e=0x2b11aa0) at kernel/qapplication.cpp:4341
#63 0x0000003f0fe41806 in KApplication::notify (this=0x7fff2803fb50, receiver=0x2b6eab0, event=0x2b11aa0) at /usr/src/debug/kdelibs-4.6.3/kdeui/kernel/kapplication.cpp:311
#64 0x00007f5ca8af71ac in QCoreApplication::notifyInternal (this=0x7fff2803fb50, receiver=0x2b6eab0, event=0x2b11aa0) at kernel/qcoreapplication.cpp:731
#65 0x00007f5ca8afa774 in sendEvent (event=0x2b11aa0, receiver=0x2b6eab0) at kernel/qcoreapplication.h:215
#66 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x254b210) at kernel/qcoreapplication.cpp:1372
#67 0x00007f5ca8b218b3 in sendPostedEvents () at kernel/qcoreapplication.h:220
#68 postEventSourceDispatch (s=0x2574e80) at kernel/qeventdispatcher_glib.cpp:277
#69 0x00007f5ca625e7ed in g_main_dispatch (context=0x25740e0) at gmain.c:2441
#70 g_main_context_dispatch (context=0x25740e0) at gmain.c:3014
#71 0x00007f5ca625efc8 in g_main_context_iterate (context=0x25740e0, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3092
#72 0x00007f5ca625f25c in g_main_context_iteration (context=0x25740e0, may_block=1) at gmain.c:3155
#73 0x00007f5ca8b21d0f in QEventDispatcherGlib::processEvents (this=0x254c900, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#74 0x00007f5ca7af0f2e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:207
#75 0x00007f5ca8af66c2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#76 0x00007f5ca8af68bf in QEventLoop::exec (this=0x7fff2803f9a0, flags=...) at kernel/qeventloop.cpp:201
#77 0x00007f5ca8afaa07 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#78 0x0000003f12eb38c2 in kdemain (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kdebase-4.6.3/konqueror/src/konqmain.cpp:219
#79 0x00007f5ca6d7f39d in __libc_start_main (main=0x4007b0 <main(int, char**)>, argc=2, ubp_av=0x7fff280403e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff280403d8) at libc-start.c:226
#80 0x00000000004007e1 in _start ()
Comment 29 Behdad Esfahbod 2011-06-08 10:14:03 EDT
I didn't mean the patch to be really used to testing, more like a starting point for a Qt hacker to get started fixing the issue.  However, since seems like no one is willing to do that, I'll take a deeper look today to cleanup object lifecycle management and hopefully turn this into a useful patch.  I'm contacting Simon Hausmann and Lars Knoll right now, but I doubt that either one has time/interest to look into cleaning this up. :(
Comment 30 Rex Dieter 2011-06-08 11:03:23 EDT
OK, we all appreciate the efforts so far.
Comment 31 Rex Dieter 2011-06-13 10:42:19 EDT
I'll work to upstream this today
Comment 32 Kevin Kofler 2011-06-13 11:52:37 EDT
OK, but please make sure upstream knows that the current version of the patch doesn't work as is.
Comment 33 Behdad Esfahbod 2011-06-13 13:22:38 EDT
Leave us the link to the upstream report please.
Comment 34 Rex Dieter 2011-06-13 15:51:53 EDT
Upstream report,
http://bugreports.qt.nokia.com/browse/QTBUG-19846
Comment 35 Rex Dieter 2011-06-14 12:10:02 EDT
updating summary

fyi, upstream closed my initial report, largely (it seems) because I was a bit too brief.  I added a comment in an attempt to be a bit more verbose, and will open a new bug when/if that's not acted on quickly.

In the meantime, than will poke some other trolls to take a look at it.
Comment 36 Behdad Esfahbod 2011-06-14 14:58:58 EDT
Saw that.  I'll try to give it another go this week.
Comment 37 Rex Dieter 2011-06-17 10:31:06 EDT
OK, one more try,

http://bugreports.qt.nokia.com/browse/QTBUG-19947
Comment 38 Rex Dieter 2011-06-20 10:24:41 EDT
Created attachment 505624 [details]
upstream fix for QTBUG-19947

Progress!  here's an updated patch upstream is currently testing.
Comment 39 Rex Dieter 2011-06-20 13:28:20 EDT
Created attachment 505665 [details]
konqueror still crashes

Better, but konq still crashes. :(  kcrash attached.
Comment 40 Rex Dieter 2011-06-21 10:52:43 EDT
Created attachment 505846 [details]
upstream fix for QTBUG-19947

Updated patch from upstream, this one looks like a winner.
Comment 41 Fedora Update System 2011-06-22 13:32:24 EDT
qt-4.7.3-6.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/qt-4.7.3-6.fc15
Comment 42 Fedora Update System 2011-06-23 23:36:06 EDT
Package qt-4.7.3-6.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing qt-4.7.3-6.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/qt-4.7.3-6.fc15
then log in and leave karma (feedback).
Comment 43 Fedora Update System 2011-06-24 12:02:38 EDT
qt-4.7.3-6.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/qt-4.7.3-6.fc14
Comment 44 Fedora Update System 2011-07-08 14:04:46 EDT
qt-4.7.3-6.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 45 Fedora Update System 2011-07-08 14:07:32 EDT
qt-4.7.3-6.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 46 Alexei Podtelezhnikov 2011-07-08 23:11:17 EDT
Qt's weakest link, IMHO. Qt font problems have been around for years! 

See bug 355271, for example. 

THIS IS A BIG DEAL. THANK YOU.
Comment 47 Kevin Kofler 2011-07-10 16:51:00 EDT
Uh, we just fixed this particular bug, so what are you complaining about?

As for bug #355271, AFAICT, that too has been fixed eons ago, I noticed Konqueror starting to use Liberation fonts for stuff asking for Times New Roman or Arial several releases ago.
Comment 48 Red Hat Bugzilla 2013-10-03 20:20:04 EDT
Removing external tracker bug with the id '19947' as it is not valid for this tracker

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