简体   繁体   English

调用CGPathAddArc时PyQt4 / Qt中止陷阱的原因是什么?

[英]What is cause of PyQt4/Qt abort trap when calling CGPathAddArc?

After upgrading to Mavericks, with PyQt 4.10.4, Qt 4.8.5, python 2.7.5, I was trying to rebuild a PyQt application and encountered the following abort trap: 升级到Mavericks后,使用PyQt 4.10.4,Qt 4.8.5,python 2.7.5,我试图重建PyQt应用程序并遇到以下中止陷阱:

Assertion failed: (CGFloatIsValid(x) && CGFloatIsValid(y)), function void CGPathAddArc(CGMutablePathRef, const CGAffineTransform *, CGFloat, CGFloat, CGFloat, CGFloat, CGFloat, bool), file Paths/CGPath.cc, line 279.
Abort trap: 6

This is issue reflects that CGPathAddArc on Mavericks rejects NaN values from Qt (which on Snow Leopard it used to tolerate/warn about). 这个问题反映出Mavericks上的CGPathAddArc拒绝来自Qt的NaN值(在Snow Leopard上它曾经容忍/警告过)。 There is a patch that looks good, but applying it requires rebuilding Qt and PyQt, and I wasn't able to get it to work for me. 有一个看起来很好的补丁 ,但应用它需要重建Qt和PyQt,我无法让它为我工作。

faultHandler gives no details, and runsnake yields no output since the app terminates abnormally. faultHandler没有提供任何细节,并且由于应用程序异常终止,runsnake不会产生任何输出。

It's obviously a UI element, but how do I find which one? 它显然是一个UI元素,但我如何找到哪一个?

Culprit was a QGraphicsEllipseItem() declared with no parameters. Culprit是一个没有参数声明的QGraphicsEllipseItem()。 Qt 4.8 documentation suggests no params is a valid constructor, but apparently in Mavericks this is not the case. Qt 4.8文档表明没有params是一个有效的构造函数,但显然在Mavericks中并非如此。

Declaring the QGraphicsEllipseItem with dummy x and y parameters resolved the issue. 使用虚拟x和y参数声明QGraphicsEllipseItem解决了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM