Bug 281997 - kTorrent crashes on close
Summary: kTorrent crashes on close
Status: RESOLVED DUPLICATE of bug 264378
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Joris Guisson
Depends on:
Reported: 2011-09-14 08:34 UTC by Niklas Rehfeld
Modified: 2011-09-17 10:02 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 Niklas Rehfeld 2011-09-14 08:34:07 UTC
Application: ktorrent (4.0.5)
KDE Platform Version: 4.6.2 (4.6.2)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-11-generic i686
Distribution: Ubuntu 11.04

-- Information about the crash:
Whenever I close ktorrent (usually by going file->quit in the menu), kTorrent crashes with a segfault.

This means that none of the settings that were changed (e.g. scheduler settings) are saved for the next time I run KTorrent. 

Running KTorrent 4.0.5-3ubuntu1, on KDE 4.6.2 on Ubuntu 11.04

I have the following plugins running:
Bandwidth scheduler
Download Order
Information Widget
IP Filter

Please let me know what other information I can give you, or if I should in fact be posting this bug with the ubuntu package maintainer.

The crash can be reproduced every time.

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

Thread 3 (Thread 0xb5610b70 (LWP 30279)):
#0  0x062d5610 in __i686.get_pc_thunk.bx () from /lib/i386-linux-gnu/libpthread.so.0
#1  0x062d9337 in __pthread_mutex_lock (mutex=0x87666cc) at pthread_mutex_lock.c:47
#2  0x029c5616 in pthread_mutex_lock (mutex=0x87666cc) at forward.c:182
#3  0x04ed650e in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x01111577 in QEventDispatcherGlib::processEvents (this=0x83ba218, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#5  0x010e3289 in QEventLoop::processEvents (this=0xb5610290, flags=...) at kernel/qeventloop.cpp:149
#6  0x010e3522 in QEventLoop::exec (this=0xb5610290, flags=...) at kernel/qeventloop.cpp:201
#7  0x00fed2a0 in QThread::exec (this=0x83ba3f8) at thread/qthread.cpp:492
#8  0x010c4fdb in QInotifyFileSystemWatcherEngine::run (this=0x83ba3f8) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00fefda2 in QThreadPrivate::start (arg=0x83ba3f8) at thread/qthread_unix.cpp:320
#10 0x062d6e99 in start_thread (arg=0xb5610b70) at pthread_create.c:304
#11 0x029b773e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xaaafdb70 (LWP 30324)):
#0  0x00da2416 in __kernel_vsyscall ()
#1  0x062db48c in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x029c53fd in __pthread_cond_wait (cond=0xabbf42a8, mutex=0xabbf4290) at forward.c:139
#3  0x00ff0467 in wait (this=0xabbf3964, mutex=0xabbf3960, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#4  QWaitCondition::wait (this=0xabbf3964, mutex=0xabbf3960, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#5  0x008843af in net::ReverseResolverThread::run (this=0xabbf3958) at ../../src/net/reverseresolver.cpp:123
#6  0x00fefda2 in QThreadPrivate::start (arg=0xabbf3958) at thread/qthread_unix.cpp:320
#7  0x062d6e99 in start_thread (arg=0xaaafdb70) at pthread_create.c:304
#8  0x029b773e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb772b930 (LWP 30265)):
[KCrash Handler]
#7  _M_begin (this=0x0, gid=1, limit=15360) at /usr/include/c++/4.5/bits/stl_tree.h:482
#8  find (this=0x0, gid=1, limit=15360) at /usr/include/c++/4.5/bits/stl_tree.h:1519
#9  find (this=0x0, gid=1, limit=15360) at /usr/include/c++/4.5/bits/stl_map.h:697
#10 find (this=0x0, gid=1, limit=15360) at ../../src/util/ptrmap.h:135
#11 net::NetworkThread::setGroupLimit (this=0x0, gid=1, limit=15360) at ../../src/net/networkthread.cpp:76
#12 0x0087f896 in net::SocketMonitor::setGroupLimit (this=0x81118b0, type=net::SocketMonitor::UPLOAD_GROUP, gid=1, limit=15360) at ../../src/net/socketmonitor.cpp:157
#13 0x008c8424 in bt::TorrentControl::setUploadProps (this=0x856a2d8, limit=15360, rate=0) at ../../src/torrent/torrentcontrol.cpp:1685
#14 0x008c910a in bt::TorrentControl::loadStats (this=0x856a2d8) at ../../src/torrent/torrentcontrol.cpp:1150
#15 0x008c9ef4 in bt::TorrentControl::continueStart (this=0x856a2d8) at ../../src/torrent/torrentcontrol.cpp:436
#16 0x008cabe2 in bt::TorrentControl::start (this=0x856a2d8) at ../../src/torrent/torrentcontrol.cpp:417
#17 0x001398c5 in kt::QueueManager::startSafely (this=0xb4d02500, tc=0x856a2d8) at ../../libktcore/torrent/queuemanager.cpp:731
#18 0x0013c672 in kt::QueueManager::setSuspendedState (this=0xb4d02500, suspend=false) at ../../libktcore/torrent/queuemanager.cpp:699
#19 0x08069f85 in kt::Core::setSuspendedState (this=0xb4d027b8, suspend=false) at ../../ktorrent/core.cpp:1164
#20 0x01a14371 in kt::BWSchedulerPlugin::setNormalLimits (this=0x863dad8) at ../../../plugins/bwscheduler/bwschedulerplugin.cpp:156
#21 0x01a14492 in kt::BWSchedulerPlugin::unload (this=0x863dad8) at ../../../plugins/bwscheduler/bwschedulerplugin.cpp:118
#22 0x0015b845 in kt::PluginManager::unloadAll (this=0x8246000) at ../../libktcore/plugin/pluginmanager.cpp:189
#23 0x08069cda in kt::Core::onExit (this=0xb4d027b8) at ../../ktorrent/core.cpp:898
#24 0x08075511 in kt::GUI::queryExit (this=0xb4d00700) at ../../ktorrent/gui.cpp:563
#25 0x00c461e6 in KMainWindowPrivate::_k_shuttingDown (this=0xb4d007d0) at ../../kdeui/widgets/kmainwindow.cpp:1142
#26 0x00c48f96 in KMainWindow::qt_metacall (this=0xb4d00700, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbfe68dac) at ./kmainwindow.moc:102
#27 0x00c8816a in KXmlGuiWindow::qt_metacall (this=0xb4d00700, _c=QMetaObject::InvokeMetaMethod, _id=38, _a=0xbfe68dac) at ./kxmlguiwindow.moc:102
#28 0x0807725f in kt::GUI::qt_metacall (this=0xb4d00700, _c=QMetaObject::InvokeMetaMethod, _id=38, _a=0xbfe68dac) at ./gui.moc:102
#29 0x010ea6ba in QMetaObject::metacall (object=0xb4d00700, cl=QMetaObject::InvokeMetaMethod, idx=38, argv=0xbfe68dac) at kernel/qmetaobject.cpp:237
#30 0x010fa4ff in QMetaObject::activate (sender=0xbfe68e90, m=0x121f484, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3287
#31 0x01146c97 in QCoreApplication::aboutToQuit (this=0xbfe68e90) at .moc/release-shared/moc_qcoreapplication.cpp:131
#32 0x010e7ef3 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1013
#33 0x038968e7 in QApplication::exec () at kernel/qapplication.cpp:3736
#34 0x08067221 in main (argc=) at ../../ktorrent/main.cpp:176

Reported using DrKonqi
Comment 1 Niklas Rehfeld 2011-09-16 10:32:25 UTC
Ah, sorry, I just realised, The crashes only happen when I close ktorrent after changing the schedule that is currently active in the scheduler plugin. 

That is, I can change any of the other schedules that do not contain the current time and ktorrent will not crash. Neither will it crash if I don't fiddle with the scheduler. 

Comment 2 Joris Guisson 2011-09-17 10:02:51 UTC
This was fixed in 4.1

*** This bug has been marked as a duplicate of bug 264378 ***