Memory corruption in kfontdialog?

Dave Corrie kde at davecorrie.com
Wed Jul 31 21:59:25 BST 2002


Hi,

When I do "kcmshell fonts" to edit my fonts and go to change a font that 
has a bold + italic style, the font chooser dialog does not always 
choose "Bold Italic" as the initial style. Editing a bold italic Arial 
font sometimes works, but editing a bold italic Trebuchet font never 
seems to (although this phenomena is not restricted to MS fonts).

I stepped through the kfontdialog code to figure out what was going on, 
because the font dialog is passed the correct font to show initially, 
it just doesn't always show it. With the attached patch applied (it 
just adds some output info), the style of the font "magically" changes 
after the (seemingly unrelated) call to setCurrentItem().

I presume there's some sort of pointer abuse going, but I don't see 
anything relevant in the valgrind output. I fixed some uninitialised 
variables in the kfontdialog code, but this made no difference. Can 
anyone see the problem?

-- 
Dave



-------------- next part --------------
A non-text attachment was scrubbed...
Name: fontdebug.patch
Type: text/x-diff
Size: 906 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20020731/557cc91e/attachment.patch>


More information about the kde-core-devel mailing list