Bug 265777 - Phonon.BackendCapabilities.availableMimeTypes() causes segfault in libphonon.so.4.4.0
Summary: Phonon.BackendCapabilities.availableMimeTypes() causes segfault in libphonon....
Status: RESOLVED DUPLICATE of bug 246448
Alias: None
Product: phonon-backend-gstreamer
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 09:59 UTC by cantabile
Modified: 2011-04-27 21:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
the test case run in gdb; contains backtrace (2.53 KB, text/plain)
2011-02-08 09:59 UTC, cantabile
Details
backtrace from gdb with debugging symbols - using gstreamer backend (2.96 KB, text/plain)
2011-02-10 20:23 UTC, cantabile
Details
backtrace from gdb with debugging symbols - using vlc backend (4.34 KB, text/plain)
2011-02-10 20:24 UTC, cantabile
Details
backtrace from gdb with debugging symbols - using xine backend (2.93 KB, text/plain)
2011-02-10 20:25 UTC, cantabile
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cantabile 2011-02-08 09:59:26 UTC
Created attachment 56973 [details]
the test case run in gdb; contains backtrace

Version:           unspecified
OS:                Linux

Copy-pasting from the archlinux bug report [1] I filed:
==========================
Description:
To test:
-----------
#!/usr/bin/env python
from PyQt4.phonon import *
result = Phonon.BackendCapabilities.availableMimeTypes()
-----------
Run the above and watch python segfault.

Message in dmesg:
python[9512]: segfault at 0 ip 00007f79e8c11ae7 sp 00007fff9c58f0d0 error 4 in libphonon.so.4.4.0[7f79e8bc8000+5e000]

Output from « gdb --args python python-segfault.py »:
http://paste.pocoo.org/raw/333715/ (also attached to this task)

