PDA

View Full Version : QSvgRenderer crash



franki
20th June 2012, 14:36
Hi all.

I have encountered an svg icon that is crashing my application, however icon is properly visible under any image viewer.
When application is crashing it gives little information about what may caused it to crash, I have prepared an example which does as follow:
load svg icon into QGraphicsSvgItem, set scale of the item, and then render this item on QImage as a test.png file.
Project is attached, you can simply start it in QtCreator.
Can someone point me what can be wrong with this icon, or maybe there is a bug in QtSVG ? I'm using Qt 4.7.3 on Linux machine.
Output from debugger is:

Thread 1 (Thread 0xb62c0710 (LWP 8531)):
#0 0xb6a78c6f in ?? () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtGui.so.4
No symbol table info available.
#1 0xb6a7990f in ?? () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtGui.so.4
No symbol table info available.
#2 0xb6a7fd82 in QFontDatabase::load(QFontPrivate const*, int) () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtGui.so.4
No symbol table info available.
#3 0xb6a57615 in QFontPrivate::engineForScript(int) const () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtGui.so.4
No symbol table info available.
#4 0xb6a953d6 in ?? () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtGui.so.4
No symbol table info available.
#5 0xb6aa3395 in QTextLine::layout_helper(int) () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtGui.so.4
No symbol table info available.
#6 0xb6aa4fa0 in QTextLine::setNumColumns(int) () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtGui.so.4
No symbol table info available.
#7 0xb6aa5103 in QTextLayout::createLine() () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtGui.so.4
No symbol table info available.
#8 0xb7785082 in ?? () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtSvg.so.4
No symbol table info available.
#9 0xb77a77f3 in ?? () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtSvg.so.4
No symbol table info available.
#10 0xb77a77f3 in ?? () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtSvg.so.4
No symbol table info available.
#11 0xb77aed53 in QSvgTinyDocument::draw(QPainter*, QRectF const&) () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtSvg.so.4
No symbol table info available.
#12 0xb77aee29 in QSvgTinyDocument::draw(QPainter*) () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtSvg.so.4
No symbol table info available.
#13 0xb77b0efe in QSvgRenderer::render(QPainter*) () from /home/franki/QtSDK/Desktop/Qt/473/gcc/lib/libQtSvg.so.4
No symbol table info available.
#14 0x080493da in main (argc=1, argv=0xbffa4684) at main.cpp:30
a = <incomplete type>
itemRenderer = 0x9205ca0
scale = 0.69999999999999996
size = {wd = 100, ht = 100}
svgFileName = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 235}, alloc = 0, size = 0, data = 0x804b3e6, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 1}, alloc = 0, size = 0, data = 0xb7772132, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x92057b0, static codecForCStrings = 0x0}
img = 0x9205ea8
pai = 0x92168b8
item = 0x91fcb28
args = {<QList<QString>> = {{p = {static shared_null = {ref = {_q_value = 263}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x91fcaf8}, d = 0x91fcaf8}}, <No data fields>}
outFile = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 235}, alloc = 0, size = 0, data = 0x804b3e6, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 1}, alloc = 0, size = 0, data = 0xb7772132, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x920e7f8, static codecForCStrings = 0x0}
result = 8

Best Regards
Marek