Bug 226167 - Amarok crashes when I drag a mp3 file from Dolphin and drop it into the playlist
Summary: Amarok crashes when I drag a mp3 file from Dolphin and drop it into the playlist
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (show other bugs)
Version: 2.3-GIT
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 226336 226841 226922 227283 227286 227441 228257 228263 228602 228610 228938 229027 229707 230205 230255 230269 230463 237563 244840 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-10 18:21 UTC by Alexander
Modified: 2011-01-20 09:11 UTC (History)
25 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.3.0
Sentry Crash Report:


Attachments
New crash information added by DrKonqi (10.61 KB, text/plain)
2010-02-15 12:22 UTC, Rasmus Steinke
Details
New crash information added by DrKonqi (26.17 KB, text/plain)
2010-02-16 00:23 UTC, Javier Conti
Details
New crash information added by DrKonqi (11.96 KB, text/plain)
2010-02-16 19:05 UTC, Kristjan Ugrin
Details
New crash information added by DrKonqi (18.74 KB, text/plain)
2010-03-04 17:32 UTC, Lukas Dolezal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2010-02-10 18:21:59 UTC
Application: amarok (2.2-GIT)
KDE Platform Version: 4.4.00 (KDE 4.4.0)
Qt Version: 4.6.1
Operating System: Linux 2.6.32-ARCH x86_64

-- Information about the crash:
1. Open the music folder in Dolphin.
2. Open Amarok.
3. Drop the file into playlist.

The crash can be reproduced every time.

 -- Backtrace:
Application: Amarok (amarok), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fb3d122f7a0 (LWP 10891))]

