Bug 176139

Summary: Using the filter on file browser tab does not work
Product: [Applications] amarok Reporter: Attilio Scotolati <nexor>
Component: File BrowserAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: amarok-bugs-dist, faure, lydia, shikamaru, shrikantkhare, simon
Priority: NOR    
Version: 2.1-SVN   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Attilio Scotolati 2008-11-26 15:45:11 UTC
Version:           1.94 (using KDE 4.1.2)
OS:                Linux
Installed from:    Fedora RPMs

While i browse my music folders on the "files" left tab, some of the strings i put on the file filter lead to a crash in amarok; this seems to happen in any folder, but not with the same terms.

I'll take my "/home/Attilio/Musica/Blur" folder as an example (just because it is small):

ls -l
totale 9948
-rwxrwxrwx 2 root root 3321984 25 mar  2008 Blur - Country House.mp3
-rwxrwxrwx 2 root root 3876992 20 giu  2005 Blur - Music Is My Radar.mp3
-rwxrwxrwx 2 root root 2967680  2 gen  2007 Blur - Parklife.mp3
-rwxrwxrwx 1 root root   11252  2 gen  2007 Folder.jpg

Searching for "music" gives the expected result, searching for "park" i have a crash, when i enter the "a", entering "c", "t" or "h" crashes as well, and many other combinations do the same.
I have noticed that any letter after "p" on that folder causes a crash, but again not on other folders.
Also only folders containing music files seem to be affected.

I don't know why but after some tries crashes no longer trigger kde's crash handler, and when they do if i generate the backtrace "amarok" process stays active and starts eating cpu endlessly, i have to kill it.
This is a backtrace but i'm not sure which letters lead to it:

Applicazione: Amarok (amarok), segnale SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb80b3790 (LWP 21990)]
[New Thread 0xa6399b90 (LWP 22036)]
[New Thread 0xa74f1b90 (LWP 22034)]
[New Thread 0xa7ef2b90 (LWP 22033)]
[New Thread 0xa88f3b90 (LWP 22032)]
[New Thread 0xa92f4b90 (LWP 22031)]
[New Thread 0xab3beb90 (LWP 22030)]
[New Thread 0xabdbfb90 (LWP 22029)]
[New Thread 0xac7c0b90 (LWP 22028)]
[New Thread 0xae051b90 (LWP 22026)]
[New Thread 0xaea52b90 (LWP 22025)]
[New Thread 0xaf453b90 (LWP 22024)]
[New Thread 0xb091ab90 (LWP 22023)]
[New Thread 0xb143bb90 (LWP 22021)]
[New Thread 0xb1e3cb90 (LWP 22020)]
[New Thread 0xb6880b90 (LWP 22019)]
[New Thread 0x916bb90 (LWP 22014)]
[KCrash handler]
#6  0x02e9f358 in ?? () from /usr/lib/libkio.so.5
#7  0x02ea1c09 in ?? () from /usr/lib/libkio.so.5
#8  0x02ea396d in KDirModel::qt_metacall () from /usr/lib/libkio.so.5
#9  0x04422de0 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#10 0x04423b62 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0x02e8c8c3 in KDirLister::itemsDeleted () from /usr/lib/libkio.so.5
#12 0x02e94b19 in KDirLister::emitChanges () from /usr/lib/libkio.so.5
#13 0x0304d3d7 in KDirOperator::updateDir () from /usr/lib/libkfile.so.4
#14 0x003ccbf1 in FileBrowser::Widget::slotFilterChange (this=0xad05148, 
    nf=@0xbfaeae94)
    at /usr/src/debug/amarok-1.94/src/browsers/filebrowser/FileBrowser.cpp:326
#15 0x003cd0f2 in FileBrowser::Widget::qt_metacall (this=0xad05148, 
    _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfaeacbc)
    at /usr/src/debug/amarok-1.94/i386-redhat-linux-gnu/src/FileBrowser.moc:121
#16 0x04422de0 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#17 0x04423b62 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#18 0x02477493 in QComboBox::editTextChanged () from /usr/lib/libQtGui.so.4
#19 0x024810be in QComboBox::qt_metacall () from /usr/lib/libQtGui.so.4
#20 0x02b462da in KComboBox::qt_metacall () from /usr/lib/libkdeui.so.5
#21 0x02b5a5ea in KHistoryComboBox::qt_metacall () from /usr/lib/libkdeui.so.5
#22 0x04422de0 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#23 0x04423b62 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#24 0x024b9e13 in QLineEdit::textChanged () from /usr/lib/libQtGui.so.4
#25 0x024c02a4 in ?? () from /usr/lib/libQtGui.so.4
#26 0x024c1efb in QLineEdit::insert () from /usr/lib/libQtGui.so.4
#27 0x024c2b98 in QLineEdit::keyPressEvent () from /usr/lib/libQtGui.so.4
#28 0x02b65255 in KLineEdit::keyPressEvent () from /usr/lib/libkdeui.so.5
#29 0x0217654e in QWidget::event () from /usr/lib/libQtGui.so.4
#30 0x024c06d7 in QLineEdit::event () from /usr/lib/libQtGui.so.4
#31 0x02b6728a in KLineEdit::event () from /usr/lib/libkdeui.so.5
#32 0x0247d6c4 in QComboBox::keyPressEvent () from /usr/lib/libQtGui.so.4
#33 0x02b5a306 in KHistoryComboBox::keyPressEvent ()
   from /usr/lib/libkdeui.so.5
