I realize specific questions like this aren't great, but I've spent several days trying to puzzle this out. Hopefully someone here can help.
This python code using PyQt4 causes a segmentation fault:
data = """<?xml version="1.0" ?>
<svg height="1000" width="2000">
<text>blah</text>
</svg>"""
svg = QSvgRenderer(QByteArray(data))
qim = QImage(int(width), int(height), QImage.Format_ARGB32)
painter = QPainter()
painter.begin(qim)
svg.render(painter)
painter.end()
qim.save('test2.png')
The line that causes the fault is svg.render(painter)
.
The fault points at libQtGui.so
(so something in QPainter
or QImage
).
svg.isValid()
returns True
, and qim.isNull()
returns False
.