Registered Member
|
-- stopped all files
-- started just one for download -- changing settings for upload rate to something at this point all download files are started -- stopped all again -- started one (the same as above) when the one file downloading is finished, again all files are started (seeding and downloads). at some point I didn't believe I can stop anything at all ) is this known behaviour? thanks. |
Registered Member
|
Nope, i've not read this in the forum or bugs.kde.org yet.
I was thinking of the added queue manager for the seeding part some days back, but then you said that you stopped all torrents first, which *should* make the torrents automaticly controlled by user and disabled for queuemanager. I haven't seen this bug popup yet in my client here. Have you informed yourself with the change that the start/stop all button only does the active download or upload tab? |
Registered Member
|
yes it seems like start/stop *all* buttons actually does not mean *all*...
however, if you activate upload tab (seed) then press stopall button, go to the settings and change upload rate, you will get all torrents seeding without further action taken. also if you have only one active download (all other down/seeds stopped), upon completion all the rest are activated again (bot downloads and seeds). adding new torrent also activates everything... the point is that there are too many cases when torrents are activated without explicit 'start action' but after explicit 'stop action'. a bit weird... |
Registered Member
|
|
Registered Member
|
|
Registered Member
|
|
Registered Member
|
|
Registered Member
|
|
Registered Member
|
I'm trying to dig it myself, here is the backtrace after preferences:
Breakpoint 4, bt::QueueManager::start (this=0x8259350, tc=0x8259378, user=182) at queuemanager.cpp:79 79 { (gdb) bt #0 bt::QueueManager::start (this=0x8259350, tc=0x8259378, user=182) at queuemanager.cpp:79 #1 0xb7ef1fb2 in bt::QueueManager::orderQueue (this=0x8259350) at queuemanager.cpp:413 #2 0x08060584 in KTorrent::applySettings (this=0x8128b00, change_port=true) at ktorrent.cpp:304 #3 0x08067fb3 in KTorrentPreferences::slotApply (this=0x815f988) at pref.cpp:94 #4 0x08065e73 in KTorrentPreferences::slotOk (this=0x815f988) at pref.cpp:74 #5 0xb79412be in KDialogBase::qt_invoke () from /opt/kde/lib/libkdeui.so.4 #6 0x08067697 in KTorrentPreferences::qt_invoke (this=0x815f988, _id=73, _o=0xbf97e0f0) at pref.moc:176 #7 0xb6fc54e4 in QObject::activate_signal () from /usr/lib/qt/lib/libqt-mt.so.3 ... bt::QueueManager::orderQueue() is called after prefs dialog and it starts all downloads if they are not started: bt::QueueManager::orderQueue (this=0x7f6) at queuemanager.cpp:311 311 if(!downloads.count()) (gdb) n 310 { (gdb) 311 if(!downloads.count()) (gdb) 310 { (gdb) 311 if(!downloads.count()) (gdb) 314 downloads.sort(); (gdb) 316 QPtrList<TorrentInterface>::const_iterator it = downloads.begin(); (gdb) 317 QPtrList<TorrentInterface>::const_iterator its = downloads.end(); (gdb) 320 if(max_downloads != 0 || max_seeds != 0) (gdb) 317 QPtrList<TorrentInterface>::const_iterator its = downloads.end(); (gdb) 320 if(max_downloads != 0 || max_seeds != 0) (gdb) 407 for(it=downloads.begin(); it!=downloads.end(); ++it) (gdb) 409 TorrentInterface* tc = *it; (gdb) 410 const TorrentStats & s = tc->getStats(); (gdb) 409 TorrentInterface* tc = *it; (gdb) 410 const TorrentStats & s = tc->getStats(); (gdb) 412 if(!s.running) (gdb) 413 start(tc); (gdb) |
Registered Member
|
Check out libktorrent/queuemanager.cpp and look for the function orderQueue().
This function is called everytime preferences are changed (concurrent downloads/uploads limits), torrent is added, removed etc.. From your post I can see that on every supposed action when orderQueue() is called something goes wrong. max_downloads, max_seeds are variables that hold your preferences so check them. downloads is a QPtrList which holds all torrents. They are iterated with the first 'for' loop in that function so you may want to check out something else in there: tc->getStats() returns torrent stats. Look for - autostart (whether torrent should be started at KT startup) - user_controlled (whether torrent is controlled by user - in that case orderQueue() should have NO EFFECT AT ALL on that torrent) That should be all for now I think. My guess is that user controlled torrents are somehow started by QM which should not happen. It's really weird that it doesn't happen here... Stupid question but are you sure you have the latest SVN? |
Registered Member
|
It is not stupid: At revision 527960. as of today.
I think it is clear: in void QueueManager::orderQueue() the "big if" (line 320) is if( max_downloads != 0 || max_seeds != 0 ), both are 0 here so 'else' is executed and it is simple: start everyone unless started:
my guess is that here should be something like:
works fine, hope none side effects |
Registered Member
|
|
Registered Member
|
great, thanks
now the stop button for single torrent does not work
surplus of comments, isn't it |
Registered Member
|
|
Registered Member
|
first I assumed the comment on tc->stop() is wrong. however the problem is different.
when torrent is requested to stop all goes as planned until orderQueue() is called. then this torrent is started again. so there is no way to stop single torrent. I didn't dig how stopAll differs than stopDownload but there is something. I start to think that orderQueue() shouldn't start any torrent automatically, or at least just do it once when ktorrent starts. I could be wrong but I don't see case where torrent is stopped and is not user controlled and has to be started again. perhaps the file descriptors problem is actually such case but it is not solution (i.e. descriptors problem should be solved). Excuse me if I made wrong conclusions I spent only about half an hour looking inside ktorrent... trying to help |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]