[PyQt] Segfault when creating adding text to a QPainterPath
Giovanni Bajo
rasky at develer.com
Wed Jul 11 18:34:46 BST 2007
On 7/11/2007 8:31 PM, Ricard Marxer wrote:
>> Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
>> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>
>>>>> from PyQt4.QtCore import *
>>>>> from PyQt4.QtGui import *
>>>>> qVersion()
>> '4.2.3'
>>
>>>>> p = QPainterPath()
>>>>> p.addText(QPointF(0,0),QFont('Times',10),QString('a'))
>> Segmentation fault (core dumped)
> Is this a PyQt bug? a Qt bug? or most probably my bug?
Before the crash I get this message:
QFontDatabase::load: Must construct QApplication first
which means that my version of Qt has debug messages activated. You
might want to look into this.
The segfault has this traceback:
_qt.pyd!QMap<QFontCache::Key,QFontEngineData *>::findNode(const
QFontCache::Key & akey={...}) Line 399 + 0x3 C++
_qt.pyd!QMap<QFontCache::Key,QFontEngineData *>::find(const
QFontCache::Key & akey={...}) Line 524 + 0xc C++
_qt.pyd!QFontCache::findEngineData(const QFontCache::Key & key={...})
Line 2301 C++
_qt.pyd!getEngineData(const QFontPrivate * d=0x09898a38, const
QFontCache::Key & key={...}) Line 789 + 0xf C++
_qt.pyd!QFontDatabase::load(const QFontPrivate * d=0x09898a38, int
script=0x00000000) Line 982 + 0xd C++
_qt.pyd!QFontPrivate::engineForScript(int script=0x00000000) Line
145 + 0xd C++
> _qt.pyd!QTextEngine::fontEngine(const QScriptItem & si={...}, QFixed
* ascent=0x098988f4, QFixed * descent=0x098988f0) Line 1241 + 0xf C++
_qt.pyd!QTextEngine::shapeText(int item=0x00000000) Line 530 + 0x1d C++
_qt.pyd!QTextEngine::shape(int item=0x00000000) Line 961 C++
_qt.pyd!QTextLine::layout_helper(int maxGlyphs=0x7fffffff) Line 1547 C++
_qt.pyd!QTextLine::setNumColumns(int numColumns=0x7fffffff) Line
1419 C++
_qt.pyd!QTextLayout::endLayout() Line 608 C++
_qt.pyd!QPainterPath::addText(const QPointF & point={...}, const
QFont & f={...}, const QString & text={...}) Line 1111 C++
_qt.pyd!meth_QPainterPath_addText(_object * sipSelf=0x008c4780,
_object * sipArgs=0x008dcfa8) + 0x9a C++
python24.dll!PyCFunction_Call(_object * func=0x008ff3a0, _object *
arg=0x008dcfa8, _object * kw=0x00000000) Line 73 + 0x8 C
python24.dll!call_function(_object * * * pp_stack=0x0021fdf8, int
oparg=0x00000008) Line 3558 + 0x8f C
python24.dll!PyEval_EvalFrame(_frame * f=0x008ae0f8) Line 2166 C
python24.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x09842020, _object
* globals=0x00879ae0, _object * locals=0x00879ae0, _object * *
args=0x00000000, int argcount=0x00000000, _object * * kws=0x00000000,
int kwcount=0x00000000, _object * * defs=0x00000000, int
defcount=0x00000000, _object * closure=0x00000000) Line 2736 + 0x6 C
So it looks like it has nothing to do with PyQt. You may want to report
this to the Trolltech guys.
--
Giovanni Bajo
More information about the PyQt
mailing list