Bug 254334

Summary: Ktorrent crashes upon exit and during use
Product: [Applications] ktorrent Reporter: Ryan <d33pcover>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: crash CC: grahamtooley
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Ktorrent log file

Description Ryan 2010-10-16 08:33:31 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-22-generic-pae i686
Distribution: Ubuntu 10.10

-- Information about the crash:
- What I was doing when the application crashed:
Crash happens everytime I exit Ktorrent and will also occur during normal operation, backtrace is from a crash upon exit. 

I also have constant crashes when leaving Ktorrent running overnight and check in the morning to find it frozen. 

Backtrace is from a crash upon exit further backtraces can be provided if needed.

The crash can be reproduced every time.

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

Thread 2 (Thread 0xae215b70 (LWP 2806)):
#0  0xb7794424 in __kernel_vsyscall ()
#1  0xb5aadde6 in poll () from /lib/libc.so.6
#2  0xb4f86a1b in g_poll () from /lib/libglib-2.0.so.0
#3  0xb4f7943c in ?? () from /lib/libglib-2.0.so.0
#4  0xb4f79848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#5  0xb68ed59f in QEventDispatcherGlib::processEvents (this=0xb03313f8, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#6  0xb68bd609 in QEventLoop::processEvents (this=0xae215290, flags=) at kernel/qeventloop.cpp:149
#7  0xb68bda8a in QEventLoop::exec (this=0xae215290, flags=...) at kernel/qeventloop.cpp:201
#8  0xb67b9b7e in QThread::exec (this=0x9685480) at thread/qthread.cpp:490
#9  0xb689c35b in QInotifyFileSystemWatcherEngine::run (this=0x9685480) at io/qfilesystemwatcher_inotify.cpp:248
#10 0xb67bcdf9 in QThreadPrivate::start (arg=0x9685480) at thread/qthread_unix.cpp:266
#11 0xb6746cc9 in start_thread () from /lib/libpthread.so.0
#12 0xb5abc6ae in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb4822710 (LWP 2121)):
[KCrash Handler]
#7  0xb76fba9e in utp::UTPServer::connectTo (this=0x0, addr=...) at ../../src/utp/utpserver.cpp:338
#8  0xb770526c in utp::UTPSocket::connectTo (this=0x9805ac8, addr=...) at ../../src/utp/utpsocket.cpp:85
#9  0xb765beac in mse::StreamSocket::connectTo (this=0x999d9f8, addr=...) at ../../src/mse/streamsocket.cpp:210
#10 0xb7660f4a in bt::Authenticate::Authenticate (this=0x9829778, ip=..., port=<value optimized out>, proto=bt::UTP, info_hash=..., peer_id=..., pcon=0x98bc080) at ../../src/peer/authenticate.cpp:66
#11 0xb765daba in mse::EncryptedAuthenticate::EncryptedAuthenticate (this=0x9829778, ip=..., port=<value optimized out>, proto=bt::UTP, info_hash=..., peer_id=..., pcon=0x98bc080) at ../../src/mse/encryptedauthenticate.cpp:46
#12 0xb7676961 in bt::PeerConnector::start (this=0x98bc080, method=bt::PeerConnector::UTP_WITH_ENCRYPTION) at ../../src/peer/peerconnector.cpp:128
#13 0xb7676a4d in bt::PeerConnector::start (this=0x0) at ../../src/peer/peerconnector.cpp:55
#14 0xb766cb07 in bt::PeerManager::connectToPeers (this=0x93d4400) at ../../src/peer/peermanager.cpp:436
#15 0xb76a2d53 in bt::TorrentControl::update (this=0xb1967c68) at ../../src/torrent/torrentcontrol.cpp:170
#16 0x080690f3 in kt::Core::update (this=0xb1902308) at ../../ktorrent/core.cpp:1030
#17 0x080716cd in kt::Core::qt_metacall (this=0xb1902308, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfdb603c) at ./core.moc:167
#18 0xb68c48ca in QMetaObject::metacall (object=0xb1902308, cl=QMetaObject::InvokeMetaMethod, idx=22, argv=0xbfdb603c) at kernel/qmetaobject.cpp:237
#19 0xb68d76ad in QMetaObject::activate (sender=0xb190231c, m=0xb69f15a4, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3280
#20 0xb69291e7 in QTimer::timeout (this=0xb190231c) at .moc/release-shared/moc_qtimer.cpp:134
#21 0xb68dd1ce in QTimer::timerEvent (this=0xb190231c, e=0xbfdb6540) at kernel/qtimer.cpp:271
#22 0xb68d1504 in QObject::event (this=0xb190231c, e=0xb7749a48) at kernel/qobject.cpp:1183
#23 0xb5da2fdc in QApplicationPrivate::notify_helper (this=0x92d80e8, receiver=0xb190231c, e=0xbfdb6540) at kernel/qapplication.cpp:4396
#24 0xb5da904e in QApplication::notify (this=0xbfdb6c60, receiver=0xb190231c, e=0xbfdb6540) at kernel/qapplication.cpp:3798
#25 0x080783dc in kt::App::notify (this=0x0, receiver=0xb7749a48, event=0x0) at ../../ktorrent/app.cpp:97
#26 0xb68beb3b in QCoreApplication::notifyInternal (this=0xbfdb6c60, receiver=0xb190231c, event=0xbfdb6540) at kernel/qcoreapplication.cpp:732
#27 0xb68f0ad6 in sendEvent (this=0x92cfc34) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#28 QTimerInfoList::activateTimers (this=0x92cfc34) at kernel/qeventdispatcher_unix.cpp:602
#29 0xb68ed8a7 in timerSourceDispatch (source=0x92cfc68) at kernel/qeventdispatcher_glib.cpp:184
#30 idleTimerSourceDispatch (source=0x92cfc68) at kernel/qeventdispatcher_glib.cpp:231
#31 0xb4f75855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#32 0xb4f79668 in ?? () from /lib/libglib-2.0.so.0
#33 0xb4f79848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#34 0xb68ed565 in QEventDispatcherGlib::processEvents (this=0x92a86c8, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#35 0xb5e64be5 in QGuiEventDispatcherGlib::processEvents (this=0x92a86c8, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#36 0xb68bd609 in QEventLoop::processEvents (this=0xbfdb6804, flags=) at kernel/qeventloop.cpp:149
#37 0xb68bda8a in QEventLoop::exec (this=0xbfdb6804, flags=...) at kernel/qeventloop.cpp:201
#38 0xb73c8b3b in KIO::NetAccess::enter_loop (this=0xbfdb68a4) at ../../kio/kio/netaccess.cpp:502
#39 0xb73c9216 in KIO::NetAccess::synchronousRunInternal (this=0xbfdb68a4, job=0x96c9860, window=0x0, data=0x0, finalURL=0x0, metaData=0x0) at ../../kio/kio/netaccess.cpp:487
#40 0xb73c99cb in KIO::NetAccess::synchronousRun (job=0x96c9860, window=0x0, data=0x0, finalURL=0x0, metaData=0x0) at ../../kio/kio/netaccess.cpp:277
#41 0xb76454ce in bt::SynchronousWait (millis=1000) at ../../src/util/waitjob.cpp:80
#42 0xb75a51ba in kt::QueueManager::clear (this=0xb1901fd8) at ../../libktcore/torrent/queuemanager.cpp:92
#43 0x0806c221 in kt::Core::onExit (this=0xb1902308) at ../../ktorrent/core.cpp:909
#44 0x08074761 in kt::GUI::queryExit (this=0x9320c30) at ../../ktorrent/gui.cpp:563
#45 0xb7196856 in KMainWindowPrivate::_k_shuttingDown (this=0xb19004a0) at ../../kdeui/widgets/kmainwindow.cpp:1142
#46 0xb719b2e6 in KMainWindow::qt_metacall (this=0x9320c30, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbfdb6b6c) at ./kmainwindow.moc:102
#47 0xb71e05ea in KXmlGuiWindow::qt_metacall (this=0x9320c30, _c=QMetaObject::InvokeMetaMethod, _id=38, _a=0xbfdb6b6c) at ./kxmlguiwindow.moc:102
#48 0x08077ecf in kt::GUI::qt_metacall (this=0x9320c30, _c=QMetaObject::InvokeMetaMethod, _id=38, _a=0xbfdb6b6c) at ./gui.moc:102
#49 0xb68c48ca in QMetaObject::metacall (object=0x9320c30, cl=QMetaObject::InvokeMetaMethod, idx=38, argv=0xbfdb6b6c) at kernel/qmetaobject.cpp:237
#50 0xb68d76ad in QMetaObject::activate (sender=0xbfdb6c60, m=0xb69f1484, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3280
#51 0xb6928c57 in QCoreApplication::aboutToQuit (this=0xbfdb6c60) at .moc/release-shared/moc_qcoreapplication.cpp:131
#52 0xb68c2036 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1014
#53 0xb5da1e07 in QApplication::exec () at kernel/qapplication.cpp:3672
#54 0x08066e91 in main (argc=3, argv=0xbfdb7064) at ../../ktorrent/main.cpp:176

Possible duplicates by query: bug 251534, bug 244935, bug 244086, bug 242569, bug 236741.

Reported using DrKonqi
Comment 1 Joris Guisson 2010-10-16 12:11:59 UTC
Post your log file (~/.kde/share/apps/ktorrent/log)
Comment 2 Joris Guisson 2010-10-16 12:34:47 UTC
Also post a backtrace of a crash which does not happen at exit.
Comment 3 Joris Guisson 2010-10-16 13:00:51 UTC
This crash at exit is the same as 254214, which has been fixed.
Comment 4 Ryan 2010-10-17 00:45:56 UTC
Created attachment 52580 [details]
Ktorrent log file

My Ktorrent log file as requested.
Comment 5 Joris Guisson 2010-10-31 12:57:51 UTC
SVN commit 1191549 by guisson:

Make sure UTPServer is running when setting up a connection with a UTPSocket, fixes a crash

BUG: 254334

 M  +2 -0      ChangeLog  
 M  +3 -0      src/utp/utpsocket.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1191549
Comment 6 Joris Guisson 2011-02-27 10:42:20 UTC
*** Bug 267184 has been marked as a duplicate of this bug. ***