Bug 259269

Summary: libvlc crashes if no plugins could be loaded
Product: [Frameworks and Libraries] phonon-backend-vlc Reporter: Lukas Tines <cobramaniac>
Component: generalAssignee: Harald Sitter <sitter>
Status: RESOLVED FIXED    
Severity: minor CC: andresbajotierra, bcooksley, cassianoleal, demopley, didekridek, evorster, fabo, h.becker, i, j.reitsma, jb, markes.albert, martin.sandsmark, micha.bgl, myriam, nayram_78, stefankunze74, valorie.zimmerman
Priority: VLO    
Version: 0.4.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
Console output from start digikam

Description Lukas Tines 2010-12-09 02:20:35 UTC
Application: amarok (2.3.2)
KDE Platform Version: 4.5.85 (4.6 Beta2)
Qt Version: 4.7.1
Operating System: Linux 2.6.36-rc4-16-default x86_64
Distribution: "openSUSE 11.3 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:
Everytime I start amarok, it crashes in libvlc_media_player_new. According to dissasemble, it looks like instance passed from phonon libvlc_media_player_new is wrong because amarok gets SIGSEGV when accessing instance->p_libvlc_int

The crash can be reproduced every time.

-- Backtrace:
Application: Amarok (amarok), signal: Segmentation fault
[KCrash Handler]
#6  0x00007f2c69db462e in libvlc_media_player_new () from /usr/lib64/libvlc.so.5
#7  0x00007f2c6a1f7cb6 in Phonon::VLC::VLCMediaObject::VLCMediaObject(QObject*) () from /usr/lib64/kde4/plugins/phonon_backend/phonon_vlc.so
#8  0x00007f2c6a1e72e4 in Phonon::VLC::Backend::createObject(Phonon::BackendInterface::Class, QObject*, QList<QVariant> const&) () from /usr/lib64/kde4/plugins/phonon_backend/phonon_vlc.so
#9  0x00007f2c7ecbf7df in ?? () from /usr/lib64/libphonon.so.4
#10 0x00007f2c7ecae456 in ?? () from /usr/lib64/libphonon.so.4
#11 0x00007f2c7ecaf9c8 in Phonon::MediaNodePrivate::backendObject() () from /usr/lib64/libphonon.so.4
#12 0x00007f2c7ecb149d in Phonon::Path::reconnect(Phonon::MediaNode*, Phonon::MediaNode*) () from /usr/lib64/libphonon.so.4
#13 0x00007f2c7ecb179d in Phonon::createPath(Phonon::MediaNode*, Phonon::MediaNode*) () from /usr/lib64/libphonon.so.4
#14 0x00007f2c83dc15bc in EngineController::initializePhonon (this=0x7e7980) at /usr/src/debug/amarok-2.3.2/src/EngineController.cpp:135
#15 0x00007f2c83dc247d in EngineController::qt_metacall (this=0x7e7980, _c=QMetaObject::InvokeMetaMethod, _id=22, _a=0x7fff586daef0) at /usr/src/debug/amarok-2.3.2/build/src/EngineController.moc:155
#16 0x00007f2c82d8c2bf in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () from /usr/lib64/libQtCore.so.4
#17 0x00007f2c82d8d700 in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) () from /usr/lib64/libQtCore.so.4
#18 0x00007f2c83eece95 in invokeMethod (this=<value optimized out>) at /usr/include/QtCore/qobjectdefs.h:408
#19 Amarok::DefaultApplicationController::initEngineController (this=<value optimized out>) at /usr/src/debug/amarok-2.3.2/src/statemanagement/DefaultApplicationController.cpp:92
#20 0x00007f2c83eecf11 in Amarok::DefaultApplicationController::start (this=0x87afa0) at /usr/src/debug/amarok-2.3.2/src/statemanagement/DefaultApplicationController.cpp:48
#21 0x00007f2c83d906d5 in App::continueInit (this=0x7fff586dc040) at /usr/src/debug/amarok-2.3.2/src/App.cpp:634
#22 0x00007f2c83d93887 in App::App (this=0x7fff586dc040) at /usr/src/debug/amarok-2.3.2/src/App.cpp:210
#23 0x0000000000408245 in main (argc=1, argv=0x7fff586ddfa8) at /usr/src/debug/amarok-2.3.2/src/main.cpp:235

