Bug 263813 - kde ktorrent folder scan plugin bug
Summary: kde ktorrent folder scan plugin bug
Alias: None
Product: ktorrent
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Joris Guisson
Depends on:
Reported: 2011-01-21 04:01 UTC by joshua skimerhorn
Modified: 2011-05-12 21:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description joshua skimerhorn 2011-01-21 04:01:06 UTC
Application: ktorrent (4.0.3)
KDE Platform Version: 4.5.1 (KDE 4.5.1)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-24-generic-pae i686
Distribution: Ubuntu 10.10

-- Information about the crash:
- What I was doing when the application crashed:
i had enabled the folder scan plugin and i set it to scan the root folder and all sub folders. it was unable to scan the lost and found folder and froze i tried to close the window and it would not let me i had to close the ktorrent process i tried to completly uninstall k torrent completly using aptitude gui i also deleted the search plugin from the system i then reinstalled ktorrent the problem with it being unable to access lost and found showed up again and just like before it froze i opened ktorrent as root using kdesudo and tried to set search plugin to search my home folder this is when it crashed every time i open ktorrent with either kdesudo or normaly i have to shut down the entire process when i open it normaly i dont even get the bug report
- Unusual behavior I noticed:
it freezes when you open it 
- Custom settings of the application:
seaarch folder plugin enabled set to search the home folder or the root folder

The crash can be reproduced every time.

-- Backtrace:
Application: KTorrent (ktorrent), signal: Segmentation fault
[Current thread is 1 (Thread 0xb4825710 (LWP 15947))]

Thread 2 (Thread 0xabd4db70 (LWP 15982)):
#0  0xb500ae36 in clock_gettime (clock_id=-1258229772, tp=0xabd4cee0) at ../sysdeps/unix/clock_gettime.c:100
#1  0xb67de50b in do_gettime () at tools/qelapsedtimer_unix.cpp:105
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:119
#3  0xb68b56e5 in QTimerInfoList::updateCurrentTime (this=0x9fbc69c) at kernel/qeventdispatcher_unix.cpp:339
#4  0xb68b572a in QTimerInfoList::timerWait (this=0x9fbc69c, tm=...) at kernel/qeventdispatcher_unix.cpp:442
#5  0xb68b37a8 in timerSourcePrepareHelper (src=<value optimized out>, timeout=0xabd4d00c) at kernel/qeventdispatcher_glib.cpp:136
#6  0xb68b383d in timerSourcePrepare (source=0x0, timeout=0xb500eff4) at kernel/qeventdispatcher_glib.cpp:169
#7  0xb4f78e6a in g_main_context_prepare () from /lib/libglib-2.0.so.0
#8  0xb4f79279 in ?? () from /lib/libglib-2.0.so.0
#9  0xb4f79848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#10 0xb68b359f in QEventDispatcherGlib::processEvents (this=0x9b15140, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#11 0xb6883609 in QEventLoop::processEvents (this=0xabd4d1e0, flags=) at kernel/qeventloop.cpp:149
#12 0xb6883a8a in QEventLoop::exec (this=0xabd4d1e0, flags=...) at kernel/qeventloop.cpp:201
#13 0xb677fb7e in QThread::exec (this=0x9ecd308) at thread/qthread.cpp:490
#14 0xb686235b in QInotifyFileSystemWatcherEngine::run (this=0x9ecd308) at io/qfilesystemwatcher_inotify.cpp:248
#15 0xb6782df9 in QThreadPrivate::start (arg=0x9ecd308) at thread/qthread_unix.cpp:266
#16 0xb0754ba8 in ?? () from /usr/lib/nvidia-current/libGL.so.1

Thread 1 (Thread 0xb4825710 (LWP 15947)):
[KCrash Handler]
#7  0x00000010 in ?? ()
#8  0xb6870263 in QLibraryPrivate::unload (this=0xab73860) at plugin/qlibrary.cpp:493
#9  0xb68696b7 in QPluginLoader::unload (this=0xab73478) at plugin/qpluginloader.cpp:251
#10 0xb58c0e46 in QCA::ProviderManager::unloadAll() () from /usr/lib/libqca.so.2
#11 0xb58c1094 in QCA::ProviderManager::~ProviderManager() () from /usr/lib/libqca.so.2
#12 0xb58bbe61 in QCA::Global::~Global() () from /usr/lib/libqca.so.2
#13 0xb58b425c in QCA::deinit() () from /usr/lib/libqca.so.2
#14 0xb58b42d7 in QCA::Initializer::~Initializer() () from /usr/lib/libqca.so.2
#15 0xb59e2a68 in __cxa_finalize (d=0xb7710730) at cxa_finalize.c:56
#16 0xb75fca54 in ?? () from /usr/lib/libktorrent.so.2
#17 0xb76ce4b0 in _fini () from /usr/lib/libktorrent.so.2
#18 0xb7763d46 in _dl_fini () at dl-fini.c:248
#19 0xb59e269e in __run_exit_handlers (status=1, listp=0xb5b0c324, run_list_atexit=true) at exit.c:78
#20 0xb59e270f in exit (status=1) at exit.c:100
#21 0xb5deae7b in qt_xio_errhandler () at kernel/qapplication_x11.cpp:745
#22 0xb7067eea in KApplication::xioErrhandler (this=0xbfecac60, dpy=0x992ad18) at ../../kdeui/kernel/kapplication.cpp:416
#23 0xb7067f26 in kde_xio_errhandler (dpy=0x992ad18) at ../../kdeui/kernel/kapplication.cpp:125
#24 0xb516dc36 in _XIOError () from /usr/lib/libX11.so.6
#25 0xb5175a8a in ?? () from /usr/lib/libX11.so.6
#26 0xb5176036 in _XReply () from /usr/lib/libX11.so.6
#27 0xb5152779 in XGetImage () from /usr/lib/libX11.so.6
#28 0xb5e7f5e1 in QX11PixmapData::toImage (this=0x99c3030, rect=...) at image/qpixmap_x11.cpp:1546
#29 0xb5e77b17 in QX11PixmapData::toImage (this=0x99c3030) at image/qpixmap_x11.cpp:1577
#30 0xb5e62b4b in QPixmap::toImage (this=0xbfec6dec) at image/qpixmap.cpp:487
#31 0xb5e17aed in QWidgetPrivate::setWindowIcon_sys (this=0xf707a00, forceReset=false) at kernel/qwidget_x11.cpp:1462
#32 0xb5dc87c8 in QWidget::create (this=0xaa940e0, window=0, initializeWindow=<value optimized out>, destroyOldWindow=<value optimized out>) at kernel/qwidget.cpp:1455
#33 0xb5dc4996 in QWidgetPrivate::createWinId (this=0xf707a00, winid=0) at kernel/qwidget.cpp:2467
#34 0xb5dc8f89 in QWidget::winId (this=0xaa940e0) at kernel/qwidget.cpp:2426
#35 0xb6fb1fe5 in KDialog::setPlainCaption (this=0xaa940e0, caption=...) at ../../kdeui/dialogs/kdialog.cpp:481
#36 0xb6fb4afb in KDialogPrivate::init (this=0xf707b78, q=0xaa940e0) at ../../kdeui/dialogs/kdialog.cpp:172
#37 0xb6fb4d24 in KDialog::KDialog (this=0xaa940e0, parent=0x0, flags=...) at ../../kdeui/dialogs/kdialog.cpp:183
#38 0xb6fca8e0 in KMessageBox::errorListWId (parent_id=0, text=..., strlist=..., caption=..., options=...) at ../../kdeui/dialogs/kmessagebox.cpp:833
#39 0xb6fcab91 in KMessageBox::errorWId (parent_id=0, text=..., caption=..., options=...) at ../../kdeui/dialogs/kmessagebox.cpp:820
#40 0xb6fcde0c in KMessageBox::messageBoxWId (parent_id=0, type=KMessageBox::Error, text=..., caption=..., buttonYes=..., buttonNo=..., buttonCancel=..., dontShow=..., options=) at ../../kdeui/dialogs/kmessagebox.cpp:1097
#41 0xb6fcdeeb in KMessageBox::queuedMessageBoxWId (parent_id=0, type=KMessageBox::Error, text=..., caption=...) at ../../kdeui/dialogs/kmessagebox.cpp:1128
#42 0xb6fcdf70 in KMessageBox::queuedMessageBox (parent=0x0, type=KMessageBox::Error, text=..., caption=...) at ../../kdeui/dialogs/kmessagebox.cpp:1122
#43 0xb705963b in KDialogJobUiDelegate::showErrorMessage (this=0xaa940a0) at ../../kdeui/jobs/kdialogjobuidelegate.cpp:84
#44 0xb731c7c1 in KDirLister::handleError (this=0xa14bde8, job=0xb854448) at ../../kio/kio/kdirlister.cpp:2268
#45 0xb7321e61 in KDirListerCache::slotResult (this=0x9fe4950, j=0xb854448) at ../../kio/kio/kdirlister.cpp:1203
#46 0xb7331bf7 in KDirListerCache::qt_metacall (this=0x9fe4950, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0xbfec7418) at ./kdirlister_p.moc:105
#47 0xb688a8ca in QMetaObject::metacall (object=0x9fe4950, cl=179808448, idx=12, argv=0xbfec7418) at kernel/qmetaobject.cpp:237
#48 0xb689d6ad in QMetaObject::activate (sender=0xb854448, m=0xb6cb2b48, local_signal_index=3, argv=0xa9dcfb0) at kernel/qobject.cpp:3280
#49 0xb6b3f8a3 in KJob::result (this=0xb854448, _t1=0xb854448) at ./kjob.moc:194
#50 0xb6b3fc08 in KJob::emitResult (this=0xb854448) at ../../kdecore/jobs/kjob.cpp:312
#51 0xb7304480 in KIO::SimpleJob::slotFinished (this=0xb854448) at ../../kio/kio/job.cpp:522
#52 0xb73045ee in KIO::ListJob::slotFinished (this=0xb854448) at ../../kio/kio/job.cpp:2553
#53 0xb7301fb3 in KIO::SimpleJob::slotError (this=0xb854448, err=111, errorText=...) at ../../kio/kio/job.cpp:534
#54 0xb73020fe in KIO::SimpleJob::qt_metacall (this=0xb854448, _c=QMetaObject::InvokeMetaMethod, _id=31, _a=0xbfec7724) at ./jobclasses.moc:170
#55 0xb730802a in KIO::ListJob::qt_metacall (this=0xb854448, _c=QMetaObject::InvokeMetaMethod, _id=31, _a=0xbfec7724) at ./jobclasses.moc:810
#56 0xb688a8ca in QMetaObject::metacall (object=0xb854448, cl=179808448, idx=31, argv=0xbfec7724) at kernel/qmetaobject.cpp:237
#57 0xb689d6ad in QMetaObject::activate (sender=0xa227498, m=0xb74b3944, local_signal_index=2, argv=0xa9dcfb0) at kernel/qobject.cpp:3280
#58 0xb73bd059 in KIO::SlaveInterface::error (this=0xa227498, _t1=111, _t2=...) at ./slaveinterface.moc:159
#59 0xb73c07ed in KIO::SlaveInterface::dispatch (this=0xa227498, _cmd=102, rawdata=...) at ../../kio/kio/slaveinterface.cpp:208
#60 0xb73bd483 in KIO::SlaveInterface::dispatch (this=0xa227498) at ../../kio/kio/slaveinterface.cpp:91
#61 0xb73affe8 in KIO::Slave::gotInput (this=0xa227498) at ../../kio/kio/slave.cpp:344
#62 0xb73b01f3 in KIO::Slave::qt_metacall (this=0xa227498, _c=QMetaObject::InvokeMetaMethod, _id=30, _a=0xbfec7a1c) at ./slave.moc:82
#63 0xb688a8ca in QMetaObject::metacall (object=0xa227498, cl=179808448, idx=30, argv=0xbfec7a1c) at kernel/qmetaobject.cpp:237
#64 0xb689d6ad in QMetaObject::activate (sender=0xa228850, m=0xb74b0500, local_signal_index=0, argv=0xa9dcfb0) at kernel/qobject.cpp:3280
#65 0xb72c9e17 in KIO::Connection::readyRead (this=0xa228850) at ./connection.moc:92
#66 0xb72cc17e in KIO::ConnectionPrivate::dequeue (this=0xa21b2d8) at ../../kio/kio/connection.cpp:82
#67 0xb72cc2ae in KIO::Connection::qt_metacall (this=0xa228850, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xf6fb5d0) at ./connection.moc:79
#68 0xb688a8ca in QMetaObject::metacall (object=0xa228850, cl=179808448, idx=5, argv=0xf6fb5d0) at kernel/qmetaobject.cpp:237
#69 0xb6895df6 in QMetaCallEvent::placeMetaCall (this=0xf700670, object=0xa228850) at kernel/qobject.cpp:534
#70 0xb68976a2 in QObject::event (this=0xa228850, e=0xa9b30b8) at kernel/qobject.cpp:1219
#71 0xb5d68fdc in QApplicationPrivate::notify_helper (this=0x9916348, receiver=0xa228850, e=0xf700670) at kernel/qapplication.cpp:4396
#72 0xb5d6f04e in QApplication::notify (this=0xbfecac60, receiver=0xa228850, e=0xf700670) at kernel/qapplication.cpp:3798
#73 0x080783dc in _start ()

