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

David Edmundson <k...@davidedmundson.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED
      Latest Commit|                            |http://commits.kde.org/plas
                   |                            |ma-pa/f143312e3bb427fe3a31a
                   |                            |e1095db4410656b749e

--- Comment #3 from David Edmundson <k...@davidedmundson.co.uk> ---
Git commit f143312e3bb427fe3a31ae1095db4410656b749e by David Edmundson.
Committed on 21/10/2016 at 13:49.
Pushed by davidedmundson into branch 'Plasma/5.8'.

Fix crash in application shutdown (alternate fix)

Summary:

We have a SourceModel that inherits from AbastractModel
AbastractModel inherits from both QObject and Ref.

When we call the destructor of Ref, that kills the
Pulseaudio::context that emits that the default source has changed
during it's teardown.

Because the QObject destructor hasn't run yet, our signals are still
attached; however they refer to data from SourceModel which we've
already run the destructor on - hence crash.

This patch does the ref counting in an alternate way, destroying
the PA Context after our model has disconnected all the
signals, like it would be if the context was a child of the model.

Test Plan:
ran  kquitapp5 plasmashell a lot, everything still seems fine.

I couldn't recreate the original crash, it requires
multiple outputs being deleted in the wrong order, which I
don't happen to have.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3124

M  +0    -1    src/CMakeLists.txt
M  +12   -0    src/pulseaudio.cpp
M  +3    -2    src/pulseaudio.h
D  +0    -46   src/ref.cpp
D  +0    -54   src/ref.h

http://commits.kde.org/plasma-pa/f143312e3bb427fe3a31ae1095db4410656b749e

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to