[Kde-bindings] [Bug 217492] Python plasmoid crashes on exit when calling "time.sleep(1)" on a secondary thread (QThread was also used)

nik nik at netstyle.ch
Mon Dec 28 02:54:27 UTC 2009


https://bugs.kde.org/show_bug.cgi?id=217492


nik <nik at netstyle.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nik at netstyle.ch




--- Comment #4 from nik <nik netstyle ch>  2009-12-28 03:52:44 ---
I have a very similar problem with my plasmoid :

#5  0x00007f5d50dcdc3d in PySys_GetObject (name=0x7f5d50e3d377 "exitfunc") at
../Python/sysmodule.c:53

I can remove the applet from plasmoidviewer (or plasma-desktop) without a
problem, but when plasmoidviewer or plasma-desktop exits I get the crash.

If you have any hint/idea please help me - I already spent hours on that..

What I do in the code:
1. load a library via ctypes (pulseaudio library)
2. install a callback function (to get notified by state-changes of pulseaudio)
3. start an external thread that "runs inside the library"
OnExit: I stop that external thread and do the required cleanup 

- When I call sys.exit(0) inside my code plasmoidviewer exits without a crash
(bot I don't want plasma-desktop to exit when I remove the plasmoid).
- When I do not set a callback function, I get no crash
---

Is this a threading problem? Maybe ctypes starts a thread for the callback
function? Whats the relation between PySys_GetObject("exitfunc") and threads?


the plasmoid: http://www.kde-look.org/content/show.php/?content=116676

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Kde-bindings mailing list