Bug 406534 - KWin freezes when running this simple script
Summary: KWin freezes when running this simple script
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: scripting (show other bugs)
Version: 5.15.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-14 16:30 UTC by trmdi
Modified: 2019-04-15 08:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace (7.27 KB, text/plain)
2019-04-15 03:07 UTC, trmdi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description trmdi 2019-04-14 16:30:41 UTC
KWin freezes when running this simple script then close any window.
I don't know if there is something wrong with my script.

STEPS TO REPRODUCE
1. Install this simple script: https://github.com/trmdi/test
2. Open a new window, the sound is played as expected.
3. Close a window.

OBSERVED RESULT
KWin freezes.

EXPECTED RESULT
The window is closed and the sound is played without making KWin freeze.
Comment 1 Martin Flöser 2019-04-14 18:40:08 UTC
Please attach gdb and get a backtrace of the freeze.
Comment 2 trmdi 2019-04-15 03:07:26 UTC
Created attachment 119413 [details]
Backtrace

Sometimes kwin does not freeze, but 99% it freezes.
Comment 3 Martin Flöser 2019-04-15 06:48:36 UTC
Freeze is triggered from Qt Multimedia. Nothing we can do. I recommend to not play the sound in KWin, but pass it to another application through dbus.
Comment 4 trmdi 2019-04-15 06:58:48 UTC
(In reply to Martin Flöser from comment #3)
> Freeze is triggered from Qt Multimedia. Nothing we can do. I recommend to
> not play the sound in KWin, but pass it to another application through dbus.

Thanks for your reply! :)

I just tag @davidedmundson here, in case he wants to do something in the Qt side.
Comment 5 David Edmundson 2019-04-15 08:02:03 UTC
I get kwin bug reports directly, no need to add me.

X is deadlocked as we're creating new connections whilst handling an X client removed. I wouldn't say it's a Qt bug, sorry. 

Pulseaudio from within kwin must normally work as the knotifications backend is in process. So adding Qt.callLater() might suffice.

But as MF says, passing to another process would be better.