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

Strange speed display bug

Tags: None
(comma "," separated)
agnitio
Registered Member
Posts
2
Karma
0

Strange speed display bug

Sat Oct 13, 2007 3:57 pm
I'm writing this here since I don't think that this is a bug in the code, but more a problem with my system and I can't figure it out.

All download/upload speeds are constantly increasing, leading to totally impossible numbers (over 200 MiB/s on a 10Mb connection). My theory is that instead of SETTING the value to display, it ADDS the current speed to the displayed speed.

The estimated time left on the download seems to calculate with the correct speed, so I know it's in there somewhere, it's just displayed incorrectly.

This error began to occur after I reinstalled linux on my laptop, I previously used Ktorrent (the exact same version I believe) without this error, and I also use the same version on my workstation and it works fine.

I've tried recompiling ktorrent several times, but it's always the same. Has anyone else encountered this? Or does anyone know how to fix it?

EDIT: Just found a bug for this issue, quite old and it was not reproducible, seems very similar to my problem. http://bugs.kde.org/show_bug.cgi?id=131109
George
Moderator
Posts
5421
Karma
1

Sun Oct 14, 2007 5:20 pm
Yeah, we have heard this before, strange thing is that most people don't have it (including me), so we haven't been able to fix it.

The only way I can see this going wrong is that for some reason the system time gets changed to some time in the future.

Here is an idea, can you change the file libktorrent/net/speed.cpp at line 50 :

if (now - p.second > SPEED_INTERVAL)

to

if (now - p.second > SPEED_INTERVAL || now < p.second)

Then recompile it and try it again.
agnitio
Registered Member
Posts
2
Karma
0

Sun Oct 14, 2007 9:29 pm
Confirmed, that fix solved the problem. Thanks!
George
Moderator
Posts
5421
Karma
1

Mon Oct 15, 2007 5:03 pm
That's good, then I can commit this fix.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell