[PyKDE] Segault > Bug in pyQT? (Or stupid me?)

Michael Zimmermann mz-list at incunabulum.de
Tue Jan 17 15:09:29 GMT 2006


Hi there,

in a multithreaded application we are currently struggling with 
segfaults at application exit. The segfaults occur after the 
qApp.exec_loop() finishes. Below is the gdb trace done with a complete 
debug environment.

In the application threads (subclassed from QThread; no python threads) 
are used to fetch information from the network in the background. What 
makes me wonder is that if we do not start any additional threads, i. e. 
without network connection, the application works flawlessly. So there 
must be something wrong with the way we handle threads or how threads 
are handled in pyQT

So, is there any explanation for such a behaviour? Or am I just plain 
stupid and do not find the error in my application?

I know, posting a suitable example would be nice. But the size of the 
application makes it really difficult to reduce it to a simple example. 
So, any hints about the reason for this behavior are more than welcome.

Tested with:
python 2.4.2
qt 3.3.5
pyqt 3.15.1
sip 4.3.2
os: linux (ubuntu breezy)


Starting program: /usr/bin/pydebug PyKonsensClient.py
[Thread debugging using libthread_db enabled]
[New Thread -1210915136 (LWP 10807)]
Qt: gdb: -nograb added to command-line options.
          Use the -dograb option to enforce grabbing.
[New Thread -1245946960 (LWP 10868)]
[Thread -1245946960 (LWP 10868) exited]
[New Thread -1254376528 (LWP 10875)]
[Thread -1254376528 (LWP 10875) exited]
[New Thread -1245946960 (LWP 10880)]
[New Thread -1254376528 (LWP 10881)]
[New Thread -1262769232 (LWP 10882)]
[New Thread -1271161936 (LWP 10884)]
[Thread -1245946960 (LWP 10880) exited]
[New Thread -1279820880 (LWP 10889)]
[New Thread -1245946960 (LWP 10890)]
[New Thread -1288213584 (LWP 10891)]
[New Thread -1296606288 (LWP 10892)]
[New Thread -1304998992 (LWP 10893)]
[New Thread -1313391696 (LWP 10894)]
[New Thread -1321784400 (LWP 10895)]
[New Thread -1330177104 (LWP 10896)]
[New Thread -1338569808 (LWP 10897)]
[New Thread -1346962512 (LWP 10898)]
[Thread -1245946960 (LWP 10890) exited]
[Thread -1288213584 (LWP 10891) exited]
[Thread -1271161936 (LWP 10884) exited]
[Thread -1279820880 (LWP 10889) exited]
[Thread -1296606288 (LWP 10892) exited]
[Thread -1304998992 (LWP 10893) exited]
[Thread -1313391696 (LWP 10894) exited]
[Thread -1321784400 (LWP 10895) exited]
[Thread -1330177104 (LWP 10896) exited]
[Thread -1338569808 (LWP 10897) exited]
[Thread -1262769232 (LWP 10882) exited]
[New Thread -1313391696 (LWP 10899)]
[New Thread -1321784400 (LWP 10900)]
[New Thread -1338569808 (LWP 10901)]
[New Thread -1330177104 (LWP 10902)]
[New Thread -1245946960 (LWP 10903)]
[New Thread -1262769232 (LWP 10904)]
[New Thread -1271161936 (LWP 10905)]
[New Thread -1279820880 (LWP 10906)]
[New Thread -1288213584 (LWP 10907)]
[New Thread -1296606288 (LWP 10908)]
[New Thread -1304998992 (LWP 10909)]
[New Thread -1355355216 (LWP 10910)]
[New Thread -1363747920 (LWP 10911)]
[New Thread -1372140624 (LWP 10912)]
[New Thread -1380533328 (LWP 10913)]
[Thread -1304998992 (LWP 10909) exited]
[Thread -1355355216 (LWP 10910) exited]
[Thread -1363747920 (LWP 10911) exited]
[Thread -1372140624 (LWP 10912) exited]
[Thread -1380533328 (LWP 10913) exited]
[Thread -1296606288 (LWP 10908) exited]
[Thread -1346962512 (LWP 10898) exited]
[Thread -1313391696 (LWP 10899) exited]
[Thread -1321784400 (LWP 10900) exited]
[Thread -1338569808 (LWP 10901) exited]
[Thread -1330177104 (LWP 10902) exited]
[Thread -1245946960 (LWP 10903) exited]
[Thread -1262769232 (LWP 10904) exited]
[Thread -1271161936 (LWP 10905) exited]
[Thread -1279820880 (LWP 10906) exited]
[Thread -1288213584 (LWP 10907) exited]
[New Thread -1380533328 (LWP 10914)]
[Thread -1380533328 (LWP 10914) exited]
[New Thread -1372140624 (LWP 10915)]
[New Thread -1380533328 (LWP 10916)]
[New Thread -1363747920 (LWP 10917)]
[Thread -1380533328 (LWP 10916) exited]
[Thread -1363747920 (LWP 10917) exited]
[Thread -1372140624 (LWP 10915) exited]
[New Thread -1363747920 (LWP 10918)]
[New Thread -1380533328 (LWP 10919)]
[New Thread -1372140624 (LWP 10920)]
[New Thread -1296606288 (LWP 10921)]
[New Thread -1245946960 (LWP 10922)]
[New Thread -1262769232 (LWP 10923)]
[New Thread -1271161936 (LWP 10924)]
[New Thread -1279820880 (LWP 10925)]
[New Thread -1288213584 (LWP 10926)]
[New Thread -1304998992 (LWP 10927)]
[Thread -1372140624 (LWP 10920) exited]
[Thread -1296606288 (LWP 10921) exited]
[Thread -1262769232 (LWP 10923) exited]
[Thread -1271161936 (LWP 10924) exited]
[Thread -1279820880 (LWP 10925) exited]
[Thread -1288213584 (LWP 10926) exited]
[Thread -1254376528 (LWP 10881) exited]
[Thread -1363747920 (LWP 10918) exited]
[Thread -1380533328 (LWP 10919) exited]
[Thread -1245946960 (LWP 10922) exited]
[New Thread -1288213584 (LWP 10928)]
[Thread -1304998992 (LWP 10927) exited]
[Thread -1288213584 (LWP 10928) exited]
[New Thread -1288213584 (LWP 10929)]
[Thread -1288213584 (LWP 10929) exited]
[New Thread -1288213584 (LWP 10930)]
[Thread -1288213584 (LWP 10930) exited]
[New Thread -1288213584 (LWP 10931)]
[Thread -1288213584 (LWP 10931) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210915136 (LWP 10807)]
0x080885e2 in _Py_ForgetReference (op=0xb61811ec) at Objects/object.c:1847
1847    in Objects/object.c
(gdb)
-- 
cu,
    Michael

---------------------------
|  mz-list at incunabulum.de |
--------------------------





More information about the PyQt mailing list