Bug 276040

Summary: kalarm crashed after changing an audio alarm and closing the kalarm window
Product: [Frameworks and Libraries] Phonon Reporter: p92
Component: generalAssignee: Harald Sitter <sitter>
Status: RESOLVED DUPLICATE    
Severity: crash CC: djarvie, martin.sandsmark, myriam
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description p92 2011-06-19 12:27:42 UTC
Application: kalarm (2.4.10)
KDE Platform Version: 4.6.4 (4.6.4)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-02063802-generic x86_64
Distribution: Ubuntu 11.04

-- Information about the crash:
- What I was doing when the application crashed:
I changed an alarm in kalarm
did a test alarm
closed the test alarm window
closed the kalarm main window
==> kalarm crashed

-- Backtrace:
Application: KAlarm (kalarm), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fb68c2bb7a0 (LWP 5408))]

Thread 3 (Thread 0x7fb66e643700 (LWP 3825)):
#0  0x00007fb6831e0d9d in __pthread_mutex_unlock_usercnt (mutex=0xf0e468) at pthread_mutex_unlock.c:52
#1  __pthread_mutex_unlock (mutex=0xf0e468) at pthread_mutex_unlock.c:290
#2  0x00007fb6809990f8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb680999639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fb68869a446 in QEventDispatcherGlib::processEvents (this=0xeb09f0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007fb68866e882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fb68866eabc in QEventLoop::exec (this=0x7fb66e642db0, flags=...) at kernel/qeventloop.cpp:201
#7  0x00007fb688585924 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:492
#8  0x00007fb688650c2f in QInotifyFileSystemWatcherEngine::run (this=0xf0bce0) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007fb688588175 in QThreadPrivate::start (arg=0xf0bce0) at thread/qthread_unix.cpp:320
#10 0x00007fb6831dcd8c in start_thread (arg=0x7fb66e643700) at pthread_create.c:304
#11 0x00007fb6872c304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fb6348d1700 (LWP 4903)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb66c72fa30 in ?? () from /usr/lib/libvlccore.so.4
#2  0x00007fb6831dcd8c in start_thread (arg=0x7fb6348d1700) at pthread_create.c:304
#3  0x00007fb6872c304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fb68c2bb7a0 (LWP 5408)):
[KCrash Handler]
#6  0x00007fb6889e4aab in QDBusAdaptorConnector::relaySlot (this=0x115a130, argv=0x7fff4e385b40) at qdbusabstractadaptor.cpp:270
#7  0x00007fb6889e4de5 in QDBusAdaptorConnector::qt_metacall (this=0x115a130, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff4e385b40) at qdbusabstractadaptor.cpp:366
#8  0x00007fb6886845f8 in QMetaObject::activate (sender=0x115a000, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3287
#9  0x00007fb68ab4cee3 in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x115a160, __in_chrg=<value optimized out>) at ../../phonon/audiooutput.cpp:542
#10 0x00007fb68ab4cf99 in Phonon::AudioOutputPrivate::~AudioOutputPrivate (this=0x115a160, __in_chrg=<value optimized out>) at ../../phonon/audiooutput.cpp:545
#11 0x00007fb68ab4b023 in Phonon::AbstractAudioOutput::~AbstractAudioOutput (this=0x10d6700, __in_chrg=<value optimized out>) at ../../phonon/abstractaudiooutput.cpp:38
#12 0x00007fb68ab508ff in ~AudioOutput (this=0x10d6700, __in_chrg=<value optimized out>) at ../../phonon/audiooutput.h:51
#13 Phonon::AudioOutput::~AudioOutput (this=0x10d6700, __in_chrg=<value optimized out>) at ../../phonon/audiooutput.h:51
#14 0x00007fb688681c14 in QObjectPrivate::deleteChildren (this=0x131a1c0) at kernel/qobject.cpp:1964
#15 0x00007fb6886865f4 in QObject::~QObject (this=0xec4ac0, __in_chrg=<value optimized out>) at kernel/qobject.cpp:946
#16 0x00007fb68ab63569 in Phonon::MediaObject::~MediaObject (this=0xec4ac0, __in_chrg=<value optimized out>) at ../../phonon/mediaobject.cpp:76
#17 0x0000000000498472 in AudioThread::~AudioThread (this=0x1314820, __in_chrg=<value optimized out>) at ../../kalarm/messagewin.cpp:1437
#18 0x0000000000498519 in AudioThread::~AudioThread (this=0x1314820, __in_chrg=<value optimized out>) at ../../kalarm/messagewin.cpp:1439
#19 0x00007fb688681c14 in QObjectPrivate::deleteChildren (this=0x1128f60) at kernel/qobject.cpp:1964
#20 0x00007fb687a7cee2 in QWidget::~QWidget (this=0x10ceb00, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1631
#21 0x00007fb6893eca85 in KMainWindow::~KMainWindow (this=0x10ceb00, __in_chrg=<value optimized out>) at ../../kdeui/widgets/kmainwindow.cpp:467
#22 0x00000000004a0e20 in ~MainWindowBase (this=0x10ceb00, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at ./../../kalarm/mainwindowbase.h:37
#23 MessageWin::~MessageWin (this=0x10ceb00, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at ../../kalarm/messagewin.cpp:361
#24 0x00000000004a0f19 in MessageWin::~MessageWin (this=0x10ceb00, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at ../../kalarm/messagewin.cpp:375
#25 0x00007fb6886834c8 in QObject::event (this=0x10ceb00, e=<value optimized out>) at kernel/qobject.cpp:1209
#26 0x00007fb687a8166d in QWidget::event (this=0x10ceb00, event=0x12f4490) at kernel/qwidget.cpp:8718
#27 0x00007fb687e4b51b in QMainWindow::event (this=0x10ceb00, event=0x12f4490) at widgets/qmainwindow.cpp:1480
#28 0x00007fb689423d2e in KXmlGuiWindow::event (this=0x10ceb00, ev=0x12f4490) at ../../kdeui/xmlgui/kxmlguiwindow.cpp:126
#29 0x00007fb687a309e4 in QApplicationPrivate::notify_helper (this=0x8b6dc0, receiver=0x10ceb00, e=0x12f4490) at kernel/qapplication.cpp:4462
#30 0x00007fb687a353aa in QApplication::notify (this=<value optimized out>, receiver=0x10ceb00, e=0x12f4490) at kernel/qapplication.cpp:4341
#31 0x00007fb689328716 in KApplication::notify (this=0x87ccc0, receiver=0x10ceb00, event=0x12f4490) at ../../kdeui/kernel/kapplication.cpp:311
#32 0x00007fb68866f49c in QCoreApplication::notifyInternal (this=0x87ccc0, receiver=0x10ceb00, event=0x12f4490) at kernel/qcoreapplication.cpp:731
#33 0x00007fb688672c25 in sendEvent (receiver=0x0, event_type=0, data=0x7f8b90) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#34 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x7f8b90) at kernel/qcoreapplication.cpp:1372
#35 0x00007fb68869a253 in sendPostedEvents (s=0x8be9c0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#36 postEventSourceDispatch (s=0x8be9c0) at kernel/qeventdispatcher_glib.cpp:277
#37 0x00007fb680998bcd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007fb6809993a8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007fb680999639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007fb68869a3ef in QEventDispatcherGlib::processEvents (this=0x7f8370, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#41 0x00007fb687ad7dfe in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#42 0x00007fb68866e882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#43 0x00007fb68866eabc in QEventLoop::exec (this=0x7fff4e386b00, flags=...) at kernel/qeventloop.cpp:201
#44 0x00007fb688672ecb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#45 0x0000000000456fbb in main (argc=3, argv=0x7fff4e3879f8) at ../../kalarm/main.cpp:127

