[Qt-interest] Problem with Qt QWS font bitmap caching among multiple processes.
Atlant Schmidt
aschmidt at dekaresearch.com
Thu Mar 17 21:32:45 CET 2011
Folks:
We're having a problem with font corruption in our Qt / QWS / Embedded
Linux environment. We've diagnosed it, but haven't corrected it yet.
Executive summary:
We have multiple processes sharing a single QWS instance (as you'd
expect). They also share .qsf cached font bitmap files in the /tmp
directory. When Process A expands a cached bitmap file, Process B
may try to use one of the new characters (because it sees from the
QPF glyph index that the glyph has now been rendered) but Process B
hasn't yet expanded its mmap'ed window into the .qsf file. As a result,
Process B either copies garbage (if there's additional accessible
mmap'ed space immediately beyond that window) or SEGVs (if
there's no mapped space immediately beyond that window).
This is with Qt 4.6.2. (4.6.3 was current when we froze our specs but it
had a different font problems that I've previously mentioned here.)
Does anyone recognize this problem? And better yet, know of a patch
that fixes it? Or can say with certainty that it's fixed in a newer version
of Qt?
A few more details:
[cid:image001.gif at 01CBE4C0.F25D5DD0] [cid:image004.gif at 01CBE4C0.896766E0]
Here's a "2" character in Luxi Sans 40-pixel bold font in both the
correct and typically-corrupted state. The grey stuff in the middle
of that "2" is actually the QPF2 header of the next .qsf file in
virtual memory. If you read the bytes of the grey stuff, the
printable bytes are:
"QPF2 ... Luxi Sans ... /usr/lib/fonts/luxisr.ttf".
Various characters in various fonts can get corrupted but it always
has to be a character whose position in the .qsf file causes it to
span two pages in virtual memory. Because we never get entire
characters corrupted, I'm supposing that Qt apparently does the
right thing (unmmaps and remmaps the file) if the starting address
of the character in the QPF2 glyph map is beyond the currently-
mapped memory; it only fouls up if the character starts in the
currently-mapped memory and "runs over" into memory that
doesn't belong to that .qsf file.
Atlant
________________________________
This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.
Thank you.
Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110317/69a4b0ba/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.gif
Type: image/gif
Size: 3803 bytes
Desc: image004.gif
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110317/69a4b0ba/attachment.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 2750 bytes
Desc: image001.gif
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110317/69a4b0ba/attachment-0001.gif
More information about the Qt-interest-old
mailing list