Thread 10 (Thread 0x7fb3ba7ba710 (LWP 10896)):
#0  0x00007fb3cc63507c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fb3cf76414b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb3cb076796 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /usr/lib/libthreadweaver.so.4
#3  0x00007fb3cb078dab in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#4  0x00007fb3cb078dc4 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#5  0x00007fb3cb078dc4 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#6  0x00007fb3cb0772ff in ThreadWeaver::ThreadRunHelper::run(ThreadWeaver::WeaverImpl*, ThreadWeaver::Thread*) () from /usr/lib/libthreadweaver.so.4
#7  0x00007fb3cb077868 in ThreadWeaver::Thread::run() () from /usr/lib/libthreadweaver.so.4
#8  0x00007fb3cf763185 in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007fb3cc63081a in start_thread () from /lib/libpthread.so.0
#10 0x00007fb3ce2c3c7d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7fb3b1ff6710 (LWP 10897)):
#0  0x00007fb3cc63507c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fb3cf76414b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb3cb076796 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /usr/lib/libthreadweaver.so.4
#3  0x00007fb3cb078dab in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#4  0x00007fb3cb078dc4 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#5  0x00007fb3cb078dc4 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#6  0x00007fb3cb078dc4 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#7  0x00007fb3cb078dc4 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#8  0x00007fb3cb078dc4 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#9  0x00007fb3cb0772ff in ThreadWeaver::ThreadRunHelper::run(ThreadWeaver::WeaverImpl*, ThreadWeaver::Thread*) () from /usr/lib/libthreadweaver.so.4
#10 0x00007fb3cb077868 in ThreadWeaver::Thread::run() () from /usr/lib/libthreadweaver.so.4
#11 0x00007fb3cf763185 in ?? () from /usr/lib/libQtCore.so.4
#12 0x00007fb3cc63081a in start_thread () from /lib/libpthread.so.0
#13 0x00007fb3ce2c3c7d in clone () from /lib/libc.so.6
#14 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7fb3b17f5710 (LWP 10900)):
#0  0x00007fb3cc63507c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fb3cf76414b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb3cb076796 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /usr/lib/libthreadweaver.so.4
#3  0x00007fb3cb078dab in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#4  0x00007fb3cb0772ff in ThreadWeaver::ThreadRunHelper::run(ThreadWeaver::WeaverImpl*, ThreadWeaver::Thread*) () from /usr/lib/libthreadweaver.so.4
#5  0x00007fb3cb077868 in ThreadWeaver::Thread::run() () from /usr/lib/libthreadweaver.so.4
#6  0x00007fb3cf763185 in ?? () from /usr/lib/libQtCore.so.4
#7  0x00007fb3cc63081a in start_thread () from /lib/libpthread.so.0
#8  0x00007fb3ce2c3c7d in clone () from /lib/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7fb3a6f5d710 (LWP 10909)):
#0  0x00007fb3cc63507c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fb3cf76414b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb3cb076796 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /usr/lib/libthreadweaver.so.4
#3  0x00007fb3cb078dab in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#4  0x00007fb3cb078dc4 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib/libthreadweaver.so.4
#5  0x00007fb3cb0772ff in ThreadWeaver::ThreadRunHelper::run(ThreadWeaver::WeaverImpl*, ThreadWeaver::Thread*) () from /usr/lib/libthreadweaver.so.4
#6  0x00007fb3cb077868 in ThreadWeaver::Thread::run() () from /usr/lib/libthreadweaver.so.4
#7  0x00007fb3cf763185 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007fb3cc63081a in start_thread () from /lib/libpthread.so.0
#9  0x00007fb3ce2c3c7d in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fb3a5d29710 (LWP 10929)):
#0  0x00007fb3cc63507c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fb3ca8d17a6 in ?? () from /usr/lib/libQtScript.so.4
#2  0x00007fb3ca8d17e9 in ?? () from /usr/lib/libQtScript.so.4
#3  0x00007fb3cc63081a in start_thread () from /lib/libpthread.so.0
#4  0x00007fb3ce2c3c7d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fb398d02710 (LWP 7723)):
#0  0x00007fb3cc63507c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fb3bda29dd0 in gst_task_func () from /usr/lib/libgstreamer-0.10.so.0
#2  0x00007fb3c7060532 in g_thread_pool_thread_proxy () from /usr/lib/libglib-2.0.so.0
#3  0x00007fb3c705ef34 in g_thread_create_proxy () from /usr/lib/libglib-2.0.so.0
#4  0x00007fb3cc63081a in start_thread () from /lib/libpthread.so.0
#5  0x00007fb3ce2c3c7d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fb3a6754710 (LWP 7725)):
#0  0x00007fb3cc63507c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fb3bda29dd0 in gst_task_func () from /usr/lib/libgstreamer-0.10.so.0
#2  0x00007fb3c7060532 in g_thread_pool_thread_proxy () from /usr/lib/libglib-2.0.so.0
#3  0x00007fb3c705ef34 in g_thread_create_proxy () from /usr/lib/libglib-2.0.so.0
#4  0x00007fb3cc63081a in start_thread () from /lib/libpthread.so.0
#5  0x00007fb3ce2c3c7d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fb399503710 (LWP 7726)):
#0  0x00007fb3cc63507c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fb3bda29dd0 in gst_task_func () from /usr/lib/libgstreamer-0.10.so.0
#2  0x00007fb3c7060532 in g_thread_pool_thread_proxy () from /usr/lib/libglib-2.0.so.0
#3  0x00007fb3c705ef34 in g_thread_create_proxy () from /usr/lib/libglib-2.0.so.0
#4  0x00007fb3cc63081a in start_thread () from /lib/libpthread.so.0
#5  0x00007fb3ce2c3c7d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fb398501710 (LWP 7734)):
#0  0x00007fb3be081802 in snd_pcm_rate_avail_update () from /usr/lib/libasound.so.2
#1  0x00007fb3be069610 in snd1_pcm_write_areas () from /usr/lib/libasound.so.2
#2  0x00007fb3be07453b in snd_pcm_mmap_writei () from /usr/lib/libasound.so.2
#3  0x00007fb3bcd1e65a in gst_alsasink_write () from /usr/lib/gstreamer-0.10/libgstalsa.so
#4  0x00007fb3bd14f018 in audioringbuffer_thread_func () from /usr/lib/libgstaudio-0.10.so.0
#5  0x00007fb3c705ef34 in g_thread_create_proxy () from /usr/lib/libglib-2.0.so.0
#6  0x00007fb3cc63081a in start_thread () from /lib/libpthread.so.0
#7  0x00007fb3ce2c3c7d in clone () from /lib/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fb3d122f7a0 (LWP 10891)):
[KCrash Handler]
#5  0x00007fb3d029810d in Playlist::ViewCommon::trackActionsFor(QWidget*, QModelIndex const*) () from /usr/lib/libamaroklib.so.1
#6  0x00007fb3d0298e1a in Playlist::ViewCommon::actionsFor(QWidget*, QModelIndex const*, bool) () from /usr/lib/libamaroklib.so.1
#7  0x00007fb3d02b3620 in Playlist::PrettyListView::startDrag(QFlags<Qt::DropAction>) () from /usr/lib/libamaroklib.so.1
#8  0x00007fb3cf1417be in QAbstractItemView::mouseMoveEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#9  0x00007fb3cf159161 in QListView::mouseMoveEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#10 0x00007fb3cec723ef in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#11 0x00007fb3cf0167e6 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
#12 0x00007fb3cf145fbb in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib/libQtGui.so.4
#13 0x00007fb3cf8561e7 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#14 0x00007fb3cec1c44c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#15 0x00007fb3cec2324b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#16 0x00007fb3d05754ca in App::notify(QObject*, QEvent*) () from /usr/lib/libamaroklib.so.1
#17 0x00007fb3cf856dcc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#18 0x00007fb3cec2241e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#19 0x00007fb3ceca184b in ?? () from /usr/lib/libQtGui.so.4
#20 0x00007fb3ceca055a in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#21 0x00007fb3ceccaa12 in ?? () from /usr/lib/libQtGui.so.4
#22 0x00007fb3c703626e in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#23 0x00007fb3c7039c28 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#24 0x00007fb3c7039d50 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#25 0x00007fb3cf880243 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#26 0x00007fb3cecca60e in ?? () from /usr/lib/libQtGui.so.4
#27 0x00007fb3cf8556f2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#28 0x00007fb3cf855acc in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#29 0x00007fb3cf85980b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#30 0x0000000000408592 in _start ()

