qBittorrent v2.3.0rc5 crashes when a torrent completes

Bug #608309 reported by salman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qBittorrent
Fix Released
Undecided
Christophe Dumez

Bug Description

I put some torrents in the watched folder and the program suddenly crashed.

Now every time I start the program it crashes.

Edit: Every time a torrent is finished downloading the program crashes

Here is the backtrace:
stack trace:
  [0xb78ca400]
  [0xb78ca430]
  /lib/tls/i686/cmov/libc.so.6 : gsignal()+0x51 [0xb5aec651]
  /lib/tls/i686/cmov/libc.so.6 : abort()+0x182 [0xb5aefa82]
  /usr/lib/libstdc++.so.6 : __gnu_cxx::__verbose_terminate_handler()+0x14f [0xb5d2152f]
  /usr/lib/libstdc++.so.6 : ()+0xbd465 [0xb5d1f465]
  /usr/lib/libstdc++.so.6 : ()+0xbd4a2 [0xb5d1f4a2]
  /usr/lib/libstdc++.so.6 : __cxa_rethrow()+0x5b [0xb5d1f55b]
  /usr/lib/libQtCore.so.4 : QCoreApplication::notifyInternal(QObject*, QEvent*)+0x92 [0xb5ec0a52]
  /usr/lib/libQtCore.so.4 : ()+0x197d66 [0xb5eefd66]
  /usr/lib/libQtCore.so.4 : ()+0x194917 [0xb5eec917]
  /lib/libglib-2.0.so.0 : g_main_context_dispatch()+0x1d5 [0xb6f145e5]
  /lib/libglib-2.0.so.0 : ()+0x3f2d8 [0xb6f182d8]
  /lib/libglib-2.0.so.0 : g_main_context_iteration()+0x68 [0xb6f184b8]
  /usr/lib/libQtCore.so.4 : QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x65 [0xb5eec5d5]
  /usr/lib/libQtGui.so.4 : ()+0x1f5135 [0xb62f3135]
  /usr/lib/libQtCore.so.4 : QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x49 [0xb5ebf059]
  /usr/lib/libQtCore.so.4 : QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xfa [0xb5ebf4aa]
  /usr/lib/libQtCore.so.4 : QCoreApplication::exec()+0xaf [0xb5ec369f]
  /usr/lib/libQtGui.so.4 : QApplication::exec()+0x27 [0xb6233577]
  qbittorrent : main()+0x1302 [0x80a0752]
  /lib/tls/i686/cmov/libc.so.6 : __libc_start_main()+0xe6 [0xb5ad8bd6]
  qbittorrent() [0x809bd31]
Aborted

salman (nesseyan)
description: updated
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Could you please try rc7? There was a fix regarding fastresume data saving that may be related.

Changed in qbittorrent:
assignee: nobody → Christophe Dumez (hydr0g3n)
status: New → Incomplete
Revision history for this message
salman (nesseyan) wrote :

Just tested it in rc7 and the problem is still there

Every time a torrent completes it crashes

