Crash when deleting torrent that has no metadata

Bug #667528 reported by NovA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qBittorrent
Fix Released
High
Christophe Dumez

Bug Description

I've tried to add a magnet link from thepiratebay.org via "File/Add URL..." menu. The torrent appeared in the transfers list, but looks strange as size is 0 and hash is shown as empty. So I tried to delete that from the list and got the following error:
--------
Peer ID: -qB2480-
HTTP user agent is qBittorrent v2.4.8
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.

terminate called after throwing an instance of 'libtorrent::invalid_handle'
  what(): invalid torrent handle used

*************************************************************
Catching SIGABRT, please report a bug at http://bug.qbittorrent.org
and provide the following backtrace:
stack trace:
  /lib64/libc.so.6 [0x7f61625a8560]
  /lib64/libc.so.6 : gsignal()+0x35 [0x7f61625a84e5]
  /lib64/libc.so.6 : abort()+0x180 [0x7f61625a99b0]
  /usr/lib64/libstdc++.so.6 : __gnu_cxx::__verbose_terminate_handler()+0x115 [0x7f6162e03dc5]
  /usr/lib64/libstdc++.so.6 [0x7f6162e021f6]
  /usr/lib64/libstdc++.so.6 [0x7f6162e02223]
  /usr/lib64/libstdc++.so.6 : __cxa_rethrow()+0x46 [0x7f6162e022a6]
  /usr/lib64/libQtCore.so.4 : QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0x22d [0x7f61633d37cd]
  /usr/lib64/libQtCore.so.4 : QCoreApplication::exec()+0xbb [0x7f61633d73cb]
  qbittorrent : main()+0x11a9 [0x46e9e9]
  /lib64/libc.so.6 : __libc_start_main()+0xfd [0x7f6162594a7d]
  qbittorrent [0x469569]
Aborted
---------

After qBT restart the problematic torrent remains, and any attempts to remove it lead to the same crash. Is there any temp workaround to get rid of it? Manual editing of config files or something?

I'm using qBitTorrent from openSUSE-11.2 x64 repo by Fisiu, it's linked with libtorrent-rasterbar-0.14.

Regards!
  Andrey

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Ok, I could reproduce with v2.4.8 but not v2.5.0beta2.

Changed in qbittorrent:
assignee: nobody → Christophe Dumez (hydr0g3n)
importance: Undecided → High
milestone: none → 2.4.9
status: New → In Progress
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

This is fixed in SVN. Thanks a lot for the report!

Note that the hash of the torrent should have been displayed (this is now fixed). The crash on deletion is also fixed.
However, the fact that a 0 size was display is perfectly normal while qBittorrent is getting the torrent's metadata from the swarm. qBittorrent is initially missing this information because the torrent was adding though a magnet link. After a few minutes (provided that the tracker is working), qBittorrent usually gets the metadata from the swarm and updates the missing information (size, content, ...).

summary: - crash while deleting torrent from the transfers list
+ Crash when deleting torrent that has no metadata
Changed in qbittorrent:
status: In Progress → Fix Committed
Changed in qbittorrent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.