qbittorrent-nox crashes on startup

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

Bug Description

Using libtorrent-rasterbar-0.14.8, libboost-1.35. Compiled qBT 2.2.2 and got sigsegv. libtorrent bug?

*************************************************************
Catching SIGSEGV, please report a bug at http://bug.qbittorrent.org
and provide the following backtrace:
stack trace:
  /lib/libc.so.6 [0x2b4a8db1df60]
  /lib/libc.so.6 [0x2b4a8db0f5d2]
  /usr/lib/gconv/UTF-16.so : gconv()+0x2e9 [0x2b4a8e93f979]
  /lib/libc.so.6 [0x2b4a8db0b2f4]
  /lib/libc.so.6 : iconv()+0x6d [0x2b4a8db0a87d]
  /usr/lib/libQtCore.so.4 [0x2b4a8d08f492]
  /usr/lib/libQtCore.so.4 : QTextCodec::fromUnicode(QString const&) const+0x18 [0x2b4a8d089d78]
  /usr/lib/libQtCore.so.4 : QString::toLocal8Bit() const+0x31 [0x2b4a8cfb4681]
  qbittorrent-nox : Bittorrent::addTorrent(QString, bool, QString, bool)+0x201 [0x43d4e1]
  qbittorrent-nox : Bittorrent::startUpTorrents()+0x13b7 [0x4528b7]
  qbittorrent-nox : HeadlessLoader::HeadlessLoader(QStringList)+0x161 [0x42d631]
  qbittorrent-nox : main()+0xe0e [0x4294ae]
  /lib/libc.so.6 : __libc_start_main()+0xe6 [0x2b4a8db0a1a6]
  qbittorrent-nox : std::ios_base::Init::~Init()+0x59 [0x427f49]
Speicherzugriffsfehler (core dumped)

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

No, the crash occurs in qBittorrent, not libtorrent.

It seems to be a unicode problem (although v2.2.2 handles system encodings fine as far as I know). What is you system font encoding?

$ locale
(LANG=en_US.UTF-8 for me)

Is the crash recent? Did qBittorrent work fine before? It seems the crash occurs when loading a torrent.
It could be assumed that the encoding problem is in a particular torrent.

You could try removing them one by one to see which one it is.
Torrents are located at:
~/.local/share/data/qBittorrent/BT_backup/

Changed in qbittorrent:
assignee: nobody → Christophe Dumez (hydr0g3n)
status: New → Incomplete
Revision history for this message
fooooo (pkol.-deactivatedaccount) wrote :

My system supports LANG=de_DE.UTF-8.

I used qBittorrent 2.1.3 with above components without any problems. Today I downloaded the 2.2.2 release and compiled it. Starting qbittorrent-nox created the above sigsegv.

I moved all torrents into a new folder at ~/.local/share/data/qBittorrent/BT_bac and got the following backtrace.

My personal opinion is that an outdated version of libboost (1.3.4) or a deeper package f*ckup on my system is causing the problem. What do you think?

*************************************************************
Catching SIGSEGV, please report a bug at http://bug.qbittorrent.org
and provide the following backtrace:
stack trace:
  /lib/libc.so.6 [0x2ae5bf40ef60]
  /lib/libc.so.6 [0x2ae5bf4006b0]
  /usr/lib/gconv/UTF-16.so : gconv()+0x2e9 [0x2ae5c0230979]
  /lib/libc.so.6 [0x2ae5bf3fc2f4]
  /lib/libc.so.6 : iconv()+0x6d [0x2ae5bf3fb87d]
  /usr/lib/libQtCore.so.4 [0x2ae5be980492]
  /usr/lib/libQtCore.so.4 : QTextCodec::fromUnicode(QString const&) const+0x18 [0x2ae5be97ad78]
  /usr/lib/libQtCore.so.4 : QString::toLocal8Bit() const+0x31 [0x2ae5be8a5681]
  qbittorrent-nox : Bittorrent::addTorrent(QString, bool, QString, bool)+0x201 [0x43d4e1]
  qbittorrent-nox : Bittorrent::startUpTorrents()+0x13b7 [0x4528b7]
  qbittorrent-nox : HeadlessLoader::HeadlessLoader(QStringList)+0x161 [0x42d631]
  qbittorrent-nox : main()+0xe0e [0x4294ae]
  /lib/libc.so.6 : __libc_start_main()+0xe6 [0x2ae5bf3fb1a6]
  qbittorrent-nox : std::ios_base::Init::~Init()+0x59 [0x427f49]
Speicherzugriffsfehler (core dumped)

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

After you move away all the torrents, you should probably remove this file too (backup it just to be safe):
~/.config/qBittorrent/qBittorrent-resume.conf

Then it should not call addTorrent() function anymore, until you manually add back your torrents.

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

You can also try to update to qBittorrent v2.2.3 (released yesterday).

It reverts some compilation/linking changes for boost and other libs. It could be the reason for your issue if you say previous qBittorrent was working fine.

Revision history for this message
fooooo (pkol.-deactivatedaccount) wrote :

After having moved the resume file, qBT 2.2.2 started properly. Thanks :)

I then downloaded the 2.2.3 tar.gz and successfully compiled it after installing libboost1.35-dev and not libboost-dev (which is 1.34 and outdated).
I'm now running the 2.2.3 version without any problems. Thanks again!

An offtopic feature request: How about including the version number of qBT in the about window of the webUI?

Revision history for this message
fooooo (pkol.-deactivatedaccount) wrote :

Okay, after re-adding a torrent to resume seeding I got again a sigsegv, yet without any additional info.
*************************************************************
Catching SIGSEGV, please report a bug at http://bug.qbittorrent.org
and provide the following backtrace:
stack trace:
Speicherzugriffsfehler (core dumped)

Revision history for this message
fooooo (pkol.-deactivatedaccount) wrote :

Sorry for all the noise.
I then added a completely new torrent and qBT worked without any problems. After a qBT restart I got again a sigsegv. Seems like resuming torrents is causing the problems.

*************************************************************
Catching SIGSEGV, please report a bug at http://bug.qbittorrent.org
and provide the following backtrace:
stack trace:
Speicherzugriffsfehler (core dumped)

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

Ok. I'm pleased that everything is back to normal. I hope it stays this way.

Regarding the version number in the Web UI issue:
I replace qBittorrent version number in the code using a compiler DEFINE. It works fine for compiled code but not for HTML such as in Web UI pages. Thus, I would have to update qBittorrent version number manually in Web UI and this can be annoying (and of course easy to forget).

Changed in qbittorrent:
status: Incomplete → Won't Fix
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Reopening then.

Changed in qbittorrent:
status: Won't Fix → New
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I'm attaching a patch that should fix the issue. Please apply it and report back if you experience any other crashes. It might be possible that the same bug is present somewhere else in the code.

Changed in qbittorrent:
milestone: none → 2.2.4
status: New → Fix Committed
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

apply with:
patch -p0 -i qt4-fix.patch

Revision history for this message
fooooo (pkol.-deactivatedaccount) wrote :

Seems to fix problem, I will test it and report any problem. Thanks!

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.