Summary: | [PATCH] Amarok crashes when trying to play something [@Phonon::VLC::VLCMediaObject::setVLCWidgetId] | ||
---|---|---|---|
Product: | [Frameworks and Libraries] phonon-backend-vlc | Reporter: | perrantrevan |
Component: | general | Assignee: | Martin Sandsmark <martin.sandsmark> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | bcooksley, benwilby, fabo, jb, martin.sandsmark, mschiff, myriam, paulo131, valorie.zimmerman |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.3.1 | |
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
Patch to correct the bug |
Description
perrantrevan
2010-07-29 21:21:04 UTC
The crash is in the Phonon VLC backend, reassigning. Confirmed, tis is the debug output I get on the Konsole: [0x2446d28] main input debug: Creating an input for '001-air-space_maker.mp3' amarok: [EngineController] Artist : ("") amarok: [EngineController] Album : ("") amarok: [EngineController] Title : ("001-air-space_maker.mp3") amarok: [EngineController] Genre : ("") amarok: [EngineController] Tracknumber: ("") amarok: [EngineController] Length : () amarok: [EngineController] Track changed: true amarok: BEGIN: void Engine::EngineSubject::newMetaDataNotify(const QHash<long long int, QString>&, bool) amarok: BEGIN: virtual void ScrobblerAdapter::engineNewMetaData(const QHash<long long int, QString>&, bool) amarok: END__: virtual void ScrobblerAdapter::engineNewMetaData(const QHash<long long int, QString>&, bool) - Took 0.00014s amarok: BEGIN: virtual void Context::ContextView::engineNewMetaData(const QHash<long long int, QString>&, bool) amarok: END__: virtual void Context::ContextView::engineNewMetaData(const QHash<long long int, QString>&, bool) - Took 0.00012s amarok: END__: void Engine::EngineSubject::newMetaDataNotify(const QHash<long long int, QString>&, bool) - Took 0.0006s amarok: END__: void EngineController::slotMetaDataChanged() - Took 0.18s QSocketNotifier: Invalid socket 61 and type 'Read', disabling... [0x1391068] main playlist debug: no fetch required for (null) (art currently (null)) And another backtrace: Thread 1 (Thread 0x7ffa4a1c0780 (LWP 4080)): [KCrash Handler] #6 0x00007ffa48256c3b in QWidget::testAttribute_helper (this=0x6e006100690072, attribute=Qt::WA_WState_Created) at kernel/qwidget.cpp:10718 #7 0x00007ffa48264efe in QWidget::testAttribute (this=0x6e006100690072) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:1031 #8 QWidget::winId (this=0x6e006100690072) at kernel/qwidget.cpp:2390 #9 0x00007ffa31cbab22 in Phonon::VLC::VLCMediaObject::setVLCWidgetId (this=0x10a8cd0) at /home/myriam/kde/src/phonon-vlc/vlc/vlcmediaobject.cpp:128 #10 0x00007ffa31cbad33 in Phonon::VLC::VLCMediaObject::playInternal (this=0x10a8cd0) at /home/myriam/kde/src/phonon-vlc/vlc/vlcmediaobject.cpp:179 #11 0x00007ffa31cb34dc in Phonon::VLC::MediaObject::play (this=0x10a8cd0) at /home/myriam/kde/src/phonon-vlc/vlc/mediaobject.cpp:120 #12 0x00007ffa49348846 in EngineController::playUrl (this=0x10be950, url=..., offset=0) at /home/myriam/kde/src/amarok/src/EngineController.cpp:503 #13 0x00007ffa49347cff in EngineController::play (this=0x10be950, track=..., offset=0) at /home/myriam/kde/src/amarok/src/EngineController.cpp:403 #14 0x00007ffa48f7a9f6 in Playlist::Actions::play (this=0x185b720, trackid=3018580614335094871, now=true) at /home/myriam/kde/src/amarok/src/playlist/PlaylistActions.cpp:232 #15 0x00007ffa48f7a76d in Playlist::Actions::play (this=0x185b720, index=...) at /home/myriam/kde/src/amarok/src/playlist/PlaylistActions.cpp:198 #16 0x00007ffa4902bbf2 in Playlist::PrettyListView::trackActivated (this=0x23c34a0, idx=...) at /home/myriam/kde/src/amarok/src/playlist/view/listview/PrettyListView.cpp:289 #17 0x00007ffa4903064f in Playlist::PrettyListView::qt_metacall (this=0x23c34a0, _c=QMetaObject::InvokeMetaMethod, _id=22, _a=0x7fff210115a0) at /home/myriam/kde/build/amarok/src/PrettyListView.moc:148 #18 0x00007ffa478577a7 in QMetaObject::activate (sender=0x23c34a0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1c) at kernel/qobject.cpp:3280 #19 0x00007ffa4874f4b5 in QAbstractItemView::doubleClicked (this=0x6e006100690072, _t1=<value optimized out>) at .moc/release-shared/moc_qabstractitemview.cpp:338 #20 0x00007ffa48752062 in QAbstractItemView::mouseDoubleClickEvent (this=0x23c34a0, event=0x7fff21012310) at itemviews/qabstractitemview.cpp:1821 #21 0x00007ffa482632e2 in QWidget::event (this=0x23c34a0, event=0x7fff21012310) at kernel/qwidget.cpp:8161 #22 0x00007ffa48627b06 in QFrame::event (this=0x23c34a0, e=0x7fff21012310) at widgets/qframe.cpp:557 #23 0x00007ffa4875f7ab in QAbstractItemView::viewportEvent (this=0x23c34a0, event=0x7fff21012310) at itemviews/qabstractitemview.cpp:1619 #24 0x00007ffa4783f2b7 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x21533c0, event=0x7fff21012310) at kernel/qcoreapplication.cpp:847 #25 0x00007ffa4820dcac in QApplicationPrivate::notify_helper (this=0xf34fe0, receiver=0x21533c0, e=0x7fff21012310) at kernel/qapplication.cpp:4385 #26 0x00007ffa48213fee in QApplication::notify (this=0x7fff21012fc0, receiver=0x21533c0, e=0x7fff21012310) at kernel/qapplication.cpp:3952 #27 0x00007ffa49bdd926 in KApplication::notify (this=0x7fff21012fc0, receiver=0x21533c0, event=0x7fff21012310) at ../../kdeui/kernel/kapplication.cpp:309 #28 0x00007ffa4783fa8c in QCoreApplication::notifyInternal (this=0x7fff21012fc0, receiver=0x21533c0, event=0x7fff21012310) at kernel/qcoreapplication.cpp:732 #29 0x00007ffa48212a9e in QCoreApplication::sendEvent (receiver=0x21533c0, event=0x7fff21012310, alienWidget=0x21533c0, nativeWidget=0x1c36fd0, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215 #30 QApplicationPrivate::sendMouseEvent (receiver=0x21533c0, event=0x7fff21012310, alienWidget=0x21533c0, nativeWidget=0x1c36fd0, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at kernel/qapplication.cpp:3051 #31 0x00007ffa48295335 in QETWidget::translateMouseEvent (this=0x1c36fd0, event=<value optimized out>) at kernel/qapplication_x11.cpp:4403 #32 0x00007ffa48293c6c in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff21012c30) at kernel/qapplication_x11.cpp:3536 #33 0x00007ffa482bfe82 in x11EventSourceDispatch (s=0xf3fc10, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146 #34 0x00007ffa3f5f78c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #35 0x00007ffa3f5fb748 in ?? () from /lib/libglib-2.0.so.0 #36 0x00007ffa3f5fb8fc in g_main_context_iteration () from /lib/libglib-2.0.so.0 #37 0x00007ffa4786bb83 in QEventDispatcherGlib::processEvents (this=0xdd4030, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412 #38 0x00007ffa482bf7ee in QGuiEventDispatcherGlib::processEvents (this=0x6e006100690072, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204 #39 0x00007ffa4783e7b2 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149 #40 0x00007ffa4783eb9c in QEventLoop::exec (this=0x7fff21012f60, flags=) at kernel/qeventloop.cpp:201 #41 0x00007ffa47842c4b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009 #42 0x000000000040b026 in main (argc=4, argv=0x7fff21014f18) at /home/myriam/kde/src/amarok/src/main.cpp:237 Created attachment 49765 [details]
New crash information added by DrKonqi
amarok (2.3-GIT) on KDE Platform 4.4.92 (KDE 4.4.92 (KDE 4.5 RC2)) using Qt 4.7.0
- What I was doing when the application crashed: testing out freshly built phonon-vlc backend
- Custom settings of the application: set phonon-vlc to be the backend and tried to play a track. Amarok immediatedly crashed. Restarted Amarok (also built from GIT today), tried playing another track with the same results.
-- Backtrace (Reduced):
#4 0x00007f3abeb58c3f in QWidget::testAttribute_helper (this=0x192d0c0, attribute=Qt::WA_WState_Created) at kernel/qwidget.cpp:10718
#5 0x00007f3abeb66efe in QWidget::testAttribute (this=0x192d0c0) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:1031
#6 QWidget::winId (this=0x192d0c0) at kernel/qwidget.cpp:2390
#7 0x00007f3aa8a6cb12 in Phonon::VLC::VLCMediaObject::setVLCWidgetId (this=0x192f450) at /home/valorie/kde/src/phonon-vlc/vlc/vlcmediaobject.cpp:128
#8 0x00007f3aa8a6cd23 in Phonon::VLC::VLCMediaObject::playInternal (this=0x192f450) at /home/valorie/kde/src/phonon-vlc/vlc/vlcmediaobject.cpp:179
commit 5e49d24 seems to be the culprit I add the same issue and same kind of backtrace when trying to play a test sound file in KDE systemsettings after selecting VLC engine. I looked at the source code, and it seems to me that the issue is about p_video_widget variable. It should be initialized to NULL in MediaObject constructor, and in VLCMediaObject::playInternal(), one should add if(p_video_widget) before setVLCWidgetId(); in order to assign a video widget to vlc only if it exists. It solves the bug for me, at least in systemsettings and amarok from what I have seen. I am not an expert, but I can try to post a patch if you want. Please post the patch. Here it is. Hope i did it in the correct way, I never used git before ! diff --git a/vlc/mediaobject.cpp b/vlc/mediaobject.cpp index 4109e6f..e086f32 100644 --- a/vlc/mediaobject.cpp +++ b/vlc/mediaobject.cpp @@ -50,6 +50,7 @@ MediaObject::MediaObject(QObject *p_parent) { currentState = Phonon::StoppedState; i_video_widget_id = 0; + p_video_widget = NULL; b_prefinish_mark_reached_emitted = false; b_about_to_finish_emitted = false; i_transition_time = 0; diff --git a/vlc/vlcmediaobject.cpp b/vlc/vlcmediaobject.cpp index 62e071d..347447c 100644 --- a/vlc/vlcmediaobject.cpp +++ b/vlc/vlcmediaobject.cpp @@ -176,7 +176,8 @@ void VLCMediaObject::playInternal() // This will reset the GUI clearMediaController(); - setVLCWidgetId(); + if(p_video_widget) + setVLCWidgetId(); // Play if(libvlc_media_player_play(p_vlc_media_player)) Created attachment 49833 [details]
Patch to correct the bug
*** Bug 246781 has been marked as a duplicate of this bug. *** *** Bug 246852 has been marked as a duplicate of this bug. *** Fixed by commit http://gitorious.org/phonon/phonon-vlc/commit/88fb405d16806dac8e2c537d40931e4bea6cfdd0 Reassigning to the new bugzilla product for better bug tracing of the various backends. Sorry for the noise. |