#34 0x0217654e in QWidget::event () from /usr/lib/libQtGui.so.4
#35 0x0247bd8f in QComboBox::event () from /usr/lib/libQtGui.so.4
#36 0x0211e62c in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#37 0x02127546 in QApplication::notify () from /usr/lib/libQtGui.so.4
#38 0x02aa831d in KApplication::notify () from /usr/lib/libkdeui.so.5
#39 0x0440e1b1 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#40 0x0217f14e in ?? () from /usr/lib/libQtGui.so.4
#41 0x021b4190 in ?? () from /usr/lib/libQtGui.so.4
#42 0x021b6306 in ?? () from /usr/lib/libQtGui.so.4
#43 0x0218e865 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#44 0x021b7d8a in ?? () from /usr/lib/libQtGui.so.4
#45 0x00ce3208 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#46 0x00ce68b3 in ?? () from /lib/libglib-2.0.so.0
#47 0x00ce6a71 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#48 0x044387e8 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#49 0x021b7485 in ?? () from /usr/lib/libQtGui.so.4
#50 0x0440c87a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#51 0x0440ca3a in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#52 0x0440f0f5 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#53 0x0211e4a7 in QApplication::exec () from /usr/lib/libQtGui.so.4
#54 0x0804c1e0 in main (argc=1, argv=0xbfaec6a4)
    at /usr/src/debug/amarok-1.94/src/main.cpp:128
Comment 1 simon 2008-11-26 15:48:25 UTC
another backtrace

Thread 1 (Thread 0x7f1d40c4d750 (LWP 9017)):
#0  0x00007f1d3809a7e1 in nanosleep () from /lib/libc.so.6
#1  0x00007f1d3809a604 in sleep () from /lib/libc.so.6
#2  0x00007f1d3d1adf8b in ?? () from /usr/lib64/libkdeui.so.5
#3  0x00007f1d3d1ae70d in KCrash::defaultCrashHandler () from /usr/lib64/libkdeui.so.5
#4  <signal handler called>
#5  0x00007f1d3d64b9f4 in ?? () from /usr/lib64/libkio.so.5
#6  0x00007f1d3d64ed70 in ?? () from /usr/lib64/libkio.so.5
#7  0x00007f1d3d64fe81 in KDirModel::qt_metacall () from /usr/lib64/libkio.so.5
#8  0x00007f1d39d8826c in QMetaObject::activate () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007f1d3d639095 in KDirLister::itemsDeleted () from /usr/lib64/libkio.so.5
#10 0x00007f1d3d643182 in KDirLister::emitChanges () from /usr/lib64/libkio.so.5
#11 0x00007f1d4040777f in FileBrowser::Widget::slotFilterChange (this=0x7f1d205130b0, nf=<value optimized out>)
    at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/browsers/filebrowser/FileBrowser.cpp:326
#12 0x00007f1d40407873 in FileBrowser::Widget::qt_metacall (this=0x7f1d205130b0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff48da4d40)
    at /var/tmp/portage/media-sound/amarok-9999/work/amarok_build/src/FileBrowser.moc:121