heres the backtrace:
stack trace:
  [0xb78be400]
  /usr/lib/libstdc++.so.6 : std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)+0x1a [0xb5cef4aa]
  qbittorrent : Bittorrent::readAlerts()+0x3ac [0x80b01bc]
  qbittorrent : Bittorrent::qt_metacall(QMetaObject::Call, int, void**)+0xab3 [0x821dfe3]
  /usr/lib/libQtCore.so.4 : QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**)+0x3a [0xb5eb9c9a]
  /usr/lib/libQtCore.so.4 : QMetaObject::activate(QObject*, QMetaObject const*, int, void**)+0x2d5 [0xb5ec83d5]
  /usr/lib/libQtCore.so.4 : QTimer::timeout()+0x37 [0xb5f19aa7]
  /usr/lib/libQtCore.so.4 : QTimer::timerEvent(QTimerEvent*)+0x3e [0xb5ed060e]
  /usr/lib/libQtCore.so.4 : QObject::event(QEvent*)+0x84 [0xb5ec5254]
  /usr/lib/libQtGui.so.4 : QApplicationPrivate::notify_helper(QObject*, QEvent*)+0xac [0xb62274dc]
  /usr/lib/libQtGui.so.4 : QApplication::notify(QObject*, QEvent*)+0x17e [0xb622e05e]
  /usr/lib/libQtCore.so.4 : QCoreApplication::notifyInternal(QObject*, QEvent*)+0x7b [0xb5eb4a3b]
  /usr/lib/libQtCore.so.4 : ()+0x197d66 [0xb5ee3d66]
  /usr/lib/libQtCore.so.4 : ()+0x194917 [0xb5ee0917]
  /lib/libglib-2.0.so.0 : g_main_context_dispatch()+0x1d5 [0xb6f085e5]
  /lib/libglib-2.0.so.0 : ()+0x3f2d8 [0xb6f0c2d8]
  /lib/libglib-2.0.so.0 : g_main_context_iteration()+0x68 [0xb6f0c4b8]
  /usr/lib/libQtCore.so.4 : QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x65 [0xb5ee05d5]
  /usr/lib/libQtGui.so.4 : ()+0x1f5135 [0xb62e7135]
  /usr/lib/libQtCore.so.4 : QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x49 [0xb5eb3059]
  /usr/lib/libQtCore.so.4 : QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xfa [0xb5eb34aa]
  /usr/lib/libQtCore.so.4 : QCoreApplication::exec()+0xaf [0xb5eb769f]
  /usr/lib/libQtGui.so.4 : QApplication::exec()+0x27 [0xb6227577]
  qbittorrent : main()+0x12ec [0x80a05fc]
  /lib/tls/i686/cmov/libc.so.6 : __libc_start_main()+0xe6 [0xb5accbd6]
  qbittorrent() [0x809bbf1]
Segmentation fault

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

The backtrace indicates Bittorrent::readAlerts() so this looks interesting.

However, it would be nice to have the line numbers in the backtrace to help me debug.

If possible, please do the following:
1. Install gdb (debugger) e.g. sudo apt-get install gdb
2. Reproduce the crash in gdb:
$ gdb qbittorrent
> run
... Make it crash ...
> bt 25
.. This will print the backtrace I need ...

Revision history for this message
salman (nesseyan) wrote :
Download full text (4.9 KiB)

I have done what you said but every time I try to reproduce the problem the program freezes before it crashes.

I hop this is helpful, sorry but this is all I could get.

here the backtrace:
Catching SIGSEGV, please report a bug at http://bug.qbittorrent.org
and provide the following backtrace:
stack trace:
  [0xb77f2400]
  /usr/lib/libstdc++.so.6 : std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)+0x1a [0xb5c234aa]
  qbittorrent : Bittorrent::readAlerts()+0x3ac [0x80b01bc]
  qbittorrent : Bittorrent::qt_metacall(QMetaObject::Call, int, void**)+0xab3 [0x821dfe3]
  /usr/lib/libQtCore.so.4 : QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**)+0x3a [0xb5dedc9a]
  /usr/lib/libQtCore.so.4 : QMetaObject::activate(QObject*, QMetaObject const*, int, void**)+0x2d5 [0xb5dfc3d5]
  /usr/lib/libQtCore.so.4 : QTimer::timeout()+0x37 [0xb5e4daa7]
  /usr/lib/libQtCore.so.4 : QTimer::timerEvent(QTimerEvent*)+0x3e [0xb5e0460e]
  /usr/lib/libQtCore.so.4 : QObject::event(QEvent*)+0x84 [0xb5df9254]
  /usr/lib/libQtGui.so.4 : QApplicationPrivate::notify_helper(QObject*, QEvent*)+0xac [0xb615b4dc]
  /usr/lib/libQtGui.so.4 : QApplication::notify(QObject*, QEvent*)+0x17e [0xb616205e]
  /usr/lib/libQtCore.so.4 : QCoreApplication::notifyInternal(QObject*, QEvent*)+0x7b [0xb5de8a3b]
  /usr/lib/libQtCore.so.4 : ()+0x197d66 [0xb5e17d66]
  /usr/lib/libQtCore.so.4 : ()+0x194917 [0xb5e14917]
  /lib/libglib-2.0.so.0 : g_main_context_dispatch()+0x1d5 [0xb6e3c5e5]
  /lib/libglib-2.0.so.0 : ()+0x3f2d8 [0xb6e402d8]
  /lib/libglib-2.0.so.0 : g_main_context_iteration()+0x68 [0xb6e404b8]
  /usr/lib/libQtCore.so.4 : QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x65 [0xb5e145d5]
  /usr/lib/libQtGui.so.4 : ()+0x1f5135 [0xb621b135]
  /usr/lib/libQtCore.so.4 : QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x49 [0xb5de7059]
  /usr/lib/libQtCore.so.4 : QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xfa [0xb5de74aa]
  /usr/lib/libQtCore.so.4 : QCoreApplication::exec()+0xaf [0xb5deb69f]
  /usr/lib/libQtGui.so.4 : QApplication::exec()+0x27 [0xb615b577]
  qbittorrent : main()+0x12ec [0x80a05fc]
  /lib/tls/i686/cmov/libc.so.6 : __libc_start_main()+0xe6 [0xb5a00bd6]
  qbittorrent() [0x809bbf1]
