This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Would be a nice feature

Tags: None
(comma "," separated)
rob314159
Registered Member
Posts
28
Karma
0

Would be a nice feature

Mon Jun 05, 2006 8:25 pm
Hi!

It would be nice if you could somehow see which file a chunk belong to in the Chunks list. Maybe the file could be displayed on the right-click menu (and found out when you right-click if there's a performance impact otherwise).

/rob
agforsyth
Registered Member
Posts
133
Karma
0

Mon Jun 05, 2006 9:47 pm
A chunk could be in lots of sequential files potentially, so the context menu could get rather big vertically. You'd also have to list only the first 40 or so characters of the filenames so the menu didn't get too big horizontally. It could also just be a comma separated list in a column in the chunkview, so width wouldn't be a problem.

It's certainly possible (and I'd be willing to implement it if the devs want) if there is any significant interest in it. I can't really see why you'd need to know this, and not be willing to just figure it out yourself. It's simple enough by just looking at the chunk number, the chunk size on the status tab, and then the files tab.
rob314159
Registered Member
Posts
28
Karma
0

Why

Mon Jun 05, 2006 9:59 pm
A chunk could be in lots of sequential files potentially


I guess that would be the case when there are a lot of small files. Right?

I can't really see why you'd need to know this, and not be willing to just figure it out yourself.


I do have a computer. And it can count :D

The 'why' is actually I am suspecting KTorrent doesn't respect my Download First (or it may be due to the peers I am download doesn't have any chunk in the file I have marked Download First).

What I am actually think is missing is more control over the sequence of the downloading inside a torrent. The Download First/Normal/Last is nice but it doesn't seem to work (no data to support this). And maybe it is actually wrong to fiddle with the download order. Maybe it is against the 'rules' of the bittorrent protocol.

Anyway, it would just be a 'nice' feature.

I would prefer the KTorrent not crashing when quitting and not crashing when setting selecting a lot of files and mark them to Download Last. But those are other stories. I have not come around reporting them because I can't get the build working so I can get proper diagnostics when reporting them.

