Summary: | Konversation crashes on exit [@ Phonon::PulseSupport::PulseSupport] | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Phonon | Reporter: | Danny Tamez <zematynnad> |
Component: | Pulsesupport | Assignee: | Martin Sandsmark <martin.sandsmark> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | colin, eeeemail, ghstridr, hein, jb, k.koepernik, llbraughler, me, myriam, padraic.dewey, perezmeyer, public.oss, srini_durand, vaksdal, xcmerz |
Priority: | NOR | ||
Version: | 4.6.0 | ||
Target Milestone: | 4.6.1 | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/phonon/dd16b3b22b8b9ed3e9d409a072d3240a9787d99a | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
app to reproduce bug New crash information added by DrKonqi New crash information added by DrKonqi New crash information added by DrKonqi New crash information added by DrKonqi |
Description
Danny Tamez
2012-01-31 23:24:25 UTC
Reassigning to Phonon based on backtrace. Wasn't this supposed to be fixed already? See also https://bugs.kde.org/show_bug.cgi?id=246448#c18 Perhaps the Phonon version is still too old? Danny, can you confirm what version of Phonon you are using? Here's the phonon info:
phonon:
Installed: 4:4.7.0really4.5.0-3ubuntu4
Thanks!
Danny
On Wednesday, February 01, 2012 09:01:58 AM Colin Guthrie wrote:
> https://bugs.kde.org/show_bug.cgi?id=293004
>
>
>
>
>
> --- Comment #3 from Colin Guthrie <colin mageia org> 2012-02-01 09:01:58
> --- Perhaps the Phonon version is still too old? Danny, can you confirm
> what version of Phonon you are using?
So maybe it's due to the same problem as Myriam mentioned... perhaps worth updating to Phonon 4.6? *** Bug 295155 has been marked as a duplicate of this bug. *** Created attachment 70783 [details]
New crash information added by DrKonqi
konversation (1.4) on KDE Platform 4.8.2 (4.8.2) using Qt 4.8.1
Exited Konversation using left hand corner x in Unity. NOT using KDE, so that may or may not be related.
-- Backtrace (Reduced):
#6 0x00007f0a8eec1387 in Phonon::PulseSupport::PulseSupport (this=0x34106c0) at ../../phonon/pulsesupport.cpp:822
#7 0x00007f0a8eec1830 in Phonon::PulseSupport::getInstance () at ../../phonon/pulsesupport.cpp:784
#8 0x00007f0a8ee9a253 in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x2fe5af0, __in_chrg=<optimized out>) at ../../phonon/audiooutput.cpp:543
#9 0x00007f0a8ee9a339 in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x2fe5af0, __in_chrg=<optimized out>) at ../../phonon/audiooutput.cpp:549
#10 0x00007f0a8ee982e3 in Phonon::AbstractAudioOutput::~AbstractAudioOutput (this=0x2fc3f40, __in_chrg=<optimized out>) at ../../phonon/abstractaudiooutput.cpp:38
*** Bug 300542 has been marked as a duplicate of this bug. *** Created attachment 71341 [details]
app to reproduce bug
<apachelogger> PHONON_GLOBAL_STATIC(Phonon::FactoryPrivate, globalFactory) <apachelogger> meaning the frontends should be long gone by the time factoryprivate is destroyed <apachelogger> hm <apachelogger> coling: I know what causes the crash <apachelogger> konvi's Sound object is parented by the QApp <apachelogger> now for some reason QApp's dtor will first cleanup statics and then delete the children <coling> Interesting. <apachelogger> which then leads to a case where the frontend objects (children of qapp) are destroyed after the static privatefactory <apachelogger> coling: why does shutdown not simply clean all stream caches? <apachelogger> once the backend was destroyed the graph is defunct so that it cannot ever output anything anyway <coling> apachelogger, it could, but it shouldn't need to. The reason to do it on AOP destruction is to save building up a massive cache for e.g. amarok or another multi-stream long running app. <apachelogger> hm <apachelogger> well, that reduces options of handling this quite a bit :P <apachelogger> a) protect every usage of getInstance b) destroy (private) frontends in the privatefactory, which is save iff having qapp cleanup the factory before the frontends is indeed the only case this order can appear c) introduce a manual ref count <apachelogger> c) would be such that every class that wants to use PA needs to increment the counter in the ctor and decrease it in the dtor, once 0 PASupport is terminated <apachelogger> suffice to say c is the best but also most expensive approach ;) <apachelogger> actually b might be best overall <apachelogger> the dptr destruction is centralized in medianode *** Bug 306168 has been marked as a duplicate of this bug. *** *** Bug 306956 has been marked as a duplicate of this bug. *** *** Bug 312091 has been marked as a duplicate of this bug. *** Seem to experience this here for a week, maybe. kernel-3.6.11-1.fc16.x86_64 kde-baseapps-4.8.5-1.fc16.x86_64 konversation-1.4-1.fc16.x86_64 phonon-4.6.0-3.fc16.x86_64 As suggested by busher, starting konversation as following prevents the crash (and, yes, sound is still working just fine). $ PHONON_PULSEAUDIO_DISABLE=1 konversation Without this, here are a typical cli message, and followed with a backtrace: (not so useful, sorry, removed all debuginfos, slow link and about to migrate distro release anyway very soon). [user@host ~]$ konversation konversation(6797)/kio (KDirWatch) KDirWatchPrivate::removeEntry: doesn't know "/home/user/.kde/share/apps/kabc" [user@host ~]$ Enchant dict for "en_US" 0x2335d70 (konversation:6797): GStreamer-CRITICAL **: gst_value_set_fraction: assertion `denominator != 0' failed Trying to set an invalid MediaSource -> ignoring. KCrash: Application 'konversation' crashing... KCrash: Attempting to start /usr/libexec/kde4/drkonqi from kdeinit sock_file=/home/user/.kde/socket-host/kdeinit4__0 Application: Konversation (konversation), signal: Segmentation fault Using host libthread_db library "/lib64/libthread_db.so.1". [KCrash Handler] #6 0x00007faec3a44d67 in Phonon::PulseSupport::PulseSupport() () from /usr/lib64/libphonon.so.4 #7 0x00007faec3a45210 in Phonon::PulseSupport::getInstance() () from /usr/lib64/libphonon.so.4 #8 0x00007faec3a1cbf3 in ?? () from /usr/lib64/libphonon.so.4 #9 0x00007faec3a1ccd9 in ?? () from /usr/lib64/libphonon.so.4 #10 0x00007faec3a1ac83 in Phonon::AbstractAudioOutput::~AbstractAudioOutput() () from /usr/lib64/libphonon.so.4 #11 0x00007faec3a20c3f in Phonon::AudioOutput::~AudioOutput() () from /usr/lib64/libphonon.so.4 #12 0x00007faec0a5dd55 in QObjectPrivate::deleteChildren() () from /usr/lib64/libQtCore.so.4 #13 0x00007faec0a641ac in QObject::~QObject() () from /usr/lib64/libQtCore.so.4 #14 0x000000000047b3d9 in _start () ... however resuming from suspend state, a dialogue did pop up, saying sound devices were detected as removed, and asking if they should be permanently deleted from configuration (while all I had done so far, before suspend, was launching Konv once as above from Konsole to verify it was no longer crashing when closing). FWIW when you say that "sound works" when using PHONON_PULSEAUDIO_DISABLE=1, this will be effectively locked to just Konversation as it will end up hogging your sound device and not let other applications access it. Also it will not honour any device preferences you have configured. So all in all it's just a sub-optimal hack. I've not looked at the code for a while, but I think some recent re factoring in phonon might have made things a bit better here. Thanks for your comment and yes, busher had warned too this might happen indeed. I might have to postpone my release migration a little more, so depending on bandwidth, I could provide a better trace. But would it be any useful to you if I do so ? (doubting :p) Created attachment 76742 [details]
New crash information added by DrKonqi
konversation (1.4) on KDE Platform 4.8.5 (4.8.5) using Qt 4.8.4
- What I was doing when the application crashed:
Nothing, just open then close the application as previously
-- Backtrace (Reduced):
#6 0x00007fa48f5f9d67 in Phonon::PulseSupport::PulseSupport (this=0x39c62d0) at /usr/src/debug/phonon-4.6.0/phonon/pulsesupport.cpp:822
#7 0x00007fa48f5fa210 in Phonon::PulseSupport::getInstance () at /usr/src/debug/phonon-4.6.0/phonon/pulsesupport.cpp:784
#8 0x00007fa48f5d1bf3 in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x34e26e0, __in_chrg=<optimized out>) at /usr/src/debug/phonon-4.6.0/phonon/audiooutput.cpp:543
#9 0x00007fa48f5d1cd9 in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x34e26e0, __in_chrg=<optimized out>) at /usr/src/debug/phonon-4.6.0/phonon/audiooutput.cpp:549
#10 0x00007fa48f5cfc83 in Phonon::AbstractAudioOutput::~AbstractAudioOutput (this=0x3588670, __in_chrg=<optimized out>) at /usr/src/debug/phonon-4.6.0/phonon/abstractaudiooutput.cpp:38
Git commit 8ededd84420b397325f7255120d1d97039bc3b8f by Harald Sitter. Committed on 27/01/2013 at 14:47. Pushed by sitter into branch 'master'. manually manage Konversation::Sound (Phonon::AudioOutput) when parenting a phonon audiooutput to a qapplication an access to pulseaudio happens after it was destructed already. qapplication's ctor first destructs q_global_statics and after that deletes children. however in the phonon's factory global static all backend objects (including the root object) are deleted which in turn will shut down the pulseaudio support. at that point from a phonon perspective everything is shut down, except qapplication then goes on to delete its children which then causes headaches. generally speaking this is a problem all phonon frontend objects have, except only the audiooutput does things that will trigger a sigsev. so inside phonon a different workaround needs to be made for some future release. the fact that global statics are deleted before children seems wrong though and perhaps needs addressing within qt. M +2 -1 src/application.cpp http://commits.kde.org/konversation/8ededd84420b397325f7255120d1d97039bc3b8f Created attachment 76861 [details]
New crash information added by DrKonqi
konversation (1.4) on KDE Platform 4.9.4 using Qt 4.8.3
- What I was doing when the application crashed:
Chosing quit from file menu, confirming, then receiving crash notification.
-- Backtrace (Reduced):
#6 0x00007f9a62480942 in Phonon::PulseSupport::PulseSupport (this=0x2239150) at ../../phonon/pulsesupport.cpp:822
#7 0x00007f9a62480d61 in Phonon::PulseSupport::getInstance () at ../../phonon/pulsesupport.cpp:784
#8 0x00007f9a6245bdb3 in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x519a5b0, __in_chrg=<optimized out>) at ../../phonon/audiooutput.cpp:543
#9 0x00007f9a6245be99 in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x519a5b0, __in_chrg=<optimized out>) at ../../phonon/audiooutput.cpp:549
#10 0x00007f9a6245a2b3 in Phonon::AbstractAudioOutput::~AbstractAudioOutput (this=0x392b440, __in_chrg=<optimized out>) at ../../phonon/abstractaudiooutput.cpp:38
*** Bug 314273 has been marked as a duplicate of this bug. *** Created attachment 77905 [details]
New crash information added by DrKonqi
konversation (1.4) on KDE Platform 4.8.5 (4.8.5) using Qt 4.8.1
- What I was doing when the application crashed:
Closed last window of Konversation after /quit to leave IRC server.
Note this only started happening to me in the last few days.
-- Backtrace (Reduced):
#7 0xb72eb0c0 in Phonon::PulseSupport::PulseSupport (this=0x90af458) at ../../phonon/pulsesupport.cpp:822
#8 0xb72eb5d4 in Phonon::PulseSupport::getInstance () at ../../phonon/pulsesupport.cpp:784
#9 0xb72bf78e in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x8d8f968, __in_chrg=<optimized out>) at ../../phonon/audiooutput.cpp:543
#10 0xb72bf892 in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x8d8f968, __in_chrg=<optimized out>) at ../../phonon/audiooutput.cpp:549
#11 0xb72deeed in Phonon::MediaNode::~MediaNode (this=0x895a3f8, __in_chrg=<optimized out>) at ../../phonon/medianode.cpp:57
Created attachment 77936 [details]
New crash information added by DrKonqi
konversation (1.4) on KDE Platform 4.8.5 (4.8.5) using Qt 4.8.1
- What I was doing when the application crashed:
Closed Konversation via top left X button.
-- Backtrace (Reduced):
#6 0x00007fe2b49b7387 in Phonon::PulseSupport::PulseSupport (this=0x2140a60) at ../../phonon/pulsesupport.cpp:822
#7 0x00007fe2b49b7830 in Phonon::PulseSupport::getInstance () at ../../phonon/pulsesupport.cpp:784
#8 0x00007fe2b4990253 in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x1dc2a50, __in_chrg=<optimized out>) at ../../phonon/audiooutput.cpp:543
#9 0x00007fe2b4990339 in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x1dc2a50, __in_chrg=<optimized out>) at ../../phonon/audiooutput.cpp:549
#10 0x00007fe2b498e2e3 in Phonon::AbstractAudioOutput::~AbstractAudioOutput (this=0xf8f7e0, __in_chrg=<optimized out>) at ../../phonon/abstractaudiooutput.cpp:38
*** Bug 317251 has been marked as a duplicate of this bug. *** Git commit dd16b3b22b8b9ed3e9d409a072d3240a9787d99a by Harald Sitter. Committed on 30/09/2013 at 14:43. Pushed by sitter into branch 'master'. Don't crash when trying to create the singleton out of a qapp parented AO rationale: qapp kills q_global_statics (such as our backing object manager thing) BEFORE its own children, when the children then get destructed everything explodes because it tries to create a PASupport which tries to mindlessly access an eventloop that is no longer present and everything explodereds and there be brains and blood all over the place M +6 -0 phonon/pulsesupport.cpp http://commits.kde.org/phonon/dd16b3b22b8b9ed3e9d409a072d3240a9787d99a |