#13 0x00007f1d39d8826c in QMetaObject::activate () from /usr/lib64/qt4/libQtCore.so.4
#14 0x00007f1d393d4102 in QComboBox::editTextChanged () from /usr/lib64/qt4/libQtGui.so.4
#15 0x00007f1d393dd90a in QComboBox::qt_metacall () from /usr/lib64/qt4/libQtGui.so.4
#16 0x00007f1d3d1f1c85 in KComboBox::qt_metacall () from /usr/lib64/libkdeui.so.5
#17 0x00007f1d3d203365 in KHistoryComboBox::qt_metacall () from /usr/lib64/libkdeui.so.5
#18 0x00007f1d39d8826c in QMetaObject::activate () from /usr/lib64/qt4/libQtCore.so.4
#19 0x00007f1d39411622 in QLineEdit::textChanged () from /usr/lib64/qt4/libQtGui.so.4
#20 0x00007f1d394169d6 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#21 0x00007f1d39418c0e in QLineEdit::keyPressEvent () from /usr/lib64/qt4/libQtGui.so.4
#22 0x00007f1d3d20fe9b in KLineEdit::keyPressEvent () from /usr/lib64/libkdeui.so.5
#23 0x00007f1d39108679 in QWidget::event () from /usr/lib64/qt4/libQtGui.so.4
#24 0x00007f1d394190fb in QLineEdit::event () from /usr/lib64/qt4/libQtGui.so.4
#25 0x00007f1d3d20e0bb in KLineEdit::event () from /usr/lib64/libkdeui.so.5
#26 0x00007f1d393da341 in QComboBox::keyPressEvent () from /usr/lib64/qt4/libQtGui.so.4
#27 0x00007f1d3d202c21 in KHistoryComboBox::keyPressEvent () from /usr/lib64/libkdeui.so.5
#28 0x00007f1d39108679 in QWidget::event () from /usr/lib64/qt4/libQtGui.so.4
#29 0x00007f1d393d946d in QComboBox::event () from /usr/lib64/qt4/libQtGui.so.4
#30 0x00007f1d390bc2be in QApplicationPrivate::notify_helper () from /usr/lib64/qt4/libQtGui.so.4
#31 0x00007f1d390c14f4 in QApplication::notify () from /usr/lib64/qt4/libQtGui.so.4
#32 0x00007f1d3d14f07b in KApplication::notify () from /usr/lib64/libkdeui.so.5
#33 0x00007f1d39d742c8 in QCoreApplication::notifyInternal () from /usr/lib64/qt4/libQtCore.so.4
#34 0x00007f1d391118ac in ?? () from /usr/lib64/qt4/libQtGui.so.4
#35 0x00007f1d3913dbd2 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#36 0x00007f1d3913fbfc in ?? () from /usr/lib64/qt4/libQtGui.so.4
#37 0x00007f1d3911d2bd in QApplication::x11ProcessEvent () from /usr/lib64/qt4/libQtGui.so.4
#38 0x00007f1d39140f45 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#39 0x00007f1d39d73645 in QEventLoop::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#40 0x00007f1d39d737a8 in QEventLoop::exec () from /usr/lib64/qt4/libQtCore.so.4
#41 0x00007f1d39d754ce in QCoreApplication::exec () from /usr/lib64/qt4/libQtCore.so.4
#42 0x00000000004034dd in main (argc=1, argv=0x7fff48da7cf8) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/main.cpp:128
Comment 2 Seb Ruiz 2008-11-26 22:52:46 UTC
reassigning to kdelibs, where this crash seems to occur.
Comment 3 Seb Ruiz 2008-11-26 23:08:52 UTC
*** Bug 176186 has been marked as a duplicate of this bug. ***
Comment 4 Dario Andres 2008-12-04 21:01:04 UTC
*** Bug 172336 has been marked as a duplicate of this bug. ***
Comment 5 David Faure 2009-01-13 23:39:36 UTC
This is fixed with kdelibs-4.1.3 and 4.1.4, isn't it?
Please reopen if not.
Comment 6 Mark Kretschmann 2009-01-14 13:56:31 UTC
@David: Sorry, definitely still present in 4.1.3. Can't comment on 4.1.4 yet.
Comment 7 Attilio Scotolati 2009-01-20 15:26:47 UTC
I've updated to kdelibs 4.1.3 (and amarok 2.0.1) and the bug is still present.
I don't have the time to manually update to 4.1.4 and check against them, I'm just following fedora updates for now.
Comment 8 David Faure 2009-01-21 12:25:42 UTC
And I can't compile amarok to re-test it, because it tries to link to
libmysqld.a which isn't compiled with -fPIC. I'm told I need libmysqld.a from
mysql-5.1 (which is not even in kubuntu intrepid), too much trouble.
Comment 9 Attilio Scotolati 2009-02-01 21:53:06 UTC
Now I'm running kde 4.1.4 and there are some differences: amarok no longer crashes, but the filter has now no effect at all, while still working correctly in Dolphin, if that matters.
Comment 10 Christoph Feck 2009-04-11 12:28:53 UTC
Does the filter work now (Amarok 2.1 beta released)? Please reassign back to kdelibs if you can reproduce a crash or a bug in kdelibs.
Comment 11 Mark Kretschmann 2009-04-11 12:40:29 UTC
Nope, the filter doesn't work at all currently (does nothing), but this could be a regression from my recent radical refactoring of the class.

Have to look closer at this sometime to be sure.
Comment 12 Mark Kretschmann 2009-04-25 16:41:07 UTC
*** Bug 177981 has been marked as a duplicate of this bug. ***
Comment 13 Mark Kretschmann 2009-04-25 19:47:43 UTC
SVN commit 959203 by markey:

Fix the filter widget in the Files browser.

It turns out that the problem here was our custom MyDirLister class,
which tried to filter out files that Amarok cannot play. Once upon a
time (in 1.x) this class actually worked, but now it simply broke
filtering, and for the life of me I can't figure out how it's supposed
to work correctly. Finally I ended up removing the whole class.

So the filtering works again now, but Amarok now also shows non-music
files (.txt, etc). Whether that's a problem is debatable - I've heard
some people saying that the suppression of certain file types was
irritating anyway.

BUG: 176139

 M  +1 -0      ChangeLog  
 M  +0 -1      src/CMakeLists.txt  
 D             src/browsers/filebrowser/MyDirLister.cpp  
 D             src/browsers/filebrowser/MyDirLister.h  
 M  +1 -3      src/browsers/filebrowser/MyDirOperator.cpp  
 M  +0 -2      src/browsers/filebrowser/MyDirOperator.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=959203