If anyone could supply me with a pre-built debug build for Debian etch (Linux knodd 2.6.15-1-486 #2 Mon Mar 6 15:19:16 UTC 2006 i686 GNU/Linux) I would be happy trying to supply a proper report.

/rob
rob314159
Registered Member
Posts
28
Karma
0

Forgot

Mon Jun 05, 2006 10:04 pm
I do have KTorrent 2.0beta1

/rob
imported4-Ivan
Registered Member
Posts
819
Karma
0

Mon Jun 05, 2006 10:24 pm
If anyone could supply me with a pre-built debug build for Debian etch (Linux knodd 2.6.15-1-486 #2 Mon Mar 6 15:19:16 UTC 2006 i686 GNU/Linux) I would be happy trying to supply a proper report.

You could try compiling current SVN version (with debug symbols) and see what that gives you. Instructions for compiling SVN are in FAQ of this website. Good luck :)
rob314159
Registered Member
Posts
28
Karma
0

I get this

Mon Jun 05, 2006 10:28 pm
----------------------------------------------------------
KTorrent ERROR:
KTorrent requires gmp (http://www.swox.com/gmp)
----------------------------------------------------------


Good - your configure finished. Start make now
-------------

2.0beta1

Some apt-get command needed I guess?

/rob
rob314159
Registered Member
Posts
28
Karma
0

Backtrace

Mon Jun 05, 2006 10:37 pm
I guess this is useless info?

---
(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1233631552 (LWP 27414)]
0xb684729b in nanosleep () from /lib/tls/libc.so.6
#0 0xb684729b in nanosleep () from /lib/tls/libc.so.6
#1 0xb68470c4 in sleep () from /lib/tls/libc.so.6
---

/rob
agforsyth
Registered Member
Posts
133
Karma
0

Tue Jun 06, 2006 1:55 am
rob314159 wrote:
A chunk could be in lots of sequential files potentially


I guess that would be the case when there are a lot of small files. Right?


Yes.

rob314159 wrote:
I can't really see why you'd need to know this, and not be willing to just figure it out yourself.


I do have a computer. And it can count :D

The 'why' is actually I am suspecting KTorrent doesn't respect my Download First (or it may be due to the peers I am download doesn't have any chunk in the file I have marked Download First).

What I am actually think is missing is more control over the sequence of the downloading inside a torrent. The Download First/Normal/Last is nice but it doesn't seem to work (no data to support this). And maybe it is actually wrong to fiddle with the download order. Maybe it is against the 'rules' of the bittorrent protocol.


It doesn't violate any rules, and all of the major clients can do it.

It's pretty easy to check if the prioritization is working: simply find a multi-file torrent that has only seeds, no leechers, start it, and prioritize some files. Since all the peers have all the chunks, there is no reason you shouldn't get them in the exact order you want. (Super seeding or if some of the seeds only downloaded some of the files could mess this up, but that's unlikely).

rob314159 wrote:Anyway, it would just be a 'nice' feature.

I would prefer the KTorrent not crashing when quitting and not crashing when setting selecting a lot of files and mark them to Download Last. But those are other stories. I have not come around reporting them because I can't get the build working so I can get proper diagnostics when reporting them.

If anyone could supply me with a pre-built debug build for Debian etch (Linux knodd 2.6.15-1-486 #2 Mon Mar 6 15:19:16 UTC 2006 i686 GNU/Linux) I would be happy trying to supply a proper report.

/rob


The packages you need probably start with "libgmp", and are called libgmpxx3 and libgmp3c2 on Ubuntu 6.06. I've not seen the crash when selecting a lot of files and marking them download last. More info would be great, or if you could post the torrent that you had the error with others could test it out to see if we can reproduce the crash. Definately try the latest svn as opposed to the beta tarball.

If you main reason for requestion this feature was to understand things that don't appear to be working correctly, I think we should try testing and fixing those things with the tools we already have rather than introducing more code.

If you have any more problems getting the latest svn compiled just post here and we'll be glad to help.
rob314159
Registered Member
Posts
28
Karma
0

Debu info

Tue Jun 06, 2006 7:47 am
If I manage to build it, will it contain debug info and/or give useful post-mortem info?

/rob
rob314159
Registered Member
Posts
28
Karma
0

Build succeeded

Tue Jun 06, 2006 8:50 am
The About box says 2.0dev.

It still crashes on exit and without a backtrace (how do I enable that?).

It crashes when I don't stop the download before quitting. If I stop them, then quit -> no crash.

/rob
rob314159
Registered Member
Posts
28
Karma
0

Tue Jun 06, 2006 8:56 am
It still crashes on exit and without a backtrace (how do I enable that?).


You noob! You start KTorrent like this to enable the backtrace:

Code: Select all
ktorrent --debug


Here's my backtrace:

Code: Select all
Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1233393984 (LWP 6856)]
[KCrash handler]
#5  0xb685650e in free () from /lib/tls/libc.so.6
#6  0xb6857dfc in malloc () from /lib/tls/libc.so.6
#7  0xb6a0b598 in operator new () from /usr/lib/libstdc++.so.6
#8  0xb6a0b6cd in operator new[] () from /usr/lib/libstdc++.so.6
#9  0xb730ce01 in QString::setLength () from /usr/lib/libqt-mt.so.3
#10 0xb730d1a8 in QString::grow () from /usr/lib/libqt-mt.so.3
#11 0xb730eb05 in QString::operator+= () from /usr/lib/libqt-mt.so.3
#12 0xb76ad1c1 in KURL::encodedPathAndQuery (this=0xbf9d30ac, _trailing=0,
    _no_empty_path=false, encoding_hint=0) at qstring.h:1084
#13 0xb7f3126d in bt::HTTPTracker::doRequest () from /usr/lib/libktorrent.so.0
#14 0xb7f129c0 in bt::Tracker::doRequest () from /usr/lib/libktorrent.so.0
#15 0xb7f12e61 in bt::Tracker::stop () from /usr/lib/libktorrent.so.0
#16 0xb7f1c7ec in bt::TorrentControl::stop () from /usr/lib/libktorrent.so.0
#17 0xb7f1cc61 in bt::TorrentControl::~TorrentControl ()
   from /usr/lib/libktorrent.so.0
#18 0xb72f0614 in QGList::clear () from /usr/lib/libqt-mt.so.3
#19 0xb7f47a68 in bt::QueueManager::clear () from /usr/lib/libktorrent.so.0
#20 0x0806c600 in KTorrentCore::onExit ()
#21 0x0805dc15 in KTorrent::queryExit ()
#22 0xb791dfe4 in KMainWindow::shuttingDown (this=0x70)
    at kmainwindow.cpp:1104
#23 0xb7a75e01 in KMainWindow::qt_invoke (this=0x80b4800, _id=72,
    _o=0xbf9d33ec) at kmainwindow.moc:139