Possible duplicates by query: bug 235362.

Reported using DrKonqi
Comment 1 Joris Guisson 2011-05-01 11:28:18 UTC
The scanfolder plugin was intended to support drop spots for torrents. It was never intended to scan your entire filesystem.
Comment 2 Joris Guisson 2011-05-12 21:47:53 UTC
Git commit 1a35758f2bcb292496020654f865d660b3768a6f by Joris Guisson.
Committed on 12/05/2011 at 21:36.
Pushed by guisson into branch 'master'.

Revamp scanfolder plugin:
- Fixes a crash
- Improves performance of handling large directory structures
- Some general code cleanup

BUG: 263813
BUG: 271657

M  +1    -0    ChangeLog     
M  +1    -0    RoadMap     
M  +6    -1    plugins/scanfolder/CMakeLists.txt     
M  +29   -278  plugins/scanfolder/scanfolder.cpp     
M  +23   -60   plugins/scanfolder/scanfolder.h     
M  +21   -41   plugins/scanfolder/scanfolderplugin.cpp     
M  +5    -3    plugins/scanfolder/scanfolderplugin.h     
A  +202  -0    plugins/scanfolder/scanthread.cpp         [License: GPL (v2+)]
A  +98   -0    plugins/scanfolder/scanthread.h         [License: GPL (v2+)]
A  +161  -0    plugins/scanfolder/torrentloadqueue.cpp         [License: UNKNOWN]  *
A  +106  -0    plugins/scanfolder/torrentloadqueue.h         [License: GPL (v2+)]

The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.