Reported using DrKonqi
Comment 1 Myriam Schweingruber 2010-02-10 19:43:04 UTC
And you do use a build of today, don't you?
Comment 2 Myriam Schweingruber 2010-02-10 20:50:55 UTC
Adapting title
Comment 3 Myriam Schweingruber 2010-02-11 18:11:50 UTC
*** Bug 226336 has been marked as a duplicate of this bug. ***
Comment 4 Alexander 2010-02-13 17:38:16 UTC
> And you do use a build of today, don't you?
Yep, and today build crashes too :)
Comment 5 Myriam Schweingruber 2010-02-14 22:39:37 UTC
*** Bug 226841 has been marked as a duplicate of this bug. ***
Comment 6 Myriam Schweingruber 2010-02-14 22:40:05 UTC
Confirmed by duplicate
Comment 7 Myriam Schweingruber 2010-02-15 09:27:32 UTC
*** Bug 226922 has been marked as a duplicate of this bug. ***
Comment 8 Rasmus Steinke 2010-02-15 12:22:17 UTC
Created attachment 40796 [details]
New crash information added by DrKonqi

Can reproduce. Also KDE SC 4.4 with amarok 2.2-git. This in on arch linux using kdemod.
Comment 9 Javier Conti 2010-02-16 00:23:01 UTC
Created attachment 40820 [details]
New crash information added by DrKonqi

In my case, I drag from the Amarok colleciton itself, into the playlist.
Comment 10 Kristjan Ugrin 2010-02-16 19:05:36 UTC
Created attachment 40860 [details]
New crash information added by DrKonqi

I can also confirm this. Dragging files from dolphin to amarok causes crash.
Comment 11 Myriam Schweingruber 2010-02-16 23:43:52 UTC
*** Bug 227283 has been marked as a duplicate of this bug. ***
Comment 12 Myriam Schweingruber 2010-02-16 23:46:51 UTC
*** Bug 227286 has been marked as a duplicate of this bug. ***
Comment 13 Myriam Schweingruber 2010-02-18 08:44:40 UTC
*** Bug 227441 has been marked as a duplicate of this bug. ***
Comment 14 Kevin Funk 2010-02-18 16:59:08 UTC
commit b1377ce5f642b3440e6485988d991eeeee98f0e5
Author: Kevin Funk <krf@electrostorm.net>
Date:   Thu Feb 18 16:56:19 2010 +0100

    Fix crash when dragging files into Amarok.
    BUG: 226167

diff --git a/ChangeLog b/ChangeLog
index 2742f2d..4f89efa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,8 @@ VERSION 2.3
       last check.
 
   BUGFIXES:
+    * Fixed a bug when trying to drag files from some app into Amarok.
+      (BR 226167)
     * Fixed a bug in podcast parsing that broke all feeds that do not include a
       guid and possible overwrited data from other podcasts. Introduced in 2.3 beta.
       (BR 227515)