#24 0x08061f90 in KTorrent::qt_invoke ()
#25 0xb6ff054b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#26 0xb6ff0fdc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#27 0xb766cf4c in KApplication::shutDown (this=0x71) at kapplication.moc:232
#28 0xb768334b in KApplication::qt_emit (this=0xbf9d35f4, _id=15,
    _o=0xbf9d351c) at kapplication.moc:270
#29 0xb768338b in KUniqueApplication::qt_emit (this=0x71, _id=113, _o=0x71)
    at kuniqueapplication.moc:96
#30 0x08075c2f in KTorrentApp::qt_emit ()
#31 0xb6ff064c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#32 0xb6ff0fdc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#33 0xb737a79d in QApplication::aboutToQuit () from /usr/lib/libqt-mt.so.3
#34 0xb6f9f313 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#35 0xb6f9f17a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#36 0xb6f8538d in QApplication::exec () from /usr/lib/libqt-mt.so.3
#37 0x0805c9d7 in main ()


/rob
imported4-Ivan
Registered Member
Posts
819
Karma
0

Tue Jun 06, 2006 1:00 pm
Hmm... looks like QString has problems allocating space for your tracker URL. It would be nice to know that URL. See what it gives you in TrackersView and paste here.
rob314159
Registered Member
Posts
28
Karma
0
imported4-Ivan
Registered Member
Posts
819
Karma
0

Tue Jun 06, 2006 3:12 pm
Nothing unusual there... My guess was that some weird character in tracker URL caused the crash, but apparently that's not the case.

I still have a few ideas, but I'll have to talk to George first. Hopefully, me or him will reply again today.
rob314159
Registered Member
Posts
28
Karma
0

Debugging

Tue Jun 06, 2006 4:20 pm
Is there a way of setting a breakpoint at an appropriate place and single step through KTorrent to try to see where it crashes? I would need instruction on how to do this then. Not familiar with developing tools in Linux.

It is easy to reproduce the problem since it happens every time.

I noticed some leftovers from earlier downloads in the folder ~/.kde/share/apps/ktorrent. Can they be the cause? Just a theory.

Here's another backtrace (looks different this time):

Code: Select all
Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1233836352 (LWP 8261)]
[KCrash handler]
#5  0xb67ac7c7 in raise () from /lib/tls/libc.so.6
#6  0xb67ae06b in abort () from /lib/tls/libc.so.6
#7  0xb67e3545 in __fsetlocking () from /lib/tls/libc.so.6
#8  0xb67e970c in malloc_usable_size () from /lib/tls/libc.so.6
#9  0xb67e9b27 in malloc_usable_size () from /lib/tls/libc.so.6
#10 0xb67ea032 in free () from /lib/tls/libc.so.6
#11 0xb7289b8d in QGVector::clear () from /usr/lib/libqt-mt.so.3
#12 0xb7e9aac7 in bt::ChunkManager::~ChunkManager ()
   from /usr/lib/libktorrent.so.0
#13 0xb7eb0b09 in bt::TorrentControl::~TorrentControl ()
   from /usr/lib/libktorrent.so.0
#14 0xb7284614 in QGList::clear () from /usr/lib/libqt-mt.so.3
#15 0xb7edba68 in bt::QueueManager::clear () from /usr/lib/libktorrent.so.0
#16 0x0806c600 in KTorrentCore::onExit ()
#17 0x0805dc15 in KTorrent::queryExit ()
#18 0xb78b1fe4 in KMainWindow::shuttingDown (this=0x6) at kmainwindow.cpp:1104
#19 0xb7a09e01 in KMainWindow::qt_invoke (this=0x80b47d8, _id=72,
    _o=0xbfb6693c) at kmainwindow.moc:139
#20 0x08061f90 in KTorrent::qt_invoke ()
#21 0xb6f8454b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#22 0xb6f84fdc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#23 0xb7600f4c in KApplication::shutDown (this=0x0) at kapplication.moc:232
#24 0xb761734b in KApplication::qt_emit (this=0xbfb66b44, _id=15,
    _o=0xbfb66a6c) at kapplication.moc:270
#25 0xb761738b in KUniqueApplication::qt_emit (this=0x0, _id=0, _o=0x0)
    at kuniqueapplication.moc:96
#26 0x08075c2f in KTorrentApp::qt_emit ()
#27 0xb6f8464c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#28 0xb6f84fdc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#29 0xb730e79d in QApplication::aboutToQuit () from /usr/lib/libqt-mt.so.3
#30 0xb6f33313 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#31 0xb6f3317a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#32 0xb6f1938d in QApplication::exec () from /usr/lib/libqt-mt.so.3
#33 0x0805c9d7 in main ()


/rob


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]