[QtMoko] new theme: MokoFaen - segfault

Gilles Filippini pini at debian.org
Tue Dec 20 00:23:18 CET 2011


Hi,

Joif a écrit , Le 12/12/2011 11:54:
> Hi people
> There is a new theme that I worked on: MokoFaen.
> It is the continuation of the work done on Faenqo/Faenqomod and it is
> inspired, in part, from the today smartphone GUIs (just to not say that...
> it shamelessly copies them ;) ).
[cut]

While trying to build a whole qtmoko Debian package including this new
theme I experienced segfaults with two SVG files:

* etc/themes/mokofaen/pics/system/datebook/noalarm.svg
* etc/themes/mokofaen/pics/system/profileedit/Note.svg

They occur during the install process (qbuild image) when converting the
SVG files to QPicture files (.pic).

See below the trace from valgrind with the Note.svg file.

Since it seems related to fonts handling and there should be no need
for text in these images, I've removed the <text>...</text> tags from
both files. Then the svgtopicture conversion went smoothly.

Note that there is the very same problem in the faenqomod with both images.

Attached is a patch for both themes.

Thanks,

_g.


pbuilder at pinizbox:~/build/etc/themes/mokofaen$ valgrind --num-callers=30
../../../sdk/bin/svgtopicture
/tmp/buildd/qtmoko-37/etc/themes/mokofaen/pics/system/profileedit/Note.svg
/tmp/buildd/build/image/pics/themes/mokofaen/profileedit/Note.pic
==11595== Memcheck, a memory error detector
==11595== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==11595== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==11595== Command: ../../../sdk/bin/svgtopicture
/tmp/buildd/qtmoko-37/etc/themes/mokofaen/pics/system/profileedit/Note.svg
/tmp/buildd/build/image/pics/themes/mokofaen/profileedit/Note.pic
==11595==
==11595== Invalid read of size 8
==11595==    at 0x66ED073: XListFonts (in
/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==11595==    by 0x549FF5E: loadXlfds(char const*, int)
(qfontdatabase_x11.cpp:626)
==11595==    by 0x54A0552: load(QString const&, int)
(qfontdatabase_x11.cpp:1237)
==11595==    by 0x54A2286: match(int, QFontDef const&, QString const&,
QString const&, int, QtFontDesc*, QList<int> const&)
(qfontdatabase.cpp:1188)
==11595==    by 0x54A0B03: QFontDatabase::loadXlfd(int, int, QFontDef
const&, int) (qfontdatabase_x11.cpp:1787)
==11595==    by 0x54A16B7: QFontDatabase::load(QFontPrivate const*, int)
(qfontdatabase_x11.cpp:1930)
==11595==    by 0x5480065: QFontPrivate::engineForScript(int) const
(qfont.cpp:265)
==11595==    by 0x54BE1EA: QTextEngine::fontEngine(QScriptItem const&,
QFixed*, QFixed*) const (qtextengine.cpp:1749)
==11595==    by 0x54BB1E5: QTextEngine::shapeTextWithHarfbuzz(int) const
(qtextengine.cpp:1122)
==11595==    by 0x54BAC6B: QTextEngine::shapeText(int) const
(qtextengine.cpp:874)
==11595==    by 0x54BC536: QTextEngine::shape(int) const
(qtextengine.cpp:1356)
==11595==    by 0x54C9999: QTextLine::layout_helper(int)
(qtextlayout.cpp:1676)
==11595==    by 0x54C92DD: QTextLine::setNumColumns(int)
(qtextlayout.cpp:1566)
==11595==    by 0x54C61B9: QTextLayout::createLine() (qtextlayout.cpp:764)
==11595==    by 0x4E45E40: QSvgText::draw(QPainter*, QSvgExtraStates&)
(qsvggraphics.cpp:342)
==11595==    by 0x4E6ACF0: QSvgG::draw(QPainter*, QSvgExtraStates&)
(qsvgstructure.cpp:75)
==11595==    by 0x4E725CE: QSvgTinyDocument::draw(QPainter*, QRectF
const&) (qsvgtinydocument.cpp:248)
==11595==    by 0x4E72BD4: QSvgTinyDocument::draw(QPainter*)
(qsvgtinydocument.cpp:356)
==11595==    by 0x4E74887: QSvgRenderer::render(QPainter*)
(qsvgrenderer.cpp:379)
==11595==    by 0x40138F: main (in /tmp/buildd/build/sdk/bin/svgtopicture)
==11595==  Address 0x968 is not stack'd, malloc'd or (recently) free'd
==11595==
==11595==
==11595== Process terminating with default action of signal 11 (SIGSEGV)
==11595==  Access not within mapped region at address 0x968
==11595==    at 0x66ED073: XListFonts (in
/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==11595==    by 0x549FF5E: loadXlfds(char const*, int)
(qfontdatabase_x11.cpp:626)
==11595==    by 0x54A0552: load(QString const&, int)
(qfontdatabase_x11.cpp:1237)
==11595==    by 0x54A2286: match(int, QFontDef const&, QString const&,
QString const&, int, QtFontDesc*, QList<int> const&)
(qfontdatabase.cpp:1188)
==11595==    by 0x54A0B03: QFontDatabase::loadXlfd(int, int, QFontDef
const&, int) (qfontdatabase_x11.cpp:1787)
==11595==    by 0x54A16B7: QFontDatabase::load(QFontPrivate const*, int)
(qfontdatabase_x11.cpp:1930)
==11595==    by 0x5480065: QFontPrivate::engineForScript(int) const
(qfont.cpp:265)
==11595==    by 0x54BE1EA: QTextEngine::fontEngine(QScriptItem const&,
QFixed*, QFixed*) const (qtextengine.cpp:1749)
==11595==    by 0x54BB1E5: QTextEngine::shapeTextWithHarfbuzz(int) const
(qtextengine.cpp:1122)
==11595==    by 0x54BAC6B: QTextEngine::shapeText(int) const
(qtextengine.cpp:874)
==11595==    by 0x54BC536: QTextEngine::shape(int) const
(qtextengine.cpp:1356)
==11595==    by 0x54C9999: QTextLine::layout_helper(int)
(qtextlayout.cpp:1676)
==11595==    by 0x54C92DD: QTextLine::setNumColumns(int)
(qtextlayout.cpp:1566)
==11595==    by 0x54C61B9: QTextLayout::createLine() (qtextlayout.cpp:764)
==11595==    by 0x4E45E40: QSvgText::draw(QPainter*, QSvgExtraStates&)
(qsvggraphics.cpp:342)
==11595==    by 0x4E6ACF0: QSvgG::draw(QPainter*, QSvgExtraStates&)
(qsvgstructure.cpp:75)
==11595==    by 0x4E725CE: QSvgTinyDocument::draw(QPainter*, QRectF
const&) (qsvgtinydocument.cpp:248)
==11595==    by 0x4E72BD4: QSvgTinyDocument::draw(QPainter*)
(qsvgtinydocument.cpp:356)
==11595==    by 0x4E74887: QSvgRenderer::render(QPainter*)
(qsvgrenderer.cpp:379)
==11595==    by 0x40138F: main (in /tmp/buildd/build/sdk/bin/svgtopicture)
==11595==  If you believe this happened as a result of a stack
==11595==  overflow in your program's main thread (unlikely but
==11595==  possible), you can try to increase the size of the
==11595==  main thread stack using the --main-stacksize= flag.
==11595==  The main thread stack size used in this run was 8388608.
==11595==
==11595== HEAP SUMMARY:
==11595==     in use at exit: 194,723 bytes in 919 blocks
==11595==   total heap usage: 4,030 allocs, 3,111 frees, 796,430 bytes
allocated
==11595==
==11595== LEAK SUMMARY:
==11595==    definitely lost: 0 bytes in 0 blocks
==11595==    indirectly lost: 0 bytes in 0 blocks
==11595==      possibly lost: 44,189 bytes in 26 blocks
==11595==    still reachable: 150,534 bytes in 893 blocks
==11595==         suppressed: 0 bytes in 0 blocks
==11595== Rerun with --leak-check=full to see details of leaked memory
==11595==
==11595== For counts of detected and suppressed errors, rerun with: -v
==11595== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 4)
Segmentation fault


-------------- next part --------------
A non-text attachment was scrubbed...
Name: faen-svg.patch
Type: text/x-patch
Size: 4793 bytes
Desc: not available
URL: <http://lists.openmoko.org/pipermail/community/attachments/20111220/8ab25b06/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openmoko.org/pipermail/community/attachments/20111220/8ab25b06/attachment.pgp>


More information about the community mailing list