I have WindowInput class which accepts InputListener derived classes to report user input in my C++ MJIN ("game engine") library. I provide MJIN in Python with SWIG.
When input comes, WindowInput invokes InputListener::onWindowInput(). It worked perfectly fine until I included PyQt4 library. After that it just segfaults, although I changed nothing with respect to input handling. And it only crashes in input handling, not anywhere else, so that's not PyQt4 (at least directly) related problem. The display is just fine. The only problem is when onWindowInput is called on the Python listener.

My Test class is derived from InputListener: http://goo.gl/OFPR13#cl-226
It's initialized as such here: http://goo.gl/OFPR13#cl-283 (calling InputListener(self) results in the error of incorrect number of arguments)
Python's onWindowInput that can't be reached: http://goo.gl/OFPR13#cl-342

gdb stracktrace: http://pastie.org/pastes/9307218/text

Can anyone tell me what I'm doing wrong?