Bug 243825 - crash when right click on any item if collection browser is set to view by label [@CollectionTreeView::createExtendedActions ]
Summary: crash when right click on any item if collection browser is set to view by la...
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collection Browser (show other bugs)
Version: 2.3.1-GIT
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: 2.3.2
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-07 09:28 UTC by Vladimir Berezhnoy
Modified: 2010-08-10 13:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
crash dump (26.07 KB, application/octet-stream)
2010-07-07 09:28 UTC, Vladimir Berezhnoy
Details
Backtrace (102.02 KB, text/plain)
2010-07-11 16:59 UTC, Vladimir Berezhnoy
Details
Backtrace (115.26 KB, text/plain)
2010-07-19 02:09 UTC, Vladimir Berezhnoy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Berezhnoy 2010-07-07 09:28:04 UTC
Created attachment 48638 [details]
crash dump

Version:           unspecified (using KDE 4.4.4) 
OS:                Linux

If I set  the collection browser to view by "Label / -Anything-" then right click on any item will crash amarok. Left click doesn't uncollapse the items with [+]
Tested with external and internal database, versions 2.3.1 and git 8316e4bd92f9c3bfaad297020d01a27df672afca

Reproducible: Always

Steps to Reproduce:
Add any label to some tracks, set view to Label / Album. Then uncollapse the lables and see the album list. Pressing [+] for albums will take no effect, right mouse click will crash amarok
Comment 1 Nikolaj Hald Nielsen 2010-07-07 10:40:27 UTC
I cannot reproduce this with latests git master on KDE 4.5
Comment 2 Myriam Schweingruber 2010-07-07 19:27:45 UTC
Vladimir, we would need a backtrace...
Comment 3 Vladimir Berezhnoy 2010-07-11 16:59:21 UTC
Created attachment 48782 [details]
Backtrace

I saw there a lot of "no debugging symbols found", but hope the backtrace is still usefull
Comment 4 Myriam Schweingruber 2010-07-12 01:56:10 UTC
Apparently you have no debugging symbols enabled at all so the backtrace is not useful, sorry. Please see here on how to get a valid backtrace:

http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
Comment 5 Vladimir Berezhnoy 2010-07-12 09:40:35 UTC
It appears that I will need to recompile about 500 of packages on my system, so it wiil take me some time.
Comment 6 Myriam Schweingruber 2010-07-12 12:37:32 UTC
Hm, not for Amarok, you only need to recompile Amarok and it's dependencies, but if you want to have debugging symbols for your whole system then yes, that takes time.
Comment 7 Vladimir Berezhnoy 2010-07-19 02:09:01 UTC
Created attachment 49296 [details]
Backtrace

Here is the backtrace. There are still some libs with no debugging symbols, but I don't know how to fix them.
Comment 8 Myriam Schweingruber 2010-07-19 10:03:17 UTC
I was able to reproduce the crash: Set the Collection Browser view to Label/Artist/album, then right click on an artist produces the crash every time.

Using latest Amarok 2.3.1-git on KDE SC 4.4.92, Kubuntu 0.04


Thread 1 (Thread 0x7f7d567ff780 (LWP 19645)):
[KCrash Handler]
#6  0x00007f7d55565a58 in CollectionTreeView::createExtendedActions (this=0x1f38ec0, indices=...) at /home/myriam/kde/src/amarok/src/browsers/CollectionTreeView.cpp:841
#7  0x00007f7d555618ae in CollectionTreeView::contextMenuEvent (this=0x1f38ec0, event=0x7fff07060770) at /home/myriam/kde/src/amarok/src/browsers/CollectionTreeView.cpp:213
#8  0x00007f7d548b70a4 in QWidget::event (this=0x1f38ec0, event=0x7fff07060770) at kernel/qwidget.cpp:8324
#9  0x00007f7d54c7bb06 in QFrame::event (this=0x1f38ec0, e=0x7fff07060770) at widgets/qframe.cpp:557
#10 0x00007f7d54db37ab in QAbstractItemView::viewportEvent (this=0x1f38ec0, event=0x7fff07060770) at itemviews/qabstractitemview.cpp:1619
#11 0x00007f7d54df1565 in QTreeView::viewportEvent (this=0x1f38ec0, event=0x7fff07060770) at itemviews/qtreeview.cpp:1256
#12 0x00007f7d53e932b7 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x1e33470, event=0x7fff07060770) at kernel/qcoreapplication.cpp:847
#13 0x00007f7d54861cac in QApplicationPrivate::notify_helper (this=0x112c730, receiver=0x1e33470, e=0x7fff07060770) at kernel/qapplication.cpp:4385
#14 0x00007f7d548679b1 in QApplication::notify (this=0x7fff07061450, receiver=0x1e33470, e=0x7fff07060770) at kernel/qapplication.cpp:4031
#15 0x00007f7d5621b926 in KApplication::notify (this=0x7fff07061450, receiver=0x1e33470, event=0x7fff07060770) at ../../kdeui/kernel/kapplication.cpp:309
#16 0x00007f7d53e93a8c in QCoreApplication::notifyInternal (this=0x7fff07061450, receiver=0x1e33470, event=0x7fff07060770) at kernel/qcoreapplication.cpp:732
#17 0x00007f7d548e9382 in QETWidget::translateMouseEvent (this=<value optimized out>, event=<value optimized out>) at kernel/qapplication_x11.cpp:4408
#18 0x00007f7d548e7c6c in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff070610c0) at kernel/qapplication_x11.cpp:3536
#19 0x00007f7d54913e82 in x11EventSourceDispatch (s=0x1136f10, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#20 0x00007f7d4be6f8c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#21 0x00007f7d4be73748 in ?? () from /lib/libglib-2.0.so.0
#22 0x00007f7d4be738fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#23 0x00007f7d53ebfb83 in QEventDispatcherGlib::processEvents (this=0xfd1030, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#24 0x00007f7d549137ee in QGuiEventDispatcherGlib::processEvents (this=0x458eb00, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#25 0x00007f7d53e927b2 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#26 0x00007f7d53e92b9c in QEventLoop::exec (this=0x7fff070613f0, flags=) at kernel/qeventloop.cpp:201
#27 0x00007f7d53e96c4b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#28 0x000000000040b026 in main (argc=4, argv=0x7fff070633a8) at /home/myriam/kde/src/amarok/src/main.cpp:237
Comment 9 Nikhil Marathe 2010-08-10 13:58:49 UTC
commit cc6d4437dfd039cc42459d888d64a8e8c11f26f6
Author: Nikhil Marathe <nsm.nikhil@gmail.com>
Date:   Tue Aug 10 17:27:58 2010 +0530

    A NoLabel Item is also a data item.
    
    NoLabel is a pseudo-type similar to VariousArtists to contain all tracks with no labels.
    It also does not have a parentCollection(). Making it a data item allows anyone trying to get its Collection
    to look into the parent instead.
    
    BUG: 243825

diff --git a/src/browsers/CollectionTreeItem.cpp b/src/browsers/CollectionTreeItem.cpp
index c0a2c94..10fb1fc 100644
--- a/src/browsers/CollectionTreeItem.cpp
+++ b/src/browsers/CollectionTreeItem.cpp
@@ -291,7 +291,7 @@ CollectionTreeItem::level() const
 bool
 CollectionTreeItem::isDataItem() const
 {
-    return m_type == Data || m_type == VariousArtist;
+    return m_type == Data || m_type == VariousArtist || m_type == NoLabel;
 }
 
 bool