Segmentation fault
sal@sal-desktop:~$ gdb qbittorrent
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/qbittorrent...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/qbittorrent
[Thread debugging using libthread_db enabled]
[New Thread 0xb4b76b70 (LWP 6146)]
[New Thread 0xb4375b70 (LWP 6147)]
Peer ID: -UT1850-
[New Thread 0xb3b73b70 (LWP 6148)]
HTTP user agent is uTorrent/1850(17414)
[New Thread 0xb31f...

Read more...

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

Unfortunately, you don't have debug enabled. What distro are you using? How did you install qBittorrent?

Revision history for this message
salman (nesseyan) wrote :

I am using Ubuntu 10.04 Lucid Lynx.

I installed qBittorrent by adding the qBittorrent PPA then

sudo apt-get install qBittorrent.

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

Ok. I'm preparing a package with debug enabled for you.

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

I hope you're using 32bits.

Revision history for this message
salman (nesseyan) wrote :

I have a 32bit and 64bit I can what ever you need me to use.

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

Here is a package with debug enabled. Could you please get a backtrace with gdb again? It should have line numbers in it now.

Thanks in advance.

Revision history for this message
salman (nesseyan) wrote :

Here is what I did

1- gdb qBittorrent

2- run

3- made qbittorrent stop responding

4- bt 25

I gave what I did to make shore what I did was right

Sorry to have troubled with the package

Here is the result of the backtrace:

#0 0xb64134aa in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/libstdc++.so.6
#1 0x0811e736 in Bittorrent::readAlerts() ()
#2 0x0826a165 in Bittorrent::qt_metacall(QMetaObject::Call, int, void**) ()
#3 0xb65ddc9a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#4 0xb65ec3d5 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#5 0xb663daa7 in QTimer::timeout() () from /usr/lib/libQtCore.so.4
#6 0xb65f460e in QTimer::timerEvent(QTimerEvent*) ()
   from /usr/lib/libQtCore.so.4
#7 0xb65e9254 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#8 0xb694b4dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#9 0xb695205e in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#10 0xb65d8a3b in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/libQtCore.so.4
#11 0xb6607d66 in ?? () from /usr/lib/libQtCore.so.4
#12 0xb6604917 in ?? () from /usr/lib/libQtCore.so.4
#13 0xb762c5e5 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#14 0xb76302d8 in ?? () from /lib/libglib-2.0.so.0
#15 0xb76304b8 in g_main_context_iteration () from /lib/libglib-2.0.so.0

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

So sorry, it seems that the debian packaging system removes debug symbols after building... This is why there still are not line numbers in your backtrace.

I'm uploading a new rc7-0ubuntu2 revision to my PPA. It should add a qbittorrent-dbg package which contains the debug symbols. This is the first time I do this, let's hope it works.

If it does, it will really help debug to have the debug symbols available on the PPA :)

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

