Bug 182766 - Infinite recursion in Phonon while creating backend if only the nullbackend is installed
Summary: Infinite recursion in Phonon while creating backend if only the nullbackend i...
Status: RESOLVED DOWNSTREAM
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_phonon (show other bugs)
Version: unspecified
Platform: Debian testing Unspecified
: NOR crash
Target Milestone: ---
Assignee: Matthias Kretz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-01 19:43 UTC by Aneurin Price
Modified: 2009-08-26 19:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace, with repeated lines removed (5.24 KB, text/plain)
2009-02-05 00:47 UTC, Aneurin Price
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aneurin Price 2009-02-01 19:43:36 UTC
Version:            (using KDE 4.2.0)
Installed from:    Debian testing/unstable Packages

(This is KDE4.2 from Debian experimental)

When using phonon-backend-null, trying to open the 'Multimedia' section in systemsettings caused an immediate crash, every time - or at least an unexpected termination, as the usual crash handler dialogue didn't appear.

Installing phonon-backend-xine stopped it happening, but it would be good to figure out the cause.

Since I didn't get the crash handler, I didn't get a backtrace. Is there any more information I can give which may be of use? Would I be better off reporting this downstream?
Comment 1 Dario Andres 2009-02-01 20:03:00 UTC
You can get a backtrace using "gdb":

Run "gdb systemsettings" in Konsole
Type "run" and press Return
SystemSettings will open.
Reproduce the crash
Go back to the "GDB/Konsole" window
Type "bt" and press Return to get a backtrace

Anyways.. it may be Debian fault too as I suppose phonon must be installed with at least one engine. (not really sure)

Thanks
Comment 2 Aneurin Price 2009-02-01 21:04:43 UTC
Running systemsettings in gdb is problematic, because the process appears to end as soon as the window comes up and the application is loaded, so gdb stops tracing it. One thing I did notice though is that the console is filled with at least a few hundred lines of:
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded

(I don't recall noticing this when I first tried - and I did run from the command line to see if I got any helpful messages - so I wonder if anything in my configuration has changed by installing and removing a real phonon backend, but it's most likely that I just failed to put this in my notes and then forgot about it.)

I suppose then that phonon-backend-null is misbehaving - is this a part of KDE or a Debian addition? The Debian packages page lists it as having the same source package as the other phonon packages, but it could still be from a Debian patch. If so then I'll file a bug with them, but I'd appreciate it if anyone can let me know.

Thanks
Comment 3 Dario Andres 2009-02-01 23:20:43 UTC
You can use the an optional parameter to correctly generate the backtrace:

After entering "gdb systemsettings" but before pressing "run" , type "set args --nofork" and press Enter. 
This will launch "systemsettings --nofork" (instead of "systemsettings"), avoiding the behaviour you mentioned in the first paragraph

Thanks :)
Comment 4 Aneurin Price 2009-02-05 00:43:41 UTC
That's a pretty impressive backtrace - I've never seen a stack overflow before (if this gets wrapped I'll repost as an attachment):

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fd0d34bf6f0 (LWP 11055)]
0x00007fd0d0c98222 in vfprintf () from /lib/libc.so.6
(gdb) bt
#0  0x00007fd0d0c98222 in vfprintf () from /lib/libc.so.6
#1  0x00007fd0d0c9cb60 in buffered_vfprintf () from /lib/libc.so.6
#2  0x00007fd0d0c98436 in vfprintf () from /lib/libc.so.6
#3  0x00007fd0d0ca1c08 in fprintf () from /lib/libc.so.6
#4  0x00007fd0d1e6958b in qt_message_output (msgType=QtDebugMsg, buf=<value optimized out>) at global/qglobal.cpp:2076
#5  0x00007fd0c8517cf6 in ~QDebug (this=0x7fffdadf9f70) at /usr/include/qt4/QtCore/qdebug.h:79
#6  0x00007fd0c852875e in Phonon::FactoryPrivate::createBackend (this=0x1839cf0) at ../../phonon/factory.cpp:156
#7  0x00007fd0c8528cf7 in Phonon::Factory::backend (createWhenNull=<value optimized out>) at ../../phonon/factory.cpp:416
#8  0x00007fd0c8763022 in Phonon::GlobalConfig::audioOutputDeviceListFor (this=<value optimized out>, category=Phonon::NoCategory, override=Phonon::GlobalConfig::HideAdvancedDevices) at ../../../phonon/kcm/globalconfig.cpp:131
#9  0x00007fd0c8752a17 in DevicePreference::availableAudioOutputDevices (this=<value optimized out>) at ../../../phonon/kcm/devicepreference.cpp:325
#10 0x00007fd0c8753abe in DevicePreference::updateAudioOutputDevices (this=0x180a8c0) at ../../../phonon/kcm/devicepreference.cpp:283
#11 0x00007fd0c875a550 in DevicePreference::qt_metacall (this=0x180a8c0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffdadfa580) at ./moc_devicepreference.cpp:95
#12 0x00007fd0d1f6d6e4 in QMetaObject::activate (sender=0x184b980, from_signal_index=<value optimized out>, to_signal_index=4, argv=0x1d50440) at kernel/qobject.cpp:3031
#13 0x00007fd0c852163d in Phonon::BackendCapabilities::Notifier::qt_metacall (this=0x184b980, _c=QMetaObject::InvokeMetaMethod, _id=-788923424, _a=<value optimized out>) at ./moc_backendcapabilities.cpp:70
#14 0x00007fd0d1f6d6e4 in QMetaObject::activate (sender=0x1839cf0, from_signal_index=<value optimized out>, to_signal_index=4, argv=0x1d50440) at kernel/qobject.cpp:3031
#15 0x00007fd0c8528d0f in Phonon::Factory::backend (createWhenNull=<value optimized out>) at ../../phonon/factory.cpp:420

...

#44448 0x00007fd0c8763022 in Phonon::GlobalConfig::audioOutputDeviceListFor (this=<value optimized out>, category=Phonon::NoCategory, override=Phonon::GlobalConfig::HideAdvancedDevices) at ../../../phonon/kcm/globalconfig.cpp:131
#44449 0x00007fd0c8752a17 in DevicePreference::availableAudioOutputDevices (this=<value optimized out>) at ../../../phonon/kcm/devicepreference.cpp:325
#44450 0x00007fd0c8753abe in DevicePreference::updateAudioOutputDevices (this=0x180a8c0) at ../../../phonon/kcm/devicepreference.cpp:283
#44451 0x00007fd0c875a550 in DevicePreference::qt_metacall (this=0x180a8c0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffdb5f2120) at ./moc_devicepreference.cpp:95
#44452 0x00007fd0d1f6d6e4 in QMetaObject::activate (sender=0x184b980, from_signal_index=<value optimized out>, to_signal_index=4, argv=0x1d50440) at kernel/qobject.cpp:3031
#44453 0x00007fd0c852163d in Phonon::BackendCapabilities::Notifier::qt_metacall (this=0x184b980, _c=QMetaObject::InvokeMetaMethod, _id=-788923424, _a=<value optimized out>) at ./moc_backendcapabilities.cpp:70
#44454 0x00007fd0d1f6d6e4 in QMetaObject::activate (sender=0x1839cf0, from_signal_index=<value optimized out>, to_signal_index=4, argv=0x1d50440) at kernel/qobject.cpp:3031
#44455 0x00007fd0c8528d0f in Phonon::Factory::backend (createWhenNull=<value optimized out>) at ../../phonon/factory.cpp:420
#44456 0x00007fd0c8763022 in Phonon::GlobalConfig::audioOutputDeviceListFor (this=<value optimized out>, category=Phonon::NoCategory, override=Phonon::GlobalConfig::HideAdvancedDevices) at ../../../phonon/kcm/globalconfig.cpp:131
#44457 0x00007fd0c8752a17 in DevicePreference::availableAudioOutputDevices (this=<value optimized out>) at ../../../phonon/kcm/devicepreference.cpp:325
#44458 0x00007fd0c8754952 in DevicePreference::load (this=0x180a8c0) at ../../../phonon/kcm/devicepreference.cpp:356
#44459 0x00007fd0c874f93d in PhononKcm::load (this=0x17e6490) at ../../../phonon/kcm/main.cpp:63
#44460 0x00007fd0c874fff3 in PhononKcm (this=0x17e6490, parent=<value optimized out>, args=<value optimized out>) at ../../../phonon/kcm/main.cpp:55
#44461 0x00007fd0c8750ad3 in KPluginFactory::createInstance<PhononKcm, QWidget> (parentWidget=<value optimized out>, parent=<value optimized out>, args=@0x7fffdb5f3060) at /usr/include/kpluginfactory.h:461
#44462 0x00007fd0d24284cd in KPluginFactory::create (this=0x17e5a10, iface=0x7fd0d2a36000 "KCModule", parentWidget=0x0, parent=0x17e22d0, args=@0x7fffdb5f3060, keyword=@0x7fffdb5f2f50) at ../../kdecore/util/kpluginfactory.cpp:191
#44463 0x00007fd0d31a7fa4 in KCModuleLoader::loadModule (mod=@0x17e52f0, report=KCModuleLoader::Inline, parent=0x17e22d0, args=@0x17e52c0) at ../../kdecore/util/kpluginfactory.h:515
#44464 0x00007fd0d31ad5fa in KCModuleProxyPrivate::loadModule (this=0x17e52c0) at ../../kutils/kcmoduleproxy.cpp:107
#44465 0x00007fd0d31ae625 in KCModuleProxy::realModule (this=<value optimized out>) at ../../kutils/kcmoduleproxy.cpp:83
#44466 0x00007fd0d31ae74c in KCModuleProxy::buttons (this=0x7fd0d1fa661e) at ../../kutils/kcmoduleproxy.cpp:300
#44467 0x000000000040eb7b in _start ()


In the referenced source files, I presume factory.cpp is the part which is relevant to the specific backend plugin? I've not yet figured out exactly what phonon-backend-null is being built from.
Comment 5 Aneurin Price 2009-02-05 00:47:03 UTC
Created attachment 30974 [details]
Backtrace, with repeated lines removed

Here's the backtrace as an attachment, just because I find it easier to follow without wrapping. The rather sizeable missing section consists entirely of repetitions of the recursive loop.
Comment 6 Aneurin Price 2009-08-21 00:21:54 UTC
Still happens in 4.3, from Debian unstable.

Is this likely to be a Debian-specific bug?
Comment 7 Dario Andres 2009-08-26 19:05:30 UTC
Mh, as I think we do not develop this "null engine", it is likely to be a Debian error. 
Anyways, this is caused by the package splitting/modularization. 
In the standard KDE packaging, Phonon comes with Gstreamer as a default(integrated) backend; and xine as an optional one(or also integrated in KDE-Phonon)

I'm closing this as DOWNSTREAM, could you please report this on the debian tracker ?
Thanks!