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

crash 3.0.1 while removing torrents

Tags: None
(comma "," separated)
BongoMips
Registered Member
Posts
15
Karma
0

crash 3.0.1 while removing torrents

Fri Apr 04, 2008 8:22 am
Hi,

when I remove two or more downloaded and stopped torrents, the KTorrent (3.0.1) crashs

Code: Select all
ASSERT failure in QList<T>::operator[]: "index out of range", file /usr/include/QtCore/qlist.h, line 392
zone still contained 2 blocks
George
Moderator
Posts
5421
Karma
1

Sat Apr 05, 2008 10:12 am
Got a backtrace of the crash ?
BongoMips
Registered Member
Posts
15
Karma
0

Thu Apr 10, 2008 7:53 am
how can I get that backtrace?

I select all downloaded torrents, push remove button and then it crashes
only info I get is the line above.

with some set of torrents (two at least) it crashes allways, with some set it works

I've tried running it with valgrind, but it shows no useful info
BongoMips
Registered Member
Posts
15
Karma
0

Thu Apr 10, 2008 9:04 am
now I'm trying to find out where it crashes by adding debug output to some place in the source.

I've found this:

Code: Select all
connect(core,SIGNAL(torrentAdded(bt::TorrentInterface*)),this,SLOT(torrentAdded(bt::TorrentInterface*)));
connect(core,SIGNAL(torrentRemoved(bt::TorrentInterface*)),this,SLOT(torrentAdded(bt::TorrentInterface*)));

in dbus.cpp : DBus::DBus( )
is it correct? connecting torrentRemoved signal to torrentAdded slot?

Now I know, that when I push the remove button it gets to core::remove(...), it emits signal torrentRemoved and then it crashes

it crashes while its removing first torrent
BongoMips
Registered Member
Posts
15
Karma
0

Thu Apr 10, 2008 9:38 am
Finally, I've found this:

ktorrent/viewmodel.cpp

void ViewModel::removeTorrent(bt::TorrentInterface* ti)

Code: Select all
...
if (item.tc == ti)
{
   torrents.erase(i);
   removeRow(idx);
   break;
}
...


calling removeRow(idx) is the last function called before it crashes

still, is there any way how can I get backtrace?
George
Moderator
Posts
5421
Karma
1

Sat Apr 12, 2008 1:07 pm
Code: Select all
connect(core,SIGNAL(torrentAdded(bt::TorrentInterface*)),this,SLOT(torrentAdded(bt::TorrentInterface*)));
connect(core,SIGNAL(torrentRemoved(bt::TorrentInterface*)),this,SLOT(torrentAdded(bt::TorrentInterface*)));


That's a stupid copy paste error, luckily the dbus stuff is not much in use at the moment.
George
Moderator
Posts
5421
Karma
1

Sat Apr 12, 2008 1:08 pm
BongoMips wrote:Finally, I've found this:

ktorrent/viewmodel.cpp

void ViewModel::removeTorrent(bt::TorrentInterface* ti)

Code: Select all
...
if (item.tc == ti)
{
   torrents.erase(i);
   removeRow(idx);
   break;
}
...


calling removeRow(idx) is the last function called before it crashes

still, is there any way how can I get backtrace?


You can just run in a debugger, trigger the crash, and then type bt to get a backtrace.

Anyway, I will see if I can reproduce this.
George
Moderator
Posts
5421
Karma
1

Sat Apr 12, 2008 1:14 pm
OK, I can reproduce it now, you have to remove 2 torrents and make sure that KT doesn't ask any questions for each one of them.
George
Moderator
Posts
5421
Karma
1

Sat Apr 12, 2008 1:30 pm
It is fixed


Bookmarks



Who is online

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