Reported using DrKonqi
Comment 1 Lukas Tines 2010-12-09 10:55:35 UTC
For the info:
i am using vlc 1.1.5 and phonon-vlc is latest from git
Comment 2 Cassiano Leal 2010-12-13 21:05:45 UTC
Created attachment 54515 [details]
New crash information added by DrKonqi

amarok (2.3.2) on KDE Platform 4.5.3 (KDE 4.5.3) using Qt 4.7.1

- What I was doing when the application crashed:

I had just installed phonon-backend-vlc 0.3 and had put it as the first option in Phonon. Then I started Amarok and it crashed.

- Custom settings of the application:

Using VLC as a backend for Phonon.

-- Backtrace (Reduced):
#6  0x00007f5d6df1f6fe in libvlc_media_player_new () from /usr/lib/libvlc.so.5
#7  0x00007f5d6e16c84d in Phonon::VLC::VLCMediaObject::VLCMediaObject (this=0x1cf3420, parent=<value optimized out>) at ../../vlc/vlcmediaobject.cpp:52
#8  0x00007f5d6e158880 in Phonon::VLC::Backend::createObject (this=0x1cdc020, c=<value optimized out>, parent=0x1c8b830, args=<value optimized out>) at ../../vlc/backend.cpp:134
#9  0x00007f5d823f210f in Phonon::Factory::createMediaObject (parent=0x1c8b830) at ../../phonon/factory.cpp:342
#10 0x00007f5d823dd1c6 in Phonon::MediaObjectPrivate::createBackendObject (this=0x1c55d20) at ../../phonon/mediaobject.cpp:47
Comment 3 Henning Becker 2010-12-16 10:34:38 UTC
Same problem here. Backtrace looks exactly the same!

Amarok is from yesterday and Phonon-VLC from today, both from git.
KDE 4.6 beta2 // Qt 4.7.1 // VLC 1.1.5 from OpenSuSE Packman Repo

I don't know, if it's relevant, but I'm using Pulseaudio.
Comment 4 Myriam Schweingruber 2010-12-16 10:51:36 UTC
Confirmed by duplicate. The problem apparently is in libvlc.
Can't confirm this here, using current Amarok 2.4-git and phonon-vlc-backen from git, VLC built from stable branch 1.1.4-git, KDE 4.6 beta 2 on Kubuntu 10.10.

Let's check what our VLC guy thinks about this.
Comment 5 Myriam Schweingruber 2010-12-17 10:39:18 UTC
*** Bug 259706 has been marked as a duplicate of this bug. ***
Comment 6 Dario Andres 2010-12-25 21:35:59 UTC
[Comment from a bug triager]
From bug 261241 (KDE SC 4.5.90):
- What I was doing when the application crashed:
I just swithed phonon-vlc backend up in sound&video configuration, hoping to
make my soundcard work under KDE 4.6 RC1. then knotify kept crashing many
times. even I closed the setup page.
Comment 7 Dario Andres 2010-12-25 21:36:08 UTC
*** Bug 261241 has been marked as a duplicate of this bug. ***
Comment 8 Stefan Kunze 2011-01-07 10:06:37 UTC
Created attachment 55675 [details]
New crash information added by DrKonqi

amarok (2.3.90) on KDE Platform 4.5.95 (4.6 RC2) using Qt 4.7.1

- What I was doing when the application crashed: starting amarok - but also knotify is crashing directly after switching to phonon vlc backend

