Comment 28 for bug 408016

Revision history for this message
In , Tel (lists) wrote :

I've studied a bit more and think that the application itself is generating this strange wide font value. Wine takes the unreasonable values and makes an attempt to do what it is asked, the buck gets passed into X11DRV_SelectFont() and then ultimately pushes disaster onto the X11 drivers. Layer upon layer without sanity checking.

    warn:font:CreateFontIndirectW orientation angle 208225028.600000 set to escapement angle 134086.000000 for new font 0x1a0d48
    trace:font:CreateFontIndirectW (-11 65592 1340860 2082250286 0 244 df 51 0) L"MS Sans Serif" Italic Underline => 0x1ac0

lfHeight = -11
lfWidth = 65592
lfEscapement = 1340860
lfOrientation = 2082250286
lfPitchAndFamily = 0x0
lfOutPrecision = 244
lfClipPrecision = 0xdf
lfQuality = 51
lfCharSet = 0

These values are completely bogus, somehow Microsoft Win-XP can run this so I'll try inserting a bit of defensive code into CreateFontIndirectW to see if I can protect myself from crashes but in order to do the job properly wine should attempt to handle such problems in a similar manner to however Microsoft does it. I don't have tools to do detailed research unfortunately.

Highly likely this same event was also the cause of:

http://bugs.winehq.org/show_bug.cgi?id=17338