deluge crashes with throwing an instance of 'std::bad_cast'

Bug #1074789 reported by Joe Sweeney on 2012-11-04
50
This bug affects 9 people
Affects Status Importance Assigned to Milestone
libtorrent-rasterbar
Unknown
Unknown
deluge (Ubuntu)
Undecided
Unassigned
libtorrent-rasterbar (Ubuntu)
Undecided
Unassigned

Bug Description

terminate called after throwing an instance of 'std::bad_cast'
  what(): std::bad_cast
Aborted (core dumped)

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: deluge 1.3.5-1ubuntu4
Uname: Linux 3.7.0-030700rc3-generic x86_64
ApportVersion: 2.6.1-0ubuntu6
Architecture: amd64
Date: Sat Nov 3 21:25:50 2012
InstallationDate: Installed on 2012-10-18 (16 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: deluge
UpgradeStatus: No upgrade log present (probably fresh install)

Joe Sweeney (joesweeney413) wrote :
Cas (calumlind) wrote :

Unfortunately this is not a Deluge issue and based on the message it's likely related to boost, so you could try reinstalling boost packages.

Joe Sweeney (joesweeney413) wrote :

i've tried that several times, and a few different versions, still runs for about 10-15 seconds and closes itself out.

Cas (calumlind) wrote :

I see that you are using libtorrent 0.16.3, I wonder if installing the latest version might help.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in deluge (Ubuntu):
status: New → Confirmed
Hawk (jedihawk) wrote :

Same behavior on my system. Runs for less than a minute, then crashes.

$ uname -a
Linux mysystem 3.5.0-22-generic #34-Ubuntu SMP Tue Jan 8 21:47:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ /usr/local/bin/deluged --version
deluged: 1.3.3
libtorrent: 0.16.3.0

$ /usr/local/bin/deluged -d -L debug
...
terminate called after throwing an instance of 'std::bad_cast'
  what(): std::bad_cast
Aborted (core dumped)

(or)

$ deluged --version
deluged: 1.3.5
libtorrent: 0.16.3.0

$ deluged -d -L debug
...
terminate called after throwing an instance of 'std::bad_cast'
  what(): std::bad_cast
Aborted (core dumped)

How to fix?

Cas (calumlind) wrote :

As I said before it is a libtorrent or boost issue so if you could test with latest version of libtorrent along with deluge 1.3-stable code that would be helpful.

Also have you attempted to get a gdb backtrace?

Cas (calumlind) on 2013-02-26
Changed in deluge (Ubuntu):
status: Confirmed → Incomplete
Nathan Willis (n8) wrote :

I can confirm that this happens on 12.04 LTS as well. Or rather, it just struck today, after having been running without incident for ages. Libtorrent and boost both up to date. Other ideas, perhaps?

Cas (calumlind) wrote :

Please enable apport crash reporting: https://wiki.ubuntu.com/Apport#Ubuntu_12.04_and_later

I was able to work around this issue by disabling all my Proxies (Socksv4). So it seems that the Socks proxies may have something to do with this issue.

Launchpad Janitor (janitor) wrote :

[Expired for deluge (Ubuntu) because there has been no activity for 60 days.]

Changed in deluge (Ubuntu):
status: Incomplete → Expired
Aaron Hopkins (c-launchpad-x) wrote :

I ran into this issue, too, also with SOCKS proxies with deluged-1.3.6-0ubuntu2 on Ubuntu 13.04. The settings for all four proxies in ~/.config/deluge/core.conf that cause deluged to die with the abort due to std::bad_cast are:

      "username": "",
      "password": "",
      "type": 1,
      "port": 3180,
      "hostname": "10.1.2.3"

 I was able to work around the issue. I changed the configuration for all four proxies to something like the following, which don't seem to lead the same crashes:

      "username": "none",
      "password": "none",
      "type": 2,
      "port": 3180,
      "hostname": "10.1.2.3"

And I was able to capture a backtrace from GDB:

#0 0x00007fbb78bba037 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fbb78bbd698 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007fbb762a8e8d in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007fbb762a6f76 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007fbb762a6fa3 in std::terminate() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007fbb762a71de in __cxa_throw ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007fbb76a584b3 in ?? () from /usr/lib/libtorrent-rasterbar.so.7
#7 0x00007fbb76a6e398 in boost::asio::ip::address::to_v4() const ()
   from /usr/lib/libtorrent-rasterbar.so.7
#8 0x00007fbb76b97846 in libtorrent::socks5_stream::socks_connect(boost::shared_ptr<boost::function<void (boost::system::error_code const&)> >) ()
   from /usr/lib/libtorrent-rasterbar.so.7
#9 0x00007fbb76b9a343 in libtorrent::socks5_stream::connected(boost::system::error_code const&, boost::shared_ptr<boost::function<void (boost::system::error_code const&)> >) () from /usr/lib/libtorrent-rasterbar.so.7
#10 0x00007fbb76b9e2da in ?? () from /usr/lib/libtorrent-rasterbar.so.7
#11 0x00007fbb76a71f06 in boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service::thread_info&, boost::asio::detail::op_queue<boost::asio::detail::task_io_service_operation>&, boost::system::error_code const&) ()
   from /usr/lib/libtorrent-rasterbar.so.7
#12 0x00007fbb76a74b0e in boost::asio::detail::task_io_service::run(boost::system::error_code&) () from /usr/lib/libtorrent-rasterbar.so.7
#13 0x00007fbb76b76264 in libtorrent::aux::session_impl::main_thread() ()
   from /usr/lib/libtorrent-rasterbar.so.7
#14 0x00007fbb76a687f7 in boost_asio_detail_posix_thread_function ()
   from /usr/lib/libtorrent-rasterbar.so.7
#15 0x00007fbb79875f8e in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#16 0x00007fbb78c7ce1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Changed in deluge (Ubuntu):
status: Expired → New
arm-c (arickmcniel) wrote :

I've been having a similar issue. I do not remember exactly when this started, but it appears to have been occurring fairly frequently for a couple of months now.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in deluge (Ubuntu):
status: New → Confirmed
Michael Tinsay (tinsami1) wrote :

For me, deluge-gtk on 12.04 eventually crashes when I have encryption Enabled or Forced (see http://forum.deluge-torrent.org/viewtopic.php?f=7&t=41843). Setting it to Disabled eliminates the crashes.

Cas (calumlind) on 2014-07-20
summary: - deluge crashes constantly
+ deluge crashes with throwing an instance of 'std::bad_cast'
Changed in deluge (Ubuntu):
status: Confirmed → Invalid
Changed in libtorrent-rasterbar (Ubuntu):
status: New → Confirmed
Cas (calumlind) wrote :

It might be worth testing with latest versions of 0.16. There is a PPA that contains up to date versions of 0.16 here: https://launchpad.net/~surfernsk/+archive/ubuntu/internet-software

If you are using 12.04 then it is highly recommended to upgrade to 0.16 libtorrent but that is due to a different issue to this one.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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