Bug 196518 - Crash when setCurrentSource() called on two simultaneous Phonon::MediaObject instances
Summary: Crash when setCurrentSource() called on two simultaneous Phonon::MediaObject ...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: Phonon
Classification: Frameworks and Libraries
Component: Xine backend (show other bugs)
Version: 4.4.0 (KDE 4.4.2)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords:
: 223923 226243 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-14 20:21 UTC by David Jarvie
Modified: 2011-12-01 09:01 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Jarvie 2009-06-14 20:21:52 UTC
Version:            (using KDE 4.2.90)
Compiler:          gcc 4.3.2 
OS:                Linux
Installed from:    Compiled From Sources

Create two MediaObject instances, and call setCurrentSource() on both of them. The second setCurrentSource() call will result in a crash, with the Xine backend at least.

The following code sequence was used in two separate threads, the second one being run before the first thread had completed:

Phonon::MediaSource source(audioFile);
mAudioObject = new Phonon::MediaObject();
mAudioObject->setCurrentSource(source);

The crash occurs in Phonon::Xine::Backend::Backend(), at the first line

Q_ASSERT(s_instance == 0);

Evidently, somewhere in the Phonon code there is a failure of the guard against more than one instance of Xine::Backend being in existence simultaneously.


Thread 9 (Thread 0xb17aab90 (LWP 1518)):
[KCrash Handler]
#6  0xb7f36424 in __kernel_vsyscall ()
#7  0xb645e640 in raise () from /lib/i686/cmov/libc.so.6
#8  0xb6460018 in abort () from /lib/i686/cmov/libc.so.6
#9  0xb6fe8915 in qt_message_output () from /opt/qt-4.4.3/lib/libQtCore.so.4
#10 0xb6fe89c6 in qFatal () from /opt/qt-4.4.3/lib/libQtCore.so.4
#11 0xb6fe8a55 in qt_assert () from /opt/qt-4.4.3/lib/libQtCore.so.4
#12 0xb259cb7a in Backend (this=0xb310c100, parent=0x0) at 
/home/david/src/svn/4.2/kdesupport/phonon/xine/backend.cpp:74
#13 0xb259d2bc in qt_plugin_instance () at 
/home/david/src/svn/4.2/kdesupport/phonon/xine/backend.cpp:53
#14 0xb70b69ba in QPluginLoader::instance () from 
/opt/qt-4.4.3/lib/libQtCore.so.4
#15 0xb26a6c77 in Phonon::KdePlatformPlugin::createBackend (this=0x9af5628, 
newService={d = 0xb17aa11c}) at 
/home/david/src/svn/4.2/kdebase/runtime/phonon/platform_kde/kdeplatformplugin.cpp:154
#16 0xb26a7fee in Phonon::KdePlatformPlugin::createBackend (this=0x9af5628) at 
/home/david/src/svn/4.2/kdebase/runtime/phonon/platform_kde/kdeplatformplugin.cpp:203
#17 0xb7c53a91 in Phonon::FactoryPrivate::createBackend (this=0x9afa8b8) at 
/home/david/src/svn/4.2/kdesupport/phonon/phonon/factory.cpp:118
#18 0xb7c54943 in Phonon::Factory::backend (createWhenNull=true) at 
/home/david/src/svn/4.2/kdesupport/phonon/phonon/factory.cpp:416
#19 0xb7c435ac in Phonon::MediaNodePrivate::backendObject (this=0xb3108000) at 
/home/david/src/svn/4.2/kdesupport/phonon/phonon/medianode.cpp:62
#20 0xb7c40b95 in Phonon::MediaObject::setCurrentSource (this=0xb3102938, 
newSource=@0xb17aa340) at 
/home/david/src/svn/4.2/kdesupport/phonon/phonon/mediaobject.cpp:230
#21 0x080fa5a1 in AudioThread::run (this=0x9afb180) at 
/home/david/src/svn/4.2/kdepim/kalarm/messagewin.cpp:1191
#22 0xb6fefa60 in ?? () from /opt/qt-4.4.3/lib/libQtCore.so.4
Comment 1 Frank Reininghaus 2010-02-22 17:22:10 UTC
*** Bug 226243 has been marked as a duplicate of this bug. ***
Comment 2 Frank Reininghaus 2010-02-22 17:22:31 UTC
*** Bug 228071 has been marked as a duplicate of this bug. ***
Comment 3 Frank Reininghaus 2010-03-14 14:52:06 UTC
@Phonon developers: I've marked two Dolphin crashes with similar backtraces as duplicates, but thinking about it again, I'm not 100% sure I was right because those backtraces do not contain setCurrentSource. Do you know if this is the same issue? Can we do something to help track down the bug? It was reported 6 times in Dolphin so far on different kinds of operations in folders containing audio/video files. Thanks!
Comment 4 Myriam Schweingruber 2010-08-14 11:00:26 UTC
*** Bug 223923 has been marked as a duplicate of this bug. ***
Comment 5 Myriam Schweingruber 2010-09-29 11:07:51 UTC
*** Bug 230005 has been marked as a duplicate of this bug. ***
Comment 6 Myriam Schweingruber 2011-01-28 12:00:33 UTC
Is this still valid with latest Phonon 4.4.3 or 4.4.4?
Comment 7 Nikos Chantziaras 2011-01-28 12:07:46 UTC
(In reply to comment #6)
> Is this still valid with latest Phonon 4.4.3 or 4.4.4?

The sample program provided in bug 230005 is still triggering the bug with 4.4.4.
Comment 8 Myriam Schweingruber 2011-12-01 09:01:51 UTC
We are sorry, but the xine backend is unmaintained: http://lists.kde.org/?l=kde-announce&m=130744384419151
Please use the phonon-backend-gstreamer or thre phonon-backend-vlc instead.