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

Bugs and such 4.1.1

Tags: None
(comma "," separated)
imported4-John
Registered Member
Posts
4
Karma
0

Bugs and such 4.1.1

Tue Jun 28, 2011 2:26 pm
KTorrent
Version 4.1.1
Using KDE Development Platform 4.4.00 (KDE 4.4.0)


Bugs:

- Scripts, Right Menu item "Edit Script" no longer works

- Group views empty to White screen (no listings) after clicking "Close" from an automatic "Check Data" (Config > BitTorrent > Check data when download is finished)

- About KTorrent has wrong copyright date

- No GUI way to turn Menubar back on
(Settigns > Show Menubar)

- When trying to remove a torrent:
"Cannot delete .../tor616/: No such file or directory
(but directory is on disk)
Logfile entries:
Loading /torrents/tor616/
Error thrown: Cannot delete /torrents/tor616/: No such file or directory


Causes Crashes (from screen or logfile):

- glibc detected *** double free or corruption

- terminate called after throwing an instance of 'bt::BusError'
Warning: Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

- Warning: QObject::startTimer: QTimer can only be used with threads started with QThread


Desires:

- If there is a difference between
$killall ktorrent
and
Menu > File > Quit
Then, add a command line option something like
--menu File-Quit

- Add a checkbox or button to not show "Not Queued" torrents in the Queue Manager
(in the same pane as the queue re-order buttons would be nice)

- Add a "Next" button to the Queue Manager Search function

- For Downloads, only use download traffic for "Time Stalled" calculations
(probably can do the reverse for uploads)

