RESOLVED FIXED 75951
[Qt] DRT crashes with Qt 5
https://bugs.webkit.org/show_bug.cgi?id=75951
Summary [Qt] DRT crashes with Qt 5
Simon Hausmann
Reported 2012-01-10 03:51:48 PST
Various layout tests crash with the DRT and Qt 5 due to a subtle font-config issue. The backtraces indicate that an empty font-family causes crashes with atomic string. The root cause is the fact that the default font family returned by Qt is an empty string, which is not a valid situation. In Qt 4.8 the default font / family was "Helvetica". In Qt 5 the default is queried from font-config by doing the programmatic equivalent of running "fc-match" on the commandline, in src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp. You can verify this by calling 'ltrace fc-match' and comparing the font-config commands to what's being done in QFontconfigDatabase::resolveFontFamilyAlias. In a normal "Linux" system the default is defined through a rule like this (from /etc/fonts/conf.d/49-sansserif.conf) : <!-- If the font still has no generic name, add sans-serif --> <match target="pattern"> <test qual="all" name="family" compare="not_eq"> <string>sans-serif</string> </test> <test qual="all" name="family" compare="not_eq"> <string>serif</string> </test> <test qual="all" name="family" compare="not_eq"> <string>monospace</string> </test> <edit name="family" mode="append_last"> <string>sans-serif</string> </edit> </match> This ensures the "last resort fallback", and indeed this is missing in _our_ fonts.conf in Tools/DumpRenderTree/qt/fonts.conf.
Attachments
Patch (1.50 KB, patch)
2012-01-10 03:54 PST, Simon Hausmann
ossy: review+
hausmann: commit-queue-
Simon Hausmann
Comment 1 2012-01-10 03:54:57 PST
Csaba Osztrogonác
Comment 2 2012-01-10 04:02:36 PST
Comment on attachment 121825 [details] Patch LGTM,r=me.
Simon Hausmann
Comment 3 2012-01-10 04:12:04 PST
Simon Hausmann
Comment 4 2012-01-10 04:12:43 PST
Comment on attachment 121825 [details] Patch oops, landed manually
Note You need to log in before you can comment on or make changes to this bug.