-- Backtrace (Reduced):
#6  libvlc_media_player_new (instance=0x0) at control/media_player.c:381
#7  0x00007fc3f15af5ad in Phonon::VLC::VLCMediaObject::VLCMediaObject (this=0x92c610, parent=<value optimized out>) at /usr/src/debug/phonon-backend-vlc-0.3.1/vlc/vlcmediaobject.cpp:52
#8  0x00007fc3f159dc88 in Phonon::VLC::Backend::createObject (this=0x8d6be0, c=<value optimized out>, parent=0x7a0d90, args=<value optimized out>)
    at /usr/src/debug/phonon-backend-vlc-0.3.1/vlc/backend.cpp:134
#9  0x00007fc403cf17df in Phonon::Factory::createMediaObject (parent=0x7a0d90) at /usr/src/debug/phonon-4.4.3/phonon/factory.cpp:342
#10 0x00007fc403ce0456 in Phonon::MediaObjectPrivate::createBackendObject (this=0x8a4880) at /usr/src/debug/phonon-4.4.3/phonon/mediaobject.cpp:47
Comment 9 Stefan Kunze 2011-01-07 10:28:39 UTC
Created attachment 55676 [details]
New crash information added by DrKonqi

knotify4 (4.0) on KDE Platform 4.5.95 (4.6 RC2) using Qt 4.7.1

- What I was doing when the application crashed: This is strange the knotify crashes continue after switching to phonox- xine backend (amarok is working right now with xine-backend) but the knotify crashes seems still to be caused by the phonon-vlc backend . For the mometn i just do usual work with the desktop (Browser, Email,amarok in the background )

-- Backtrace (Reduced):
#6  libvlc_media_player_new (instance=0x0) at control/media_player.c:381
#7  0x00007f282a2915ad in Phonon::VLC::VLCMediaObject::VLCMediaObject (this=0x7a2580, parent=<value optimized out>) at /usr/src/debug/phonon-backend-vlc-0.3.1/vlc/vlcmediaobject.cpp:52
#8  0x00007f282a27fc88 in Phonon::VLC::Backend::createObject (this=0x7a20b0, c=<value optimized out>, parent=0x797710, args=<value optimized out>)
    at /usr/src/debug/phonon-backend-vlc-0.3.1/vlc/backend.cpp:134
#9  0x00007f283be717df in Phonon::Factory::createMediaObject (parent=0x797710) at /usr/src/debug/phonon-4.4.3/phonon/factory.cpp:342
#10 0x00007f283be60456 in Phonon::MediaObjectPrivate::createBackendObject (this=0x7995d0) at /usr/src/debug/phonon-4.4.3/phonon/mediaobject.cpp:47
Comment 10 Stefan Kunze 2011-01-07 16:12:58 UTC
as an additional comment - after switching the vlc itself from the original videolan repository to the vlc version in Packman/Opensuse 11.3 - the backend is stable and works - also knotify does not crash anymore. 
The phonon-backend-vlc Version is the same 0.3.1-1.1 from KDE:Unstable:Playground Repo for Opensuse 11.3
Comment 11 Harald Sitter 2011-01-07 16:51:12 UTC
Yeah, a crash in libvlc_media_player_new means that VLC does not find any plugins, which is really a packaging issue. If someone could talk to the opensuse team, that would be great.

Leaving the bug open, so we do not forget to nag them until it is fixed ;)
Comment 12 Evert Vorster 2011-02-02 06:38:12 UTC
Created attachment 56775 [details]
New crash information added by DrKonqi

knotify4 (4.0) on KDE Platform 4.6.00 (4.6.0) using Qt 4.7.1

- What I was doing when the application crashed:

Installed phonon-backend-vlc from source from the kde repositories. I have no other backends installed for phonon. Phonon was crashing my whole KDE sessions, but now it just segfaults. 

Reading through the bug, it looks like something is missing from this source...