Pretty much all the methods in Phonon.BackendCapabilities cause a segfault like the one above (haven't tried notifier())

The "Phonon" tab in qtconfig is all greyed-out and says "Phonon GStreamer backend not available" (has always been like that), but my pyqt app plays video just fine with Phonon.VideoPlayer.

Additional info:
* package version(s)
python 3.1.3-2 (also happens with 2.7.1-4)
python-qt 4.8.3-1
qt 4.7.1-3
phonon 4.4.4-1
phonon-gstreamer 4.4.4-1
gstreamer0.10 0.10.32-1
gstreamer0.10-bad 0.10.21-1
gstreamer0.10-bad-plugins 0.10.21-1
gstreamer0.10-base 0.10.32-2
gstreamer0.10-base-plugins 0.10.32-2
gstreamer0.10-good 0.10.27-1
gstreamer0.10-good-plugins 0.10.27-1
gstreamer0.10-ugly 0.10.17-1
gstreamer0.10-ugly-plugins 0.10.17-1

One person in #pyqt reported success with the xine backend. Also said he had no pulseaudio support.

I just tried with the vlc, xine and mplayer (aur/phonon-mplayer-git) backends. The first two cause segfaults, the mplayer backend however, works. (That is, it works with the test case above - playing videos in my app, not so much.)

Ok...
This is what I did:
- temporarily removed libpulse (-Rd libpulse)
- rebuilt phonon from abs (removing the pulse (make)deps)
Now the test above works, with phonon-{gstreamer,vlc,xine}. No more segfaults.
==========================

Note: I don't use kde.

[1] https://bugs.archlinux.org/task/22802

Reproducible: Always
Comment 1 Myriam Schweingruber 2011-02-10 18:55:59 UTC
Backtrace from attachment (please always paste backtraces inline, else those are not searchable):

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5db4ae7 in Phonon::PulseSupport::PulseSupport() ()
   from /usr/lib/libphonon.so.4
(gdb) btrace
Undefined command: "btrace".  Try "help".
(gdb) btrace[1Ptracestrace[1Ptracebtraceatracectrace[1Ptrace[1Ptrace[C[C[C[C[C[K[K[K[K
#0  0x00007ffff5db4ae7 in Phonon::PulseSupport::PulseSupport() ()
   from /usr/lib/libphonon.so.4
#1  0x00007ffff5db5140 in Phonon::PulseSupport::getInstance() ()
   from /usr/lib/libphonon.so.4
#2  0x00007fffedb0bf5a in ?? ()
   from /usr/lib/kde4/plugins/phonon_backend/phonon_gstreamer.so
#3  0x00007fffedb0c5ab in qt_plugin_instance ()
   from /usr/lib/kde4/plugins/phonon_backend/phonon_gstreamer.so
#4  0x00007ffff5da161f in ?? () from /usr/lib/libphonon.so.4
#5  0x00007ffff5da1a1f in Phonon::Factory::backend(bool) ()
   from /usr/lib/libphonon.so.4
#6  0x00007ffff5d9a65e in Phonon::BackendCapabilities::availableMimeTypes() ()
   from /usr/lib/libphonon.so.4
#7  0x00007ffff600a66b in ?? ()
   from /usr/lib/python3.1/site-packages/PyQt4/phonon.so
#8  0x00007ffff7add460 in PyEval_EvalFrameEx ()
   from /usr/lib/libpython3.1.so.1.0
#9  0x00007ffff7ade90b in PyEval_EvalCodeEx ()
   from /usr/lib/libpython3.1.so.1.0
#10 0x00007ffff7ade9eb in PyEval_EvalCode () from /usr/lib/libpython3.1.so.1.0
#11 0x00007ffff7af9d3c in run_mod () from /usr/lib/libpython3.1.so.1.0
#12 0x00007ffff7afb988 in PyRun_FileExFlags ()
   from /usr/lib/libpython3.1.so.1.0
#13 0x00007ffff7afc51f in PyRun_SimpleFileExFlags ()
   from /usr/lib/libpython3.1.so.1.0
#14 0x00007ffff7b0d841 in Py_Main () from /usr/lib/libpython3.1.so.1.0
#15 0x0000000000400bd7 in main ()
(gdb) Quit


Could you please install debugging symbols and try again? The backtrace is not exactly good. Please see also here how to get a valid backtrace:

Sorry, but your backtrace is not useful, as you are lacking debugging symbols. If you can reproduce this bug, please check here on how to get a valid backtrace:

http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
Comment 2 cantabile 2011-02-10 20:23:54 UTC
Created attachment 57126 [details]
backtrace from gdb with debugging symbols - using gstreamer backend
Comment 3 cantabile 2011-02-10 20:24:51 UTC
Created attachment 57127 [details]
backtrace from gdb with debugging symbols - using vlc backend
Comment 4 cantabile 2011-02-10 20:25:22 UTC
Created attachment 57128 [details]
backtrace from gdb with debugging symbols - using xine backend
Comment 5 cantabile 2011-02-10 20:32:30 UTC
I rebuilt the stock phonon{,-gstreamer,-vlc,-xine} packages with debugging enabled and not stripped, as instructed here: https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces (also with -DCMAKE_BUILD_TYPE=Debug )

The new backtraces are now attached. I'll also paste them here, as requested.

-- using the gstreamer backend --
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/python python-segfault.py
[Thread debugging using libthread_db enabled]
WARNING: Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface 

Program received signal SIGSEGV, Segmentation fault.
Phonon::PulseSupport::PulseSupport (this=0xa8e640)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/pulsesupport.cpp:716
716	    if (strcmp(QAbstractEventDispatcher::instance()->metaObject()->className(),
(gdb) thread apply all backtrace

Thread 1 (Thread 0x7ffff7fd1700 (LWP 11216)):
#0  Phonon::PulseSupport::PulseSupport (this=0xa8e640)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/pulsesupport.cpp:716
#1  0x00007ffff5db51a0 in Phonon::PulseSupport::getInstance ()
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/pulsesupport.cpp:668
#2  0x00007fffedb07870 in Phonon::Gstreamer::Backend::Backend (this=0xa99090, 
    parent=<value optimized out>)
    at /home/asdf/builds/phonon-gstreamer/src/phonon-backend-gstreamer-4.4.4/gstreamer/backend.cpp:59
#3  0x00007fffedb07d60 in qt_plugin_instance ()
    at /home/asdf/builds/phonon-gstreamer/src/phonon-backend-gstreamer-4.4.4/gstreamer/backend.cpp:42
#4  0x00007ffff5da159f in Phonon::FactoryPrivate::createBackend (
    this=0x8b5a00)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/factory.cpp:161
#5  0x00007ffff5da199f in Phonon::Factory::backend (
    createWhenNull=<value optimized out>)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/factory.cpp:453
#6  0x00007ffff5d9a5de in Phonon::BackendCapabilities::availableMimeTypes ()
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/backendcapabilities.cpp:51
#7  0x00007ffff600a66b in ?? ()
   from /usr/lib/python3.1/site-packages/PyQt4/phonon.so
#8  0x00007ffff7add460 in PyEval_EvalFrameEx ()
   from /usr/lib/libpython3.1.so.1.0
#9  0x00007ffff7ade90b in PyEval_EvalCodeEx ()
   from /usr/lib/libpython3.1.so.1.0
#10 0x00007ffff7ade9eb in PyEval_EvalCode () from /usr/lib/libpython3.1.so.1.0
#11 0x00007ffff7af9d3c in run_mod () from /usr/lib/libpython3.1.so.1.0
#12 0x00007ffff7afb988 in PyRun_FileExFlags ()
   from /usr/lib/libpython3.1.so.1.0
#13 0x00007ffff7afc51f in PyRun_SimpleFileExFlags ()
   from /usr/lib/libpython3.1.so.1.0
#14 0x00007ffff7b0d841 in Py_Main () from /usr/lib/libpython3.1.so.1.0
#15 0x0000000000400bd7 in main ()
(gdb) quit
A debugging session is active.

	Inferior 1 [process 11216] will be killed.

Quit anyway? (y or n) 
------------------------

-- using the vlc backend --
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/python python-segfault.py
[Thread debugging using libthread_db enabled]
WARNING: Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface 
bool Phonon::VLC::scanDevices(QList<Phonon::VLC::DeviceInfo>&) Probing for v4l2 devices 
[New Thread 0x7fffb6b22700 (LWP 11588)]
[New Thread 0x7fffb6a21700 (LWP 11589)]

Program received signal SIGSEGV, Segmentation fault.
Phonon::PulseSupport::PulseSupport (this=0xae2650)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/pulsesupport.cpp:716
716	    if (strcmp(QAbstractEventDispatcher::instance()->metaObject()->className(),
(gdb) thread apply all backtrace

Thread 3 (Thread 0x7fffb6a21700 (LWP 11589)):
#0  0x00007fffed492ec0 in msg_Generic () from /usr/lib/libvlccore.so.4
#1  0x00007fffc5890ae2 in ?? ()
   from /usr/lib/vlc/plugins/demux/libplaylist_plugin.so
#2  0x00007fffed480b15 in module_need () from /usr/lib/libvlccore.so.4
#3  0x00007fffed43ab9f in ?? () from /usr/lib/libvlccore.so.4
#4  0x00007fffed448083 in ?? () from /usr/lib/libvlccore.so.4
#5  0x00007fffed44921a in ?? () from /usr/lib/libvlccore.so.4
#6  0x00007fffed44a8f5 in ?? () from /usr/lib/libvlccore.so.4
#7  0x00007fffed42a92d in ?? () from /usr/lib/libvlccore.so.4
#8  0x00007ffff77f8cb0 in start_thread () from /lib/libpthread.so.0
#9  0x00007ffff7564aed in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fffb6b22700 (LWP 11588)):
#0  0x00007ffff77fd41c in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/libpthread.so.0
#1  0x00007fffed424532 in ?? () from /usr/lib/libvlccore.so.4
#2  0x00007ffff77f8cb0 in start_thread () from /lib/libpthread.so.0
#3  0x00007ffff7564aed in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffff7fd1700 (LWP 11544)):
#0  Phonon::PulseSupport::PulseSupport (this=0xae2650)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/pulsesupport.cpp:716
#1  0x00007ffff5db51a0 in Phonon::PulseSupport::getInstance ()
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/pulsesupport.cpp:668
#2  0x00007fffedb19555 in Phonon::VLC::DeviceManager::updateDeviceList (this=
    0xa9c9e0)
    at /home/asdf/builds/phonon-vlc/src/phonon-backend-vlc-0.3.2/vlc/devicemanager.cpp:225
#3  0x00007fffedb15156 in Phonon::VLC::Backend::Backend (this=0xa94f30, 
    parent=<value optimized out>)
    at /home/asdf/builds/phonon-vlc/src/phonon-backend-vlc-0.3.2/vlc/backend.cpp:90
#4  0x00007fffedb15240 in qt_plugin_instance ()
    at /home/asdf/builds/phonon-vlc/src/phonon-backend-vlc-0.3.2/vlc/backend.cpp:49
#5  0x00007ffff5da159f in Phonon::FactoryPrivate::createBackend (
    this=0x8b5a00)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/factory.cpp:161
#6  0x00007ffff5da199f in Phonon::Factory::backend (
    createWhenNull=<value optimized out>)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/factory.cpp:453
#7  0x00007ffff5d9a5de in Phonon::BackendCapabilities::availableMimeTypes ()
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/backendcapabilities.cpp:51
#8  0x00007ffff600a66b in ?? ()
   from /usr/lib/python3.1/site-packages/PyQt4/phonon.so
#9  0x00007ffff7add460 in PyEval_EvalFrameEx ()
   from /usr/lib/libpython3.1.so.1.0
#10 0x00007ffff7ade90b in PyEval_EvalCodeEx ()
   from /usr/lib/libpython3.1.so.1.0
#11 0x00007ffff7ade9eb in PyEval_EvalCode () from /usr/lib/libpython3.1.so.1.0
#12 0x00007ffff7af9d3c in run_mod () from /usr/lib/libpython3.1.so.1.0
#13 0x00007ffff7afb988 in PyRun_FileExFlags ()
   from /usr/lib/libpython3.1.so.1.0
#14 0x00007ffff7afc51f in PyRun_SimpleFileExFlags ()
   from /usr/lib/libpython3.1.so.1.0
#15 0x00007ffff7b0d841 in Py_Main () from /usr/lib/libpython3.1.so.1.0
#16 0x0000000000400bd7 in main ()
(gdb) quit
A debugging session is active.

	Inferior 1 [process 11544] will be killed.

Quit anyway? (y or n) 
------------------------

-- using the xine backend --
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/python python-segfault.py
[Thread debugging using libthread_db enabled]
WARNING: Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface 

Program received signal SIGSEGV, Segmentation fault.
Phonon::PulseSupport::PulseSupport (this=0xa8d5d0)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/pulsesupport.cpp:716
716	    if (strcmp(QAbstractEventDispatcher::instance()->metaObject()->className(),
(gdb) thread apply all backtrace

Thread 1 (Thread 0x7ffff7fd1700 (LWP 11729)):
#0  Phonon::PulseSupport::PulseSupport (this=0xa8d5d0)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/pulsesupport.cpp:716
#1  0x00007ffff5db51a0 in Phonon::PulseSupport::getInstance ()
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/pulsesupport.cpp:668
#2  0x00007fffedb05ccf in Phonon::Xine::Backend::Backend (this=0xa8e0b0, 
    parent=<value optimized out>)
    at /home/asdf/builds/phonon-xine/src/phonon-backend-xine-4.4.4/xine/backend.cpp:73
#3  0x00007fffedb06260 in qt_plugin_instance ()
    at /home/asdf/builds/phonon-xine/src/phonon-backend-xine-4.4.4/xine/backend.cpp:51
#4  0x00007ffff5da159f in Phonon::FactoryPrivate::createBackend (
    this=0x8b5a00)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/factory.cpp:161
#5  0x00007ffff5da199f in Phonon::Factory::backend (
    createWhenNull=<value optimized out>)
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/factory.cpp:453
#6  0x00007ffff5d9a5de in Phonon::BackendCapabilities::availableMimeTypes ()
    at /home/asdf/builds/phonon/src/phonon-4.4.4/phonon/backendcapabilities.cpp:51
#7  0x00007ffff600a66b in ?? ()
   from /usr/lib/python3.1/site-packages/PyQt4/phonon.so
#8  0x00007ffff7add460 in PyEval_EvalFrameEx ()
   from /usr/lib/libpython3.1.so.1.0
#9  0x00007ffff7ade90b in PyEval_EvalCodeEx ()
   from /usr/lib/libpython3.1.so.1.0
#10 0x00007ffff7ade9eb in PyEval_EvalCode () from /usr/lib/libpython3.1.so.1.0
#11 0x00007ffff7af9d3c in run_mod () from /usr/lib/libpython3.1.so.1.0
#12 0x00007ffff7afb988 in PyRun_FileExFlags ()
   from /usr/lib/libpython3.1.so.1.0
#13 0x00007ffff7afc51f in PyRun_SimpleFileExFlags ()
   from /usr/lib/libpython3.1.so.1.0
#14 0x00007ffff7b0d841 in Py_Main () from /usr/lib/libpython3.1.so.1.0
#15 0x0000000000400bd7 in main ()
(gdb) quit
A debugging session is active.

	Inferior 1 [process 11729] will be killed.

Quit anyway? (y or n) 
------------------------
Comment 6 Myriam Schweingruber 2011-02-10 20:44:25 UTC
Thank you for your feedback, this is a duplicate of bug 246448, please see the comments there.

*** This bug has been marked as a duplicate of bug 246448 ***
Comment 7 Myriam Schweingruber 2011-04-27 21:19:17 UTC
reassigning to the new bugzilla product for better bug tracing of the various backends. Sorry for the noise.