Bug 173813

Summary: Phonon Xine backend makes all multimedia apps crash
Product: [Frameworks and Libraries] Phonon Reporter: Nicolò Rebughini <nicolo.rebughini+kde>
Component: Xine backendAssignee: Matthias Kretz <kretz>
Status: RESOLVED UPSTREAM    
Severity: crash CC: alberthilbert, jemand, lool
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nicolò Rebughini 2008-10-29 09:39:35 UTC
Version:            (using Devel)
Compiler:          gcc 
OS:                Linux
Installed from:    Compiled sources

After updating kdesupport to revision 877309 Phonon does seem to be screwed up when using Xine backend.
First of all, I have no sound from KDE, and second, starting any multimedia application will produce only a crash.
Here I put the backtrace of Amarok crash.

Application: Amarok (amarok), signal SIGSEGV
0x00007fed5cc30621 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 26943)]

Thread 2 (Thread 0x40dda950 (LWP 26944)):
#0  0x00007fed5e0f955d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fed49259f31 in ?? () from /usr/lib/libxine.so.1
#2  0x00007fed5e0f53ea in start_thread () from /lib/libpthread.so.0
#3  0x00007fed5cc6ec6d in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fed4ed03730 (LWP 26943)):
[KCrash Handler]
#5  0x00007fed5cc0a690 in strlen () from /lib/libc.so.6
#6  0x00007fed5cbd344e in vfprintf () from /lib/libc.so.6
#7  0x00007fed5cc84d18 in __vsnprintf_chk () from /lib/libc.so.6
#8  0x00007fed49271fad in ?? () from /usr/lib/libxine.so.1
#9  0x00007fed492549f4 in xine_log () from /usr/lib/libxine.so.1
#10 0x00007fed4925fecc in ?? () from /usr/lib/libxine.so.1
#11 0x00007fed494b561b in Phonon::Xine::XineEngineData::XineEngineData () from /opt/kde4/lib/kde4/plugins/phonon_backend/phonon_xine.so
#12 0x00007fed494b5685 in Phonon::Xine::XineEngine::create () from /opt/kde4/lib/kde4/plugins/phonon_backend/phonon_xine.so
#13 0x00007fed494c9659 in Phonon::Xine::Backend::Backend () from /opt/kde4/lib/kde4/plugins/phonon_backend/phonon_xine.so
#14 0x00007fed494c9cfb in qt_plugin_instance () from /opt/kde4/lib/kde4/plugins/phonon_backend/phonon_xine.so
#15 0x00007fed498ebc42 in Phonon::KdePlatformPlugin::createBackend () from /opt/kde4/lib/kde4/plugins/phonon_platform/kde.so
#16 0x00007fed498ecdfd in Phonon::KdePlatformPlugin::createBackend () from /opt/kde4/lib/kde4/plugins/phonon_platform/kde.so
#17 0x00007fed57f5fd39 in Phonon::FactoryPrivate::createBackend () from /opt/kde4/lib/libphonon.so.4
#18 0x00007fed57f619b7 in Phonon::Factory::backend () from /opt/kde4/lib/libphonon.so.4
#19 0x00007fed57f5d712 in Phonon::GlobalConfig::audioOutputDeviceListFor () from /opt/kde4/lib/libphonon.so.4
#20 0x00007fed57f5db6d in Phonon::GlobalConfig::audioOutputDeviceFor () from /opt/kde4/lib/libphonon.so.4
#21 0x00007fed57f5930e in Phonon::AudioOutputPrivate::init () from /opt/kde4/lib/libphonon.so.4
#22 0x00007fed5d915911 in EngineController::EngineController () from /opt/kde4/lib/libamaroklib.so.1
#23 0x00007fed5d915e3d in EngineController::instance () from /opt/kde4/lib/libamaroklib.so.1
#24 0x00007fed5d9200bd in MainWindow::MainWindow () from /opt/kde4/lib/libamaroklib.so.1
#25 0x00007fed5d90b983 in App::continueInit () from /opt/kde4/lib/libamaroklib.so.1
#26 0x00007fed5d90d03e in App::App () from /opt/kde4/lib/libamaroklib.so.1
#27 0x000000000040408b in main ()

I can have this in different flavours when loading Juk or Dragon.
Even the control module in SystemSettings doesn't work, here is its backtrace.

Application: System Settings (systemsettings), signal SIGSEGV
0x00007f4d1ce65621 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 27020)]