ubuntu2 does not work yet. I'm trying to figure out how to make this work.

Revision history for this message
salman (nesseyan) wrote :

If you need any help with the testing, just tell me what to do.

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

Could you please get a gdb backtrace with this one? I confirmed it works.

Revision history for this message
salman (nesseyan) wrote :

Tried the second package you gave me.

I had to force install the package using sudo dpkg -i

I hop I did it wright.

latest result:

** (<unknown>:21597): CRITICAL **: dbus_g_proxy_connect_signal: assertion `DBUS_IS_G_PROXY (proxy)' failed

** (<unknown>:21597): CRITICAL **: dbus_g_proxy_connect_signal: assertion `DBUS_IS_G_PROXY (proxy)' failed

** (<unknown>:21597): CRITICAL **: dbus_g_proxy_call: assertion `DBUS_IS_G_PROXY (proxy)' failed

** (<unknown>:21597): CRITICAL **: dbus_g_proxy_disconnect_signal: assertion `DBUS_IS_G_PROXY (proxy)' failed

** (<unknown>:21597): CRITICAL **: dbus_g_proxy_disconnect_signal: assertion `DBUS_IS_G_PROXY (proxy)' failed

(<unknown>:21597): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Checking if the torrent contains torrent files to download

Program received signal SIGSEGV, Segmentation fault.
0xb64134aa in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/libstdc++.so.6
(gdb) bt 25
#0 0xb64134aa in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/libstdc++.so.6
#1 0x0811e6f6 in Bittorrent::readAlerts (this=0x883bc80)
    at ../../src/bittorrent.cpp:2018
#2 0x0826a089 in Bittorrent::qt_metacall (this=0x883bc80,
    _c=QMetaObject::InvokeMetaMethod, _id=77, _a=0xbfffe9dc)
    at moc_bittorrent.cpp:313
#3 0xb65ddc9a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#4 0xb65ec3d5 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#5 0xb663daa7 in QTimer::timeout() () from /usr/lib/libQtCore.so.4
#6 0xb65f460e in QTimer::timerEvent(QTimerEvent*) ()
   from /usr/lib/libQtCore.so.4
#7 0xb65e9254 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#8 0xb694b4dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#9 0xb695205e in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#10 0xb65d8a3b in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/libQtCore.so.4
#11 0xb6607d66 in ?? () from /usr/lib/libQtCore.so.4
#12 0xb6604917 in ?? () from /usr/lib/libQtCore.so.4

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

Thanks! The backtrace is usable now.

Could tell me exactly what package full version of libtorrent-rasterbar you have installed?

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

Ok. I can reproduce now. I'm working on it. Thanks!

Changed in qbittorrent:
status: Incomplete → In Progress
summary: - qBittorrent v2.3.0rc5 crashes on startup
+ qBittorrent v2.3.0rc5 crashes when a torrent completes
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

This is fixed in rc9. Thanks a lot!
Sorry for the delay but it was a tricky one to figure out :)

Changed in qbittorrent:
milestone: none → 2.3.0
status: In Progress → Fix Released
Revision history for this message
salman (nesseyan) wrote :

Thank you for the fix.

What was the problem if you don't mind me asking.

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

Upon torrent completion, I was iterating over the files in the torrent to check it is contains other sub-torrent files (for recursive download).

Unfortunately, I did something wrong with my iterators.

Basically,

for(it=get_torrent_files().begin(); it != get_torrent_files().end(); it++) {
// Check if the file is a torrent
}

Unfortunately, get_torrent_files() returned a copy of the vector instead of a reference. So, basically I was handling iterators over different copies of the same vector...

I hope you are a programmer :P

Revision history for this message
salman (nesseyan) wrote :

I am not a programmer but I think I get it basically.

Appreciate the explanation.

I think I am going to look in to it more.

Thanks again for your hard work.

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

Can you confirm rc9 is stable on your end?

Revision history for this message
salman (nesseyan) wrote :

Ran some tests as soon as you said it was fixed in rc9.
And I think its safe to say it is stable for now.

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.