Possible duplicates by query: bug 194745.

Reported using DrKonqi
Comment 1 David Jarvie 2011-06-19 23:45:53 UTC
When you closed the main window, were you trying to quit KAlarm, or did you expect KAlarm to minimise itself to the system tray?
Comment 2 p92 2011-06-20 00:04:15 UTC
I was expecting it to minimize in the tray.
Comment 3 David Jarvie 2011-06-20 02:01:29 UTC
What you report suggests that you:

1) Opened the edit alarm dialog.
2) Changed the alarm.
3) Clicked the Try button in the edit alarm dialog to test the alarm.
4) Closed the edit alarm dialog.
5) Closed the main window.

Did you also close the alarm window which appeared when you clicked Try? If so, when in the sequence did you close it?

Was the alarm: a display alarm with sound, or a pure audio alarm (without a message window)?

Was the audio still playing when you closed the main window?
Comment 4 David Jarvie 2011-06-20 15:46:53 UTC
One further question: Can you please check which Phonon backend you are using. Go to multimedia settings in System Settings, then select the Backend tab, and report which backends are listed (in order).
Comment 5 p92 2011-06-20 20:45:07 UTC
I don't remember exactly the sequence, but I believe I closed in this order :
- click on test
- saw that the popup appears with sound
- closed the edit alarm windows
- the sound was not playing (sure)
- i noticed the test window remaining and closed it
- closed the main kalarm window
==> crash

backends top to bottom
VLC
Xine
GStreamer
Comment 6 David Jarvie 2011-06-20 23:56:17 UTC
The crash trace indicates that the crash happens when the alarm test window is closed, which deleted the Phonon::MediaObject.

This looks like a Phonon bug - there's a D-Bus related crash in the MediaObject destructor. Reassigning to Phonon.
Comment 7 Myriam Schweingruber 2011-06-21 22:06:19 UTC

*** This bug has been marked as a duplicate of bug 246448 ***