Bug 244935

Summary: KTorrent crashed on startup when a port is occupied
Product: [Applications] ktorrent Reporter: Law, Cheuk-wing <jhnpwa>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: crash CC: dimonssss, sela
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Law, Cheuk-wing 2010-07-17 09:50:29 UTC
Application: ktorrent (4.0.1)
KDE Platform Version: 4.4.92 (KDE 4.4.92 (KDE 4.5 RC2))
Qt Version: 4.7.0
Operating System: Linux 2.6.32-23-generic x86_64
Distribution: Ubuntu 10.04 LTS

-- Information about the crash:
- What I was doing when the application crashed:
Seeding using Transmission with port set to 59777
- Custom settings of the application:
TCP and UDP communication port set to 59777 before.

-- Backtrace:
Application: KTorrent (ktorrent), signal: Segmentation fault
[KCrash Handler]
#6  0x00007f0d49d6c1cc in net::Socket::sendTo (this=0x0, buf=0x172b648 "A", len=20, a=...) at ../../src/net/socket.cpp:297
#7  0x00007f0d49e05ac6 in utp::UTPServer::sendTo (this=0xd16210, data=..., addr=..., conn_id=24993) at ../../src/utp/utpserver.cpp:316
#8  0x00007f0d49e0a3cd in utp::Connection::sendPacket (this=0xd06fd0, type=<value optimized out>, p_ack_nr=<value optimized out>) at ../../src/utp/connection.cpp:315
#9  0x00007f0d49e0a58d in utp::Connection::sendSYN (this=0xd07040) at ../../src/utp/connection.cpp:329
#10 0x00007f0d49e05077 in utp::UTPServer::connectTo (this=0xd16210, addr=<value optimized out>) at ../../src/utp/utpserver.cpp:340
#11 0x00007f0d49e0e076 in utp::UTPSocket::connectTo (this=0x104eab0, addr=...) at ../../src/utp/utpsocket.cpp:85
#12 0x00007f0d49d75545 in mse::StreamSocket::connectTo (this=0x1bf2530, addr=...) at ../../src/mse/streamsocket.cpp:210
#13 0x00007f0d49d79794 in Authenticate (this=0x1bf28b0, ip=..., port=<value optimized out>, proto=bt::UTP, info_hash=<value optimized out>, peer_id=<value optimized out>, pcon=0xe51af0)
    at ../../src/peer/authenticate.cpp:66
#14 0x00007f0d49d8d17f in bt::PeerConnector::start (this=0xe51af0, method=<value optimized out>) at ../../src/peer/peerconnector.cpp:116
#15 0x00007f0d49d845e7 in bt::PeerManager::connectToPeers (this=0x150cec0) at ../../src/peer/peermanager.cpp:434
#16 0x00007f0d49db4c16 in bt::TorrentControl::update (this=0x14fd850) at ../../src/torrent/torrentcontrol.cpp:170
#17 0x000000000042aebb in kt::Core::update (this=0xe07de0) at ../../ktorrent/core.cpp:1020
#18 0x0000000000433442 in kt::Core::qt_metacall (this=0xe07de0, _c=QMetaObject::InvokeMetaMethod, _id=25075312, _a=0x7fff149422c0) at ./core.moc:167
#19 0x00007f0d4784d7a7 in QMetaObject::activate (sender=0xe07e08, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xd07040) at kernel/qobject.cpp:3280
#20 0x00007f0d47847599 in QObject::event (this=0xe07e08, e=0x172b648) at kernel/qobject.cpp:1183
#21 0x00007f0d46989cdc in QApplicationPrivate::notify_helper (this=0xd0ee60, receiver=0xe07e08, e=0x7fff149429f0) at kernel/qapplication.cpp:4389
#22 0x00007f0d4698f7cd in QApplication::notify (this=0x7fff14942d20, receiver=0xe07e08, e=0x7fff149429f0) at kernel/qapplication.cpp:4270
#23 0x0000000000439dda in kt::App::notify (this=0xd07040, receiver=0x172b648, event=0x1bef000) at ../../ktorrent/app.cpp:97
#24 0x00007f0d47835a8c in QCoreApplication::notifyInternal (this=0x7fff14942d20, receiver=0xe07e08, event=0x7fff149429f0) at kernel/qcoreapplication.cpp:732
#25 0x00007f0d478650b2 in QCoreApplication::sendEvent (this=0xd1b990) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#26 QTimerInfoList::activateTimers (this=0xd1b990) at kernel/qeventdispatcher_unix.cpp:602
#27 0x00007f0d47861e94 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#28 0x00007f0d40bb68c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#29 0x00007f0d40bba748 in ?? () from /lib/libglib-2.0.so.0
#30 0x00007f0d40bba8fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#31 0x00007f0d47861b83 in QEventDispatcherGlib::processEvents (this=0xcddee0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#32 0x00007f0d46a3b7ee in QGuiEventDispatcherGlib::processEvents (this=0xd07040, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#33 0x00007f0d478347b2 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#34 0x00007f0d47834b9c in QEventLoop::exec (this=0x7fff14942c90, flags=) at kernel/qeventloop.cpp:201
#35 0x00007f0d47838c4b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#36 0x000000000042901b in main (argc=<value optimized out>, argv=<value optimized out>) at ../../ktorrent/main.cpp:176

Reported using DrKonqi
Comment 1 Joris Guisson 2010-07-17 11:22:50 UTC
SVN commit 1150971 by guisson:

Fix crash when µTP binding fails 

BUG: 244935

 M  +1 -0      ChangeLog  
 M  +3 -0      src/utp/utpserver.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1150971
Comment 2 Joris Guisson 2010-09-17 22:37:17 UTC
*** Bug 251534 has been marked as a duplicate of this bug. ***
Comment 3 Joris Guisson 2011-03-03 20:59:14 UTC
*** Bug 267402 has been marked as a duplicate of this bug. ***