Qt Crash with phonon
-
Hi All,
I am new to Qt. I use Qt 4.7 on fedora 9.I get the following error and a crash
The inferior stopped because it received a signal from the Operating System.Signal name :
SIGSEGV
Signal meaning :
Segmentation fault. on having
Phonon::MediaObject *music =
Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource("/root/Desktop/song/abc.mp3"));
music->play();I get similar error with Qmediaplayer demo
I am posting my cpp file for reference. Please help
@
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
#include <iostream>
#include <fstream>
#include <string>
#include <getopt.h>
#include <id3/misc_support.h>
#include <QtGui/QWidget>
#include <QtGui/QApplication>
#include <QtCore/QTimerEvent>
#include <QtGui/QShowEvent>
#include <QtGui/QIcon>
#include <QtCore/QBasicTimer>
#include <QtGui/QAction>#include <phonon/audiooutput.h>
#include <phonon/backendcapabilities.h>
#include <phonon/effect.h>
#include <phonon/effectparameter.h>
#include <phonon/effectwidget.h>
#include <phonon/mediaobject.h>
#include <phonon/seekslider.h>
#include <phonon/videowidget.h>
#include <phonon/volumeslider.h>
#include <phonon/mediasource.h>
#include <Phonon>#include <sys/types.h>
#include <sys/stat.h>using namespace std;
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setApplicationName( "Mu" );QmlApplicationViewer viewer; viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); viewer.setMainQmlFile(QLatin1String("qml/mp02/main.qml")); viewer.showExpanded(); Phonon::MediaObject *music =
Phonon::createPlayer(Phonon::MusicCategory,
Phonon::MediaSource("/root/Desktop/song/abc.mp3"));
music->play();
return app.exec();
}
@ -
Please don't make the same post twice. We will remove the other one, since it doesn't add anything to the showcase you posted in.
You get a segmentation fault. Did you debug and step i to your code to see on what line the error originates?
-
Thanks for responding.
The Error is thrown on call of return app.exec();
internally on call of QmlApplicationViewer::~QmlApplicationViewer()
{
delete m_d;
} -
I am getting the following errors on executing Qmediaplayer demo.
@
(<unknown>:1422): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstdecodebin.so': /usr/local/lib/libgstpbutils-0.10.so.0: undefined symbol: gst_element_link_pads_full(<unknown>:1422): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(<unknown>:1422): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(<unknown>:1422): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(<unknown>:1422): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(<unknown>:1422): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(<unknown>:1422): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(<unknown>:1422): GStreamer-CRITICAL **: gst_bin_add: assertion `GST_IS_ELEMENT (element)' failed.
@
I have reinstalled Gstreamer , Gstreamer plugin base and Gstreamer plugins good.
Can anybody help on how to resolve the problem