-- Backtrace (Reduced):
#6  0x00007f5c2a08c57e in libvlc_media_player_new () from /usr/lib64/libvlc.so.5
#7  0x00007f5c2a4d5f7d in Phonon::VLC::VLCMediaObject::VLCMediaObject (this=0x24ae960, parent=<value optimized out>) at /usr/src/sorcery/phonon-backend-vlc/phonon-backend-vlc-0.3.1/vlc/vlcmediaobject.cpp:52
#8  0x00007f5c2a4bedf8 in Phonon::VLC::Backend::createObject (this=0x2595aa0, c=<value optimized out>, parent=0x2527c90, args=<value optimized out>) at /usr/src/sorcery/phonon-backend-vlc/phonon-backend-vlc-0.3.1/vlc/backend.cpp:134
#9  0x00007f5c3cff8fbf in Phonon::Factory::createMediaObject (parent=0x2527c90) at /usr/src/sorcery/phonon/phonon-4.4.4/phonon/factory.cpp:342
#10 0x00007f5c3cfe5776 in Phonon::MediaObjectPrivate::createBackendObject (this=0x25285a0) at /usr/src/sorcery/phonon/phonon-4.4.4/phonon/mediaobject.cpp:47
Comment 13 Harald Sitter 2011-02-24 10:27:15 UTC
Actually a terminal output would be very nice, ideally with the following environmental vars:

export PHONON_DEBUG=5
export PHONON_VLC_DEBUG=5
Comment 14 Dario Andres 2011-03-08 21:08:12 UTC
*** Bug 267992 has been marked as a duplicate of this bug. ***
Comment 15 J Reitsma 2011-03-08 22:32:30 UTC
Created attachment 57781 [details]
Console output from start digikam

Following request from Dario Andres (comment #2 in bug 267992),  "crashreportdigikam.txt" is attached

Environment var's

export PHONON_DEBUG=5
export PHONON_VLC_DEBUG=5

set.
Comment 16 Harald Sitter 2011-03-08 23:58:51 UTC
Your crash is coming from a broken setup (apparently your vlc plugins are built against a different version of libvlc (supposedly 1.x as you are using 1.2). Nothing we can do about that though.

It confirms that the crash is due to missing (or in your case unloadable) plugins.
Comment 17 Harald Sitter 2011-03-08 23:59:49 UTC
Setting priority and stuff to minor as it is not technically a bug in phonon-vlc.
Comment 18 J Reitsma 2011-03-09 00:41:13 UTC
I haven't the slightest idea how my vlc plugins are built - I just download and install opensuse 11.4 beta's and RC's.
Comment 19 Myriam Schweingruber 2011-04-27 21:33:29 UTC
Reassigning to the new bugzilla product for better bug tracing of the various
backends. Sorry for the noise.
Comment 20 Harald Sitter 2011-05-01 15:31:33 UTC
*** Bug 268958 has been marked as a duplicate of this bug. ***
Comment 21 Harald Sitter 2011-05-01 15:32:31 UTC
Just a heads up, in 0.4.0 a warning appears for GUI applications when libvlc fails to initializes. Not the most perfect of solutions, but good enough for now.
Comment 22 Harald Sitter 2011-06-23 11:59:29 UTC
*** Bug 276287 has been marked as a duplicate of this bug. ***
Comment 23 Harald Sitter 2011-07-26 10:54:52 UTC
*** Bug 277594 has been marked as a duplicate of this bug. ***
Comment 24 Harald Sitter 2011-07-26 10:55:09 UTC
*** Bug 276288 has been marked as a duplicate of this bug. ***
Comment 25 Myriam Schweingruber 2012-01-24 15:06:10 UTC
*** Bug 292279 has been marked as a duplicate of this bug. ***
Comment 26 Myriam Schweingruber 2013-04-13 09:24:04 UTC
Is this still valid for the latest 0.6.2 version of the vlc backend? Apparently all reports are about prior versions.
If this is still reroducible we would need a more recent backtrace.
Comment 27 Harald Sitter 2013-09-10 10:04:22 UTC
with vlc 2.0 it does no longer crash but correctly error out on _new and phonon displays an error message accordingly.

also from a quick test it seems the application also will not crash after that but simply not produce any output, which is the intended behavior.

resolved from phonon pov