[PyKDE] seg fault on different 'from qt import <x>'
Patrick Stinson
ajole-1 at gci.net
Thu Dec 11 23:44:01 GMT 2003
In using my own C++ library, I get seg faults when my main script does
from qt import QApplication
instead of
from qt import *
INFO:
I am writing a qt-ish syntaxed audio library in C++ using sip and am using WAD
for stack traces. I noticed that some of my code runs a bit slower (judging
by some stdout output) when I use the second method above. This execution lag
could very well be preventing a thread-related bug in my code from surfacing.
The results are very consistent\ regarding seg-faults and import methods.
I'm failry sure that my code has thread-related bugs, but I'm looking for
comments as to why the import code would cause the error, how 'import' works
in this case, etc.
stack trace:
-----------------------------------------------
pkaudio: Disconnected RtAudio Output[Main Input] - from - Global Mixer[Main
Output]
[38542 refs]
pkaudio: PK: deregistering module: Global Mixer
Fatal Python error: PyEval_RestoreThread: NULL tstate
WAD: Collecting debugging information...
WAD: Abort.
#19 0x08054ca1 in ?()
#18 0x40173914 in __libc_start_main()
#17 0x401896a0 in __GI_exit()
#16 0x41b25b09 in __tcf_1()
#15 0x41b19635 in _ZN2PK6EngineD1Ev()
#14 0x41b206fb in _ZN2PK5MixerD0Ev()
#13 0x41b21838 in _ZN2PK6ModuleD2Ev()
#12 0x41b265df in _ZN2PK11PassivePortD0Ev()
#11 0x41b25d57 in _ZN2PK4PortD2Ev()
#10 0x41b26279 in _ZN2PK4Port10DisconnectEv()
#9 0x41b26395 in _ZN2PK4Port10DisconnectEv()
#8 0x41b4d1d0 in _ZN15sipPK_PanEffect12DisconnectedEPN2PK4PortE()
#7 0x4001fb64 in sipIsPyMethod()
#6 0x4001b8c2 in sipBlockThreads()
#5 0x080b9c92 in PyEval_RestoreThread()
#4 0x080e838b in Py_AtExit()
#3 0x401885fb in __GI_abort()
#2 0x40187094 in __GI_raise()
#1 0x4003386b in __pthread_raise()
#0 0x401872e1 in __kill()
bash-2.05b$
------------------------------------------------------------
stack trace info:
'pkaudio: ... ' is my C++ code
'[38542 refs]' is python spitting debugging output after deleting something
' ... _ZN2PK... ' are my C++ destructors and misc methods.
the stack trace always looks the same with this problem, and the seg fault is
always reproduced by importing only QApplication from qt.
cheers!
-P
More information about the PyQt
mailing list