[PyQt] PyQt 4.5 crash
Phil Thompson
phil at riverbankcomputing.com
Sun Jun 14 14:39:16 BST 2009
On Sun, 14 Jun 2009 13:09:42 +0200, Arve Knudsen <arve.knudsen at gmail.com>
wrote:
> Seems like I'm on a roll right now .. I have a case which crashes PyQt
4.5
> under debug-built Python 2.6 on Ubuntu 9.04 x86-64. The attached script
> contains the case, and backtrace.txt gdb's backtrace output.
>
> The case is extracted from a unit test of mine, and I've simply pasted
code
> from a mock module which it depends on, so there's a lot of cruft in the
> file. What matters is the class "Test", and apparently what triggers the
> crash is its assignment of the variable "_qbase".
>
> It is possible that my QMock class confuses PyQt in some way, but I guess
> it
> shouldn't crash :)
It's not crashing, it's an assertion failure.
It's checking that an attribute with a particular special name is a list
and failing if not. In your test it is a MockCallable instance instead.
I could remove the assertion and just silently ignore anything that is an
unexpected type - but I'm not sure if that breaks your mock object.
Phil
More information about the PyQt
mailing list