- Add a sticky thread in Help "Trackers: Dead and Open" for listing each
(I'll dig up my script that does tracker cleanup)

/rant
Or Not?

Someone deleted my account this last week. Somewhat **** about that. Whoever did it just destroyed ~50-100 informational and help posts done over the last 1 to 2 years. So, really, what's the point of helping KTorrent if the efforts are going to be flushed down the toilet at someone's whim? Are all my wiki entries trashed as well?

#####

George,

If you can recover my account ("Sam"), and restore the old posts, great. There was some useful information in them. If not, then, sorry. Yours, mine, everyone's time is too valuable for it to be indiscriminately discarded.

All the best to you,
Sam
George
Moderator
Posts
5421
Karma
1

Re: Bugs and such 4.1.1

Wed Jun 29, 2011 7:37 pm
John wrote:KTorrent
Version 4.1.1
Using KDE Development Platform 4.4.00 (KDE 4.4.0)


Bugs:

- Scripts, Right Menu item "Edit Script" no longer works


Will fix that

- Group views empty to White screen (no listings) after clicking "Close" from an automatic "Check Data" (Config > BitTorrent > Check data when download is finished)


Will see if I can reproduce this.

- About KTorrent has wrong copyright date


Need to update that

- No GUI way to turn Menubar back on
(Settigns > Show Menubar)


CTRL + Shift + M, default shortcut to show and hide the menu bar on all KDE applications. If you want to have a GUI way, add it to the toolbar.

- When trying to remove a torrent:
"Cannot delete .../tor616/: No such file or directory
(but directory is on disk)
Logfile entries:
Loading /torrents/tor616/
Error thrown: Cannot delete /torrents/tor616/: No such file or directory


Looks like a permissions problem. Do you have the necessary permissions to that directory and it's parent directory ? Is it a broken symlink ?

Causes Crashes (from screen or logfile):

- glibc detected *** double free or corruption


Do you have a backtrace of that crash ?

- terminate called after throwing an instance of 'bt::BusError'
Warning: Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.


Backtrace ? The interesting thing is, that ktorrent does what the warning says, so this is very strange.

- Warning: QObject::startTimer: QTimer can only be used with threads started with QThread


I need to fix this, this could be dangerous.

Desires:

- If there is a difference between
$killall ktorrent
and
Menu > File > Quit
Then, add a command line option something like
--menu File-Quit


AFAIK Qt will handle the signal the same way as File -> Quit

- Add a checkbox or button to not show "Not Queued" torrents in the Queue Manager
(in the same pane as the queue re-order buttons would be nice)

- Add a "Next" button to the Queue Manager Search function


Those should be fairly easy to add

- For Downloads, only use download traffic for "Time Stalled" calculations
(probably can do the reverse for uploads)


At the moment this is not that easy to do.

- Add a sticky thread in Help "Trackers: Dead and Open" for listing each
(I'll dig up my script that does tracker cleanup)


Go ahead and add the thread.

/rant
Or Not?


It's rather lengthy

Someone deleted my account this last week. Somewhat **** about that. Whoever did it just destroyed ~50-100 informational and help posts done over the last 1 to 2 years. So, really, what's the point of helping KTorrent if the efforts are going to be flushed down the toilet at someone's whim? Are all my wiki entries trashed as well?

#####

George,

If you can recover my account ("Sam"), and restore the old posts, great. There was some useful information in them. If not, then, sorry. Yours, mine, everyone's time is too valuable for it to be indiscriminately discarded.

All the best to you,
Sam


Accounts are only deleted by me, and I only do that for spam. Must have accidentally thought that one of your posts was spam, or maybe I just copy pasted the wrong username. Spam bots are quite sophisticated and some of them employ the tactic of copying an existing post or a part of a post and adding some links to it, maybe I was confused by one of those posts.

Sorry about that, but I'm affraid the old account is not recoverable.

Wiki changes are not affected, seeing that forum and wiki are separate accounts.
imported4-Sam
Registered Member
Posts
22
Karma
0

Re: Bugs and such 4.1.1

Thu Jun 30, 2011 6:24 pm
George wrote:
Sam wrote:KTorrent
- When trying to remove a torrent:
"Cannot delete .../tor616/: No such file or directory
(but directory is on disk)
Logfile entries:
Loading /torrents/tor616/
Error thrown: Cannot delete /torrents/tor616/: No such file or directory


Looks like a permissions problem. Do you have the necessary permissions to that directory and it's parent directory ? Is it a broken symlink ?


Broken symlinks. See: viewtopic.php?f=2&t=4106&p=20640#p20640

Causes Crashes (from screen or logfile):

- glibc detected *** double free or corruption

- terminate called after throwing an instance of 'bt::BusError'
Warning: Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.



Do you have a backtrace of that crash ?



I turned off backtrace a long time ago, too many causing root partition to fill up :(

If the corruption in glibc is file related, then it could be from the broken symlinks? Which shouldn't bother many other people?

best,
Sam
imported4-Sam
Registered Member
Posts
22
Karma
0

Re: Bugs and such 4.1.1

Sat Jul 02, 2011 3:10 am
Got this when starting KT from my tunnel script. Not sure if it's relevant, but thought I'd post it.

Code: Select all
No Ktorrent                                Starting
Warning: Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
<unknown program name>(15714)/: Communication problem with  "ktorrent" , it probably crashed.
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken." "


Also,

I don't think killall and File > Quit do the same thing. KT takes much longer to shutdown with File > Quit than it does with killall. I would rather wait for KT to close its files, so if it's not too terribly difficult could you add a command line switch to close KT gracefully?

And the log (and terminal) get spammed with:
Warning: QPainter::end: Painter ended with 3 saved states

I've played with logging levels several times, but have never found the right one to disable the warning. What do I need to set to turn these off?

Best,
Sam
George
Moderator
Posts
5421
Karma
1

Re: Bugs and such 4.1.1

Sat Jul 02, 2011 4:40 pm
OK it seems that Qt doesn't handle SIGTERM itself, so my assumption was wrong.

If you want to kill ktorrent from the commandline safely, then you should try dbus:

qdbus org.ktorrent.ktorrent /MainApplication quit

If you do this over ssh, then you have to make sure the dbus session address environment variable is set, you can find it using this command:

tr '\0' '\n' < /proc/`pidof ktorrent`/environ | grep "DBUS_SESSION_BUS_ADDRESS"

And then you can export the output of the command, it should look like this:

export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-bzJfQPkczm,guid=37df202ecc950e805ad5868f00000040

And the log (and terminal) get spammed with:
Warning: QPainter::end: Painter ended with 3 saved states

I've played with logging levels several times, but have never found the right one to disable the warning. What do I need to set to turn these off?


When do you get these warnings ?
imported4-Sam
Registered Member
Posts
22
Karma
0

Re: Bugs and such 4.1.1

Sat Jul 02, 2011 6:53 pm
Thanks George for the qdbus, would have taken me days to track that down. (tunnel script updated)

I get the QPainter::end warnings constantly (and by the hundreds) when KT is visible (e.g. not minimized to the system panel). Always have, I think even back to 3.x, when KDE was my desktop (Gnome is now, at least until KDE fixes plasma from turning my system into sludge). Once the find finishes tracking down my broken symlinks (found 80+ torrents so far, gee, no wonder KT crashed a lot :), I'll post my current log settings.

Additional:

Bugs:

- Suspending Log output doesn't work anymore

- Signal seedingAutoStopped no longer captures QM stall timer changes
See script: statusChanged.py
From Log:
The torrent tor01 has stalled longer than XX minutes, decreasing its priority
QM Starting: tor848
Starting download tor848
Loading list of peers from torrents/tor848/peer_list
QM Stopping: tor01

It does still capture exceeding Ratio limit QM changes

- tor.connect("finished(QObject* )" does not capture torrents finished by a "Check Data" event.

- After moving something in the Queue, the next time you press 'End' it goes to the top not the bottom (you can't press any other key in the interim).

- When additional peers are found by Update Trackers, they aren't always updated in the Seeders/Peers in the main window. Most noticeable with tracker bakabt.com, it will go from saying 'unregistered' to 150 seeders in the Tracker window, but the seeds don't show up in main window (nor ever connect to the new peers).

(I feel like I'm in a time warp from a year ago)
- def unload(): only being called when KT shuts down (not when script is unloaded/stopped). I was futzing with logging and had enabled/disabled statusChanged.py three times, the next tor to finish triggered the three connect signals.
From Log:
v1 11-07-05 08:31:16 - statusChanged.py In Section torrentFinished.
v1 11-07-05 08:31:17 - statusChanged.py::changePriority:: {torname} 's priority has been changed to: 1, and it's been re-queued.
v2 11-07-05 08:31:17 - statusChanged.py::torrentFinished.
v2 11-07-05 08:31:17 - statusChanged.py::changePriority::changePriority: - Tor:{torname}, Pri: 1, NsR: 0, OsR: 1
v3 11-07-05 08:31:17 - :statusChanged.py::torrentFinished:.
v3 11-07-05 08:31:17 - :statusChanged.py::changePriority: - Tor:{torname}, Pri: 1, OsR: 0.11, NsR: 1.11

- Can't get currently running script's path w/ KTScriptingPlugin.scriptsDir()

Code: Select all
import inspect

ScriptName = inspect.getfile( inspect.currentframe() ) #testing01.py

ScriptPath = KTScriptingPlugin.scriptsDir() #/home/{username}/.kde4/share/apps/ktorrent/scripts/
ScriptPath = KTScriptingPlugin.scriptDir(ScriptName) #None
ScriptPath = KTScriptingPlugin.scriptDir("testing01.py") #None


*testing01.py is in directory /testing/apps/ktorrent/scripts

Desires:

- Method for merging two different hashes with identical files. E.g. actually running both torrents at the same time, and having both "see" the other's progress. (PM me for a couple sets of torrents that could use this)


Possible Additions:

- Checkbox for "No Stats" mode.
Would turns off all non-essential internal calculations and GUI updates.


Best,
Sam
George
Moderator
Posts
5421
Karma
1

Re: Bugs and such 4.1.1

Wed Jul 06, 2011 6:19 pm
Sam wrote:Thanks George for the qdbus, would have taken me days to track that down. (tunnel script updated)

I get the QPainter::end warnings constantly (and by the hundreds) when KT is visible (e.g. not minimized to the system panel). Always have, I think even back to 3.x, when KDE was my desktop (Gnome is now, at least until KDE fixes plasma from turning my system into sludge). Once the find finishes tracking down my broken symlinks (found 80+ torrents so far, gee, no wonder KT crashed a lot :), I'll post my current log settings.

Additional:

Bugs:

- Suspending Log output doesn't work anymore


Just fixed that


- Signal seedingAutoStopped no longer captures QM stall timer changes
See script: statusChanged.py
From Log:
The torrent tor01 has stalled longer than XX minutes, decreasing its priority
QM Starting: tor848
Starting download tor848
Loading list of peers from torrents/tor848/peer_list
QM Stopping: tor01

It does still capture exceeding Ratio limit QM changes


seedingAutoStopped is only emitted when the ratio is exceeded or the max seed time reached, it is not emitted, when the QM decides to decrease priorities.

- tor.connect("finished(QObject* )" does not capture torrents finished by a "Check Data" event.


Also fixed that

- After moving something in the Queue, the next time you press 'End' it goes to the top not the bottom (you can't press any other key in the interim).


Strange, the shortcuts are handled by Qt, not sure if I can fix this.

- When additional peers are found by Update Trackers, they aren't always updated in the Seeders/Peers in the main window. Most noticeable with tracker bakabt.com, it will go from saying 'unregistered' to 150 seeders in the Tracker window, but the seeds don't show up in main window (nor ever connect to the new peers).


Will have to investigate this, did not manage to reproduce this on the first try.

(I feel like I'm in a time warp from a year ago)
- def unload(): only being called when KT shuts down (not when script is unloaded/stopped). I was futzing with logging and had enabled/disabled statusChanged.py three times, the next tor to finish triggered the three connect signals.
From Log:
v1 11-07-05 08:31:16 - statusChanged.py In Section torrentFinished.
v1 11-07-05 08:31:17 - statusChanged.py::changePriority:: {torname} 's priority has been changed to: 1, and it's been re-queued.
v2 11-07-05 08:31:17 - statusChanged.py::torrentFinished.
v2 11-07-05 08:31:17 - statusChanged.py::changePriority::changePriority: - Tor:{torname}, Pri: 1, NsR: 0, OsR: 1
v3 11-07-05 08:31:17 - :statusChanged.py::torrentFinished:.
v3 11-07-05 08:31:17 - :statusChanged.py::changePriority: - Tor:{torname}, Pri: 1, OsR: 0.11, NsR: 1.11


unload gets called, if you run the tracker grouping script, you will see that the groups will get removed when the script is stopped. This removing is done in the unload function. What you are seeing is probably the fact that disconnecting of signals is not implemented in krosspython (https://bugs.kde.org/show_bug.cgi?id=231138)

- Can't get currently running script's path w/ KTScriptingPlugin.scriptsDir()

Code: Select all
import inspect

ScriptName = inspect.getfile( inspect.currentframe() ) #testing01.py

ScriptPath = KTScriptingPlugin.scriptsDir() #/home/{username}/.kde4/share/apps/ktorrent/scripts/
ScriptPath = KTScriptingPlugin.scriptDir(ScriptName) #None
ScriptPath = KTScriptingPlugin.scriptDir("testing01.py") #None


*testing01.py is in directory /testing/apps/ktorrent/scripts


scriptDir("foo") returns the directory in ~/.kde4/share/apps/ktorrent/scripts/foo or /usr/share/kde4/apps/ktorrent/scripts/foo

if those cannot be found, then None is returned
imported4-Sam
Registered Member
Posts
22
Karma
0

Re: Bugs and such 4.1.1

Wed Jul 06, 2011 9:25 pm
George wrote:
- Signal seedingAutoStopped no longer captures QM stall timer changes
It does still capture exceeding Ratio limit QM changes

seedingAutoStopped is only emitted when the ratio is exceeded or the max seed time reached, it is not emitted, when the QM decides to decrease priorities.

S'okay, but "autoStopped" kinda implies it should capture automatic QM changes too, but moving on...

So, hmmmm.... Okay, then requesting a change :) I would like a signal that captures any stopping of a torrent. And let's be greedy, I'd also like a signal that captures any starting of a torrent.

I see in the wiki, I'd asked a Q about torrentStopped's syntax, will torrentStopped do what I want? I'll go re-play with it, can't remember what I had been doing back then (probably this same issue :shock: )

Edit:
Code: Select all
tor.connect("torrentStopped(QObject* ,const QString & )",self.torrentStopped)

throws:

Qt Warning: Object::connect: No such signal kt::DBusTorrent::torrentStopped(QObject* ,const QString & )
Wed Jul 6 19:59:55 2011: Qt Warning: Kross: "PythonExtension::doConnect Failed to connect"


- After moving something in the Queue, the next time you press 'End' it goes to the top not the bottom (you can't press any other key in the interim).

Strange, the shortcuts are handled by Qt, not sure if I can fix this.

okay, not that big a deal, just figured I'd mention it.

- When additional peers are found by Update Trackers, they aren't always updated in the Seeders/Peers in the main window. Most noticeable with tracker bakabt.com, it will go from saying 'unregistered' to 150 seeders in the Tracker window, but the seeds don't show up in main window (nor ever connect to the new peers).

Will have to investigate this, did not manage to reproduce this on the first try.

Will PM a torrent.

(I feel like I'm in a time warp from a year ago)
- def unload(): only being called when KT shuts down (not when script is unloaded/stopped). I was futzing with logging and had enabled/disabled statusChanged.py three times, the next tor to finish triggered the three connect signals.

unload gets called, if you run the tracker grouping script, you will see that the groups will get removed when the script is stopped. This removing is done in the unload function. What you are seeing is probably the fact that disconnecting of signals is not implemented in krosspython (https://bugs.kde.org/show_bug.cgi?id=231138)

Oh!, and it's a year+ old, no wonder I felt deja vu.

- Can't get currently running script's path w/ KTScriptingPlugin.scriptsDir()
*testing01.py is in directory /testing/apps/ktorrent/scripts

scriptDir("foo") returns the directory in ~/.kde4/share/apps/ktorrent/scripts/foo or /usr/share/kde4/apps/ktorrent/scripts/foo
if those cannot be found, then None is returned

okay, I'd ask why, but I did some digging to do it in python, and it seems python can't return the path of the currently running script, hence, the KTScriptingPlugin can't either. That's annoying, but nothing I can expect you to do about it :(

New Oddity (from terminal, and not real sure how much time passed between appendChild and QDBusConnection ):

Code: Select all
Warning: Calling appendChild() on a null node does nothing.
Warning: QDBusConnection: name 'org.kde.kglobalaccel' had owner '' but we thought it was ':1.76'
Warning: QDBusConnection: name 'org.kde.knotify' had owner '' but we thought it was ':1.109'
Warning: QAbstractItemModel::endInsertRows:  Invalid index ( 1511 , 0 ) in model kt::QueueManagerModel(0x2390d3d0)
Warning: QAbstractItemModel::endInsertRows:  Invalid index ( 1511 , 1 ) in model kt::QueueManagerModel(0x2390d3d0)
Warning: QAbstractItemModel::endInsertRows:  Invalid index ( 1511 , 3 ) in model kt::QueueManagerModel(0x2390d3d0)
Warning: QTreeView::rowsInserted internal representation of the model has been corrupted, resetting.


but I've never seen that set before.

Best,
Sam
George
Moderator
Posts
5421
Karma
1

Re: Bugs and such 4.1.1

Thu Jul 07, 2011 5:33 pm
Sam wrote:Edit:
Code: Select all
tor.connect("torrentStopped(QObject* ,const QString & )",self.torrentStopped)

throws:

Qt Warning: Object::connect: No such signal kt::DBusTorrent::torrentStopped(QObject* ,const QString & )
Wed Jul 6 19:59:55 2011: Qt Warning: Kross: "PythonExtension::doConnect Failed to connect"



torrentStopped has only one parameter, so remove the QString

Oh!, and it's a year+ old, no wonder I felt deja vu.


One of these days, I'm going to rewrite all the scripts in ruby, krosspython appears to be unmaintained

okay, I'd ask why, but I did some digging to do it in python, and it seems python can't return the path of the currently running script, hence, the KTScriptingPlugin can't either. That's annoying, but nothing I can expect you to do about it :(


The scriptDir's function's main purpose is to find files packaged with the script (see http://ktorrent.org/wiki/index.php/Writ ... t_Packages)

New Oddity (from terminal, and not real sure how much time passed between appendChild and QDBusConnection ):

Code: Select all
Warning: Calling appendChild() on a null node does nothing.
Warning: QDBusConnection: name 'org.kde.kglobalaccel' had owner '' but we thought it was ':1.76'
Warning: QDBusConnection: name 'org.kde.knotify' had owner '' but we thought it was ':1.109'
Warning: QAbstractItemModel::endInsertRows:  Invalid index ( 1511 , 0 ) in model kt::QueueManagerModel(0x2390d3d0)
Warning: QAbstractItemModel::endInsertRows:  Invalid index ( 1511 , 1 ) in model kt::QueueManagerModel(0x2390d3d0)
Warning: QAbstractItemModel::endInsertRows:  Invalid index ( 1511 , 3 ) in model kt::QueueManagerModel(0x2390d3d0)
Warning: QTreeView::rowsInserted internal representation of the model has been corrupted, resetting.


but I've never seen that set before.


They are warnings, not much of a problem, though would prefer to fix them, is there some way to trigger these easily ?
imported4-Sam
Registered Member
Posts
22
Karma
0

Re: Bugs and such 4.1.1

Thu Jul 07, 2011 11:19 pm
torrentStopped has only one parameter, so remove the QString

Yeah, did that, now I can't filter out torrents that are stopped from KT shutting down :(
*

One of these days, I'm going to rewrite all the scripts in ruby, krosspython appears to be unmaintained

Would there be any difference between ruby and php? If there isn't, I'd guess more people know php than ruby. Especially given how popular Drupal is.
*

The scriptDir's function's main purpose is to find files packaged with the script (see http://ktorrent.org/wiki/index.php/Writ ... t_Packages)

I read that, well had to use it in the first place :mrgreen: , but (and it's not something you can fix, because as I found out it's a python problem), it doesn't work "to find files packaged with the script" as python can't tell you the directory a running script is in! So, other than hardcoding something (or forcing the use of special directories), it's moot.

but I've never seen that set before.
They are warnings, not much of a problem, though would prefer to fix them, is there some way to trigger these easily ?

First, and only, time I've seen them. I wasn't at the machine when it happened, I just saw it on the terminal screen. If I trigger it again, I'll post more info.

Edit:
Code: Select all
Warning: Calling appendChild() on a null node does nothing.
Warning: QDBusConnection: name 'org.kde.kglobalaccel' had owner '' but we thought it was ':1.75'
Warning: QPainter::end: Painter ended with 2 saved states

More info: Received this upon KT's first startup, just after a re-boot. I don't seem to get the 'had owner' at any other time. (Other two warnings are normal.)

====
* How many people use scripting? Should it just be abandoned? I know I like it, but I like to play with things. If you do want to keep it, there's a bunch of things I'd like it to do, so I can automate KT more.

New Issues:
- When KT tries to start a torrent that has either missing data files or bad symlinks, all other torrents are stopped as well. Expected behaviour is to display the pop-up, but keep everything else running.

- Can't stop a Downloading (running) torrent if you only have 9 torrents downloading and the QM is set for Maximum downloads, "12." (The torrent will briefly stop, then start running again.)


Old Desire:
- Show the Priority in the main torrent pane (Group tabs). Allow sorting on it like Name, Location, etc.

Broken symlinks and Cache Dir:
- Is the cache dir still used? Is it no longer updated upon a "Move Data?" It seems all the torrents I have with broken symlinks, have at one point had their data moved and now have a correct file_map, but the cache dir didn't get updated. If KT no longer uses the cache dirs, can I delete them all? (It's now highly annoying, as I've found 1,000+ broken symlinks, and while I don't mind updating a few manually, that's a bit much...)

Best,
Sam


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]