diff --git a/src/playlist/view/listview/PrettyListView.cpp b/src/playlist/view/listview/PrettyListView.cpp
index ab2fa9f..f36b3a1 100644
--- a/src/playlist/view/listview/PrettyListView.cpp
+++ b/src/playlist/view/listview/PrettyListView.cpp
@@ -553,6 +553,10 @@ Playlist::PrettyListView::startDrag( Qt::DropActions supportedActions )
 {
     DEBUG_BLOCK
 
+    QModelIndexList indices = selectedIndexes();
+    if( indices.isEmpty() )
+        return; // no items selected in the view, abort. See bug 226167
+
     //Waah? when a parent item is dragged, startDrag is called a bunch of times
     static bool ongoingDrags = false;
     if( ongoingDrags )
@@ -564,15 +568,12 @@ Playlist::PrettyListView::startDrag( Qt::DropActions supportedActions )
 
     if( m_pd && m_pd->isHidden() )
     {
-
         m_pd->setSvgRenderer( The::svgHandler()->getRenderer( "amarok/images/pud_items.svg" ) );
         qDebug() << "svgHandler SVG renderer is " << (QObject*)(The::svgHandler()->getRenderer( "amarok/images/pud_items.svg" ));
         qDebug() << "m_pd SVG renderer is " << (QObject*)(m_pd->svgRenderer());
         qDebug() << "does play exist in renderer? " << ( The::svgHandler()->getRenderer( "amarok/images/pud_items.svg" )->elementExists( "load" ) );
-        QModelIndexList indices = selectedIndexes();
 
         QList<QAction*> actions =  actionsFor( this, &indices.first(), true );
-
         foreach( QAction * action, actions )
             m_pd->addItem( The::popupDropperFactory()->createItem( action ), true );
Comment 15 Myriam Schweingruber 2010-02-24 13:08:33 UTC
*** Bug 228263 has been marked as a duplicate of this bug. ***
Comment 16 Myriam Schweingruber 2010-02-24 13:09:04 UTC
*** Bug 228257 has been marked as a duplicate of this bug. ***
Comment 17 Myriam Schweingruber 2010-02-26 18:03:04 UTC
*** Bug 228602 has been marked as a duplicate of this bug. ***
Comment 18 Myriam Schweingruber 2010-02-26 18:03:31 UTC
*** Bug 228610 has been marked as a duplicate of this bug. ***
Comment 19 Myriam Schweingruber 2010-02-28 20:37:13 UTC
*** Bug 228938 has been marked as a duplicate of this bug. ***
Comment 20 Myriam Schweingruber 2010-03-02 10:10:54 UTC
*** Bug 229027 has been marked as a duplicate of this bug. ***
Comment 21 Lukas Dolezal 2010-03-04 17:32:02 UTC
Created attachment 41331 [details]
New crash information added by DrKonqi

Dragged folder from dolphin to amarok's "drop area". Folder was located in mounted NTFS partition.
Comment 22 Myriam Schweingruber 2010-03-04 17:41:47 UTC
(In reply to comment #21)
> Created an attachment (id=41331) [details]
> New crash information added by DrKonqi
> 
> Dragged folder from dolphin to amarok's "drop area". Folder was located in
> mounted NTFS partition.

You have seen that this is already fixed in the git version since February 18th, didn't you? This was after the 2.2.90 release, so unless you are using the git version there is not much use to comment on this.
Comment 23 Myriam Schweingruber 2010-03-06 18:08:03 UTC
*** Bug 229707 has been marked as a duplicate of this bug. ***
Comment 24 Myriam Schweingruber 2010-03-10 21:48:09 UTC
*** Bug 230205 has been marked as a duplicate of this bug. ***
Comment 25 Myriam Schweingruber 2010-03-11 10:41:55 UTC
*** Bug 230269 has been marked as a duplicate of this bug. ***
Comment 26 Myriam Schweingruber 2010-03-11 11:09:59 UTC
*** Bug 230255 has been marked as a duplicate of this bug. ***
Comment 27 Mikko C. 2010-03-13 08:27:40 UTC
*** Bug 230463 has been marked as a duplicate of this bug. ***
Comment 28 Sven Krohlas 2010-05-14 08:40:41 UTC
*** Bug 237563 has been marked as a duplicate of this bug. ***
Comment 29 Myriam Schweingruber 2010-07-16 16:27:07 UTC
*** Bug 244840 has been marked as a duplicate of this bug. ***