Bug 136392 - crash after loading new torrent
Summary: crash after loading new torrent
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
: 138688 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-27 19:13 UTC by A Kde User
Modified: 2006-12-12 09:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description A Kde User 2006-10-27 19:13:49 UTC
Version:           2.0.3 (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages
OS:                Linux

ktorrent crashes when particular torrent file loaded to download.  With that torrent in the download section the application keeps crashing on startup until I go into ~/.kde/share/apps/ktorrent and delete the appropriate tor directory.  It is happening to me with several torrent files.

The torrent in question in this example is:
http://www.ipodnova.net/download.php?id=3407&name=Star.Trek.Enterprise.Season.1.Complete.torrent

:~$ ktorrent -v
Qt: 3.3.6
KDE: 3.5.5
KTorrent: 2.0.3

ktorrent --debug log:

Bound to port 6881
Loading /home/XXXXX/.kde/share/apps/ktorrent/tor0/
Encoding : UTF-8
Multi file torrent
OutputPath = /home/XXXXX/torrents/enterprise/Star.Trek.Enterprise.Season.1.Compl
ete/
Starting download
Doing tracker request to url : http://www.ipodnova.net/announce.php?peer_id=-KT2
030-011713029515&port=6881&uploaded=0&downloaded=0&left=5658613170&compact=1&num
want=100&key=435069570&event=started&info_hash=-%3e%3d%ef%cf%10%15%93%e7x%b5%90%
1aHH%2c%8cz%adw
Loading plugin infowidgetplugin
Loading plugin partfileimportplugin
Showing KT
IP 0.0.0.0 banned.
Authentication(S) to 69.241.40.9 : failure
Initiating connection to 88.160.26.228
Initiating connection to

kde crash handler backtrace:

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1233901904 (LWP 14329)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6  0xb684b347 in inet_aton () from /lib/tls/i686/cmov/libc.so.6
#7  0xb7e3fd1d in net::Address::Address () from /usr/lib/libktorrent.so.0
#8  0xb7e47872 in mse::StreamSocket::connectTo ()
   from /usr/lib/libktorrent.so.0
#9  0xb7ea1749 in bt::Authenticate::Authenticate ()
   from /usr/lib/libktorrent.so.0
#10 0xb7e4b093 in mse::EncryptedAuthenticate::EncryptedAuthenticate ()
   from /usr/lib/libktorrent.so.0
#11 0xb7ea1305 in bt::PeerManager::connectToPeers ()
   from /usr/lib/libktorrent.so.0
#12 0xb7ea15e7 in bt::PeerManager::update () from /usr/lib/libktorrent.so.0
#13 0xb7ea7732 in bt::TorrentControl::update () from /usr/lib/libktorrent.so.0
#14 0x08061843 in ?? ()
#15 0x08087c51 in ?? ()
#16 0xb6f5a957 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#17 0xb6f5b3fc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#18 0xb72e900a in QTimer::timeout () from /usr/lib/libqt-mt.so.3
#19 0xb6f82662 in QTimer::event () from /usr/lib/libqt-mt.so.3
#20 0xb6ef1b88 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#21 0xb6ef39b7 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#22 0xb76a2db2 in KApplication::notify () from /usr/lib/libkdecore.so.4
#23 0xb6e84389 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#24 0xb6ee45d3 in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#25 0xb6e98ec5 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#26 0xb6f0c25e in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#27 0xb6f0c06e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#28 0xb6ef3731 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#29 0x08065efb in ?? ()
#30 0xb67868cc in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#31 0x0805e301 in ?? ()
Comment 1 A Kde User 2006-10-27 19:18:23 UTC
The ubuntu ktorrent package is 
2.0.3+dfsg1-0ubuntu1
Comment 2 Scott Ortell 2006-10-28 06:46:12 UTC
No Problems loading it for me. 
ktorrent -v
Qt: 3.3.6
KDE: 3.5.5
KTorrent: 2.0.3

Using kubuntu
Comment 3 Joris Guisson 2006-10-28 11:51:19 UTC
SVN commit 599703 by guisson:

Addes some safety checks on IP addresses before connecting to peers. This should prevent bug 136392.

BUG: 136392



 M  +4 -0      streamsocket.cpp  


--- trunk/extragear/network/ktorrent/libktorrent/mse/streamsocket.cpp #599702:599703
@@ -177,6 +177,10 @@
 	
 	bool StreamSocket::connectTo(const QString & ip,Uint16 port)
 	{
+		// do a safety check
+		if (ip.isNull() || ip.length() == 0)
+			return false;
+		
 		// we don't wanna block the current thread so set non blocking
 		sock->setNonBlocking();
 		if (sock->connectTo(Address(ip,port)))
Comment 4 Bram Schoenmakers 2006-12-12 09:14:47 UTC
*** Bug 138688 has been marked as a duplicate of this bug. ***