Thread 2 (Thread 0x415a0950 (LWP 27025)):
#0  0x00007f4d1d8e455d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f4d10eb5f31 in ?? () from /usr/lib/libxine.so.1
#2  0x00007f4d1d8e03ea in start_thread () from /lib/libpthread.so.0
#3  0x00007f4d1cea3c6d in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f4d207bb6f0 (LWP 27020)):
[KCrash Handler]
#5  0x00007f4d1ce3f690 in strlen () from /lib/libc.so.6
#6  0x00007f4d1ce0844e in vfprintf () from /lib/libc.so.6
#7  0x00007f4d1ceb9d18 in __vsnprintf_chk () from /lib/libc.so.6
#8  0x00007f4d10ecdfad in ?? () from /usr/lib/libxine.so.1
#9  0x00007f4d10eb09f4 in xine_log () from /usr/lib/libxine.so.1
#10 0x00007f4d10ebbecc in ?? () from /usr/lib/libxine.so.1
#11 0x00007f4d1111161b in Phonon::Xine::XineEngineData::XineEngineData () from /opt/kde4/lib/kde4/plugins/phonon_backend/phonon_xine.so
#12 0x00007f4d11111685 in Phonon::Xine::XineEngine::create () from /opt/kde4/lib/kde4/plugins/phonon_backend/phonon_xine.so
#13 0x00007f4d11125659 in Phonon::Xine::Backend::Backend () from /opt/kde4/lib/kde4/plugins/phonon_backend/phonon_xine.so
#14 0x00007f4d11125cfb in qt_plugin_instance () from /opt/kde4/lib/kde4/plugins/phonon_backend/phonon_xine.so
#15 0x00007f4d1162bc42 in Phonon::KdePlatformPlugin::createBackend () from /opt/kde4/lib/kde4/plugins/phonon_platform/kde.so
#16 0x00007f4d1162cdfd in Phonon::KdePlatformPlugin::createBackend () from /opt/kde4/lib/kde4/plugins/phonon_platform/kde.so
#17 0x00007f4d11863d39 in Phonon::FactoryPrivate::createBackend () from /opt/kde4/lib/libphonon.so.4
#18 0x00007f4d118659b7 in Phonon::Factory::backend () from /opt/kde4/lib/libphonon.so.4
#19 0x00007f4d11a9f65a in Phonon::GlobalConfig::audioOutputDeviceListFor () from /opt/kde4/lib/kde4/kcm_phonon.so
#20 0x00007f4d11a900c7 in DevicePreference::availableAudioOutputDevices () from /opt/kde4/lib/kde4/kcm_phonon.so
#21 0x00007f4d11a922c7 in DevicePreference::load () from /opt/kde4/lib/kde4/kcm_phonon.so
#22 0x00007f4d11a8c5ad in PhononKcm::load () from /opt/kde4/lib/kde4/kcm_phonon.so
#23 0x00007f4d11a8cc63 in PhononKcm::PhononKcm () from /opt/kde4/lib/kde4/kcm_phonon.so
#24 0x00007f4d11a8d725 in KPluginFactory::createInstance<PhononKcm, QWidget> () from /opt/kde4/lib/kde4/kcm_phonon.so
#25 0x00007f4d1fb10d8d in KPluginFactory::create () from /opt/kde4/lib/libkdecore.so.5
#26 0x00007f4d203aade4 in KCModuleLoader::loadModule () from /opt/kde4/lib/libkutils.so.4
#27 0x00007f4d203af94e in KCModuleProxyPrivate::loadModule () from /opt/kde4/lib/libkutils.so.4
#28 0x00007f4d203b0495 in KCModuleProxy::realModule () from /opt/kde4/lib/libkutils.so.4
#29 0x00007f4d203b04a9 in KCModuleProxy::minimumSizeHint () from /opt/kde4/lib/libkutils.so.4
#30 0x00007f4d1e839ce3 in qSmartMinSize () from /usr/lib/libQtGui.so.4
#31 0x00007f4d1ebeb2f6 in ?? () from /usr/lib/libQtGui.so.4
#32 0x00007f4d1ebeb7d6 in QScrollArea::setWidget () from /usr/lib/libQtGui.so.4
#33 0x000000000040faae in KCMultiWidget::addModule ()
#34 0x0000000000411a08 in MainWindow::selectionChanged ()
#35 0x00000000004138ad in MainWindow::qt_metacall ()
#36 0x00007f4d1dc5e134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#37 0x00007f4d1ec758c5 in QAbstractItemView::doubleClicked () from /usr/lib/libQtGui.so.4
#38 0x00007f4d1ec775fb in QAbstractItemView::mouseDoubleClickEvent () from /usr/lib/libQtGui.so.4
#39 0x00007f4d1e85f1ac in QWidget::event () from /usr/lib/libQtGui.so.4
#40 0x00007f4d1ec848ad in QAbstractItemView::viewportEvent () from /usr/lib/libQtGui.so.4
#41 0x00007f4d1dc49038 in QCoreApplicationPrivate::sendThroughObjectEventFilters () from /usr/lib/libQtCore.so.4
#42 0x00007f4d1e80cc0c in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#43 0x00007f4d1e81525a in QApplication::notify () from /usr/lib/libQtGui.so.4
#44 0x00007f4d1ffa83ab in KApplication::notify () from /opt/kde4/lib/libkdeui.so.5
#45 0x00007f4d1dc49d61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#46 0x00007f4d1e8145f8 in QApplicationPrivate::sendMouseEvent () from /usr/lib/libQtGui.so.4
#47 0x00007f4d1e878c19 in ?? () from /usr/lib/libQtGui.so.4
#48 0x00007f4d1e877637 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#49 0x00007f4d1e89f2f4 in ?? () from /usr/lib/libQtGui.so.4
#50 0x00007f4d1a4e5d3b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#51 0x00007f4d1a4e950d in ?? () from /usr/lib/libglib-2.0.so.0
#52 0x00007f4d1a4e96cb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#53 0x00007f4d1dc7215f in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#54 0x00007f4d1e89ea9f in ?? () from /usr/lib/libQtGui.so.4
#55 0x00007f4d1dc48682 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#56 0x00007f4d1dc4880d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#57 0x00007f4d1dc4acbd in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#58 0x0000000000411036 in main ()

Just to provide more information:
-Using Kubuntu 8.10 with AMD64 2.6.27-7-generic kernel
-Using Xine 1.1.15 provided by Ubuntu
-Compiled Kde with kdesvn-build
Comment 1 Matthias Kretz 2008-10-29 13:30:55 UTC
Please recompile kdesupport/phonon with full debug info. Also please install libxine1-dbg.

Then get a new backtrace and paste it here.
Comment 2 Nicolò Rebughini 2008-10-29 14:00:03 UTC
I installed the debugging symbols and recompiled phonon with debug info.
This is the backtrace of amarok.
Application: Amarok (amarok), signal SIGSEGV
0x00007f93b9761621 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 10276)]

Thread 2 (Thread 0x416b1950 (LWP 10277)):
#0  0x00007f93bac2a55d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f93a8e2af31 in metronom_sync_loop (this=0x13d92a0) at metronom.c:870
#2  0x00007f93bac263ea in start_thread () from /lib/libpthread.so.0
#3  0x00007f93b979fc6d in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f93ab6e0730 (LWP 10276)):
[KCrash Handler]
#5  0x00007f93b973b690 in strlen () from /lib/libc.so.6
#6  0x00007f93b970444e in vfprintf () from /lib/libc.so.6
#7  0x00007f93b97b5d18 in __vsnprintf_chk () from /lib/libc.so.6
#8  0x00007f93a8e42fad in scratch_printf (this=0x1387ea0, format=0x7f93a8bf75c3 "load_plugins: plugin %s trovato\n", argp=0x7fffc3704be0) at /usr/include/bits/stdio2.h:78
#9  0x00007f93a8e259f4 in xine_log (this=0x1364e80, buf=1, format=0x7f93a8bf75c3 "load_plugins: plugin %s trovato\n") at xine.c:2245
#10 0x00007f93a8e30ecc in _register_plugins_internal (this=0x1364e80, file=0x0, info=0x7f93a92c45e0) at load_plugins.c:492
#11 0x00007f93a908795c in XineEngineData (this=0x1293370) at /media/sda2/src/kdesupport/phonon/xine/xineengine.cpp:49
#12 0x00007f93a90879b0 in Phonon::Xine::XineEngine::create (this=0x135c948) at /media/sda2/src/kdesupport/phonon/xine/xineengine.cpp:62
#13 0x00007f93a909fe31 in Backend (this=0x135c900, parent=<value optimized out>) at /media/sda2/src/kdesupport/phonon/xine/backend.cpp:77
#14 0x00007f93a90a08e7 in qt_plugin_instance () at /media/sda2/src/kdesupport/phonon/xine/backend.cpp:53
#15 0x00007f93a94c9c42 in Phonon::KdePlatformPlugin::createBackend () from /opt/kde4/lib/kde4/plugins/phonon_platform/kde.so
#16 0x00007f93a94cadfd in Phonon::KdePlatformPlugin::createBackend () from /opt/kde4/lib/kde4/plugins/phonon_platform/kde.so
#17 0x00007f93b4a89537 in Phonon::FactoryPrivate::createBackend (this=0x134a820) at /media/sda2/src/kdesupport/phonon/phonon/factory.cpp:107
#18 0x00007f93b4a89b48 in Phonon::Factory::backend (createWhenNull=true) at /media/sda2/src/kdesupport/phonon/phonon/factory.cpp:379
#19 0x00007f93b4a86bae in Phonon::GlobalConfig::audioOutputDeviceListFor (this=<value optimized out>, category=Phonon::MusicCategory, override=<value optimized out>)
    at /media/sda2/src/kdesupport/phonon/phonon/globalconfig.cpp:151
#20 0x00007f93b4a86ca5 in Phonon::GlobalConfig::audioOutputDeviceFor (this=<value optimized out>, category=<value optimized out>) at /media/sda2/src/kdesupport/phonon/phonon/globalconfig.cpp:169
#21 0x00007f93b4a846db in Phonon::AudioOutputPrivate::init (this=0x134ab60, c=Phonon::MusicCategory) at /media/sda2/src/kdesupport/phonon/phonon/audiooutput.cpp:83
#22 0x00007f93ba446d21 in EngineController::EngineController () from /opt/kde4/lib/libamaroklib.so.1
#23 0x00007f93ba44724d in EngineController::instance () from /opt/kde4/lib/libamaroklib.so.1
#24 0x00007f93ba4514cd in MainWindow::MainWindow () from /opt/kde4/lib/libamaroklib.so.1
#25 0x00007f93ba43cd93 in App::continueInit () from /opt/kde4/lib/libamaroklib.so.1
#26 0x00007f93ba43e44e in App::App () from /opt/kde4/lib/libamaroklib.so.1
#27 0x000000000040408b in main ()
Comment 3 Matthias Kretz 2008-10-29 14:50:43 UTC
"plugin %s trovato" means "plugin %s found", right? If that's the case then I'm stuck to understand what's going on. A wild guess would be a translation error... Try to run it in the C locale.

This is the code in libxine, and your backtrace shows that file == NULL, so it really shouldn't print "plugin %s found"...

    if (file)
      xine_log (this, XINE_LOG_PLUGIN,
                _("load_plugins: plugin %s found\n"), file->filename);
    else
      xine_log (this, XINE_LOG_PLUGIN,
                _("load_plugins: static plugin found\n"));
Comment 4 Nicolò Rebughini 2008-10-29 15:02:16 UTC
You're right, 'trovato' in italian means 'found'.
If the C locale can be changed I'll do it to favor further debugging, but I don't know how to do.
Comment 5 Matthias Kretz 2008-10-29 15:20:38 UTC
As far as I know just switching all of KDE to English (untranslated is the C-locale) should also switch the libxine translations. So just go to System Settings...
Comment 6 Nicolò Rebughini 2008-10-29 15:30:27 UTC
I already have my KDE in english language. To be sure of all choices, I tried to run amarok in both Italian or English languages and the error was the same. Even restarting KDE each time.

(isn't there a more comfortable way to communicate instead of bugzilla comments?)
Comment 7 Matthias Kretz 2008-10-29 16:11:48 UTC
Running in C locale makes the crash disappear. It seems to be an incorrectly translated string. Needs to be fixed in libxine.
Comment 8 albert 2008-11-08 19:16:01 UTC
*** Bug 174438 has been marked as a duplicate of this bug. ***
Comment 9 lool@dooz.org 2009-01-15 20:31:24 UTC
This was due to broken translations, and multiple levels failing to implement sanity checks which were meant to be present.  It's currently being worked around by replacing the xine_log(_(...)) calls with xine_log("%s", _("...")) and we're fixing the translations and the tools.

See <https://bugs.launchpad.net/ubuntu/+source/xine-lib/+bug/290768>.
Comment 10 Jonathan Thomas 2009-01-27 03:29:49 UTC
*** Bug 180827 has been marked as a duplicate of this bug. ***