Segmentation fault #3332

Closed
opened 2026-02-21 16:42:50 -05:00 by deekerman · 2 comments
Owner

Originally created by @harmancode on GitHub (Nov 14, 2015).

qbittorrent crashes in a few seconds after launch. Please find below the output. OS: Linux Mint 17.2

$ qbittorrent
"sni-qt/3928" WARN 14:54:32.235 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE


Catching SIGSEGV, please report a bug at http://bug.qbittorrent.org
and provide the following backtrace:
qBittorrent version: v3.1.8
stack trace:
/usr/lib/x86_64-linux-gnu/libstdc++.so.6 : std::string::assign(std::string const&)+0x9 [0x7f1805cca479]
/usr/lib/libtorrent-rasterbar.so.7 : libtorrent::torrent::connect_web_seed(std::_List_iteratorlibtorrent::web_seed_entry, boost::asio::ip::basic_endpointboost::asio::ip::tcp)+0x604 [0x7f1807eee7d4]
/usr/lib/libtorrent-rasterbar.so.7 : libtorrent::torrent::connect_to_url_seed(std::_List_iteratorlibtorrent::web_seed_entry)+0x8c8 [0x7f1807ef24a8]
/usr/lib/libtorrent-rasterbar.so.7 : libtorrent::torrent::second_tick(libtorrent::stat&, int)+0x555 [0x7f1807ef71c5]
/usr/lib/libtorrent-rasterbar.so.7 : libtorrent::aux::session_impl::on_tick(boost::system::error_code const&)+0xadb [0x7f1807eaf3fb]
/usr/lib/libtorrent-rasterbar.so.7 : ()+0x1e1371 [0x7f1807eb6371]
/usr/lib/libtorrent-rasterbar.so.7 : boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lockboost::asio::detail::posix_mutex&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&)+0x29b [0x7f1807d9397b]
/usr/lib/libtorrent-rasterbar.so.7 : boost::asio::detail::task_io_service::run(boost::system::error_code&)+0xe1 [0x7f1807d97a31]
/usr/lib/libtorrent-rasterbar.so.7 : libtorrent::aux::session_impl::main_thread()+0x3c [0x7f1807eae8bc]
/usr/lib/libtorrent-rasterbar.so.7 : boost_asio_detail_posix_thread_function()+0xf [0x7f1807d8c27f]
/lib/x86_64-linux-gnu/libpthread.so.0 : ()+0x8182 [0x7f18078bb182]
/lib/x86_64-linux-gnu/libc.so.6 : clone()+0x6d [0x7f180542847d]
Segmentation fault

Originally created by @harmancode on GitHub (Nov 14, 2015). qbittorrent crashes in a few seconds after launch. Please find below the output. OS: Linux Mint 17.2 $ qbittorrent "sni-qt/3928" WARN 14:54:32.235 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE --- Catching SIGSEGV, please report a bug at http://bug.qbittorrent.org and provide the following backtrace: qBittorrent version: v3.1.8 stack trace: /usr/lib/x86_64-linux-gnu/libstdc++.so.6 : std::string::assign(std::string const&)+0x9 [0x7f1805cca479] /usr/lib/libtorrent-rasterbar.so.7 : libtorrent::torrent::connect_web_seed(std::_List_iteratorlibtorrent::web_seed_entry, boost::asio::ip::basic_endpointboost::asio::ip::tcp)+0x604 [0x7f1807eee7d4] /usr/lib/libtorrent-rasterbar.so.7 : libtorrent::torrent::connect_to_url_seed(std::_List_iteratorlibtorrent::web_seed_entry)+0x8c8 [0x7f1807ef24a8] /usr/lib/libtorrent-rasterbar.so.7 : libtorrent::torrent::second_tick(libtorrent::stat&, int)+0x555 [0x7f1807ef71c5] /usr/lib/libtorrent-rasterbar.so.7 : libtorrent::aux::session_impl::on_tick(boost::system::error_code const&)+0xadb [0x7f1807eaf3fb] /usr/lib/libtorrent-rasterbar.so.7 : ()+0x1e1371 [0x7f1807eb6371] /usr/lib/libtorrent-rasterbar.so.7 : boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lockboost::asio::detail::posix_mutex&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&)+0x29b [0x7f1807d9397b] /usr/lib/libtorrent-rasterbar.so.7 : boost::asio::detail::task_io_service::run(boost::system::error_code&)+0xe1 [0x7f1807d97a31] /usr/lib/libtorrent-rasterbar.so.7 : libtorrent::aux::session_impl::main_thread()+0x3c [0x7f1807eae8bc] /usr/lib/libtorrent-rasterbar.so.7 : boost_asio_detail_posix_thread_function()+0xf [0x7f1807d8c27f] /lib/x86_64-linux-gnu/libpthread.so.0 : ()+0x8182 [0x7f18078bb182] /lib/x86_64-linux-gnu/libc.so.6 : clone()+0x6d [0x7f180542847d] Segmentation fault
deekerman 2026-02-21 16:42:50 -05:00
  • closed this issue
  • added the
    Crash
    label
Author
Owner

@zenden2k commented on GitHub (Nov 15, 2015):

I had the same error with web_seed_entry:

    qbittorrent.exe!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 154  C++
    qbittorrent.exe!operator new(unsigned int size) Line 63 C++
    qbittorrent.exe!std::_Allocate<char>(unsigned int _Count, char * __formal) Line 28  C++
    qbittorrent.exe!std::allocator<char>::allocate(unsigned int _Count) Line 578    C++
    qbittorrent.exe!std::_Wrap_alloc<std::allocator<char> >::allocate(unsigned int _Count) Line 848 C++
    qbittorrent.exe!std::vector<unsigned char,std::allocator<unsigned char> >::_Buy(unsigned int _Capacity) Line 1557   C++
    qbittorrent.exe!std::vector<char,std::allocator<char> >::vector<char,std::allocator<char> >(const std::vector<char,std::allocator<char> > & _Right) Line 722    C++
    qbittorrent.exe!libtorrent::web_seed_entry::web_seed_entry(const libtorrent::web_seed_entry & __that)   C++
>   qbittorrent.exe!std::allocator<libtorrent::web_seed_entry>::construct(libtorrent::web_seed_entry * _Ptr, const libtorrent::web_seed_entry & _Val) Line 593  C++
    qbittorrent.exe!std::allocator_traits<std::allocator<libtorrent::web_seed_entry> >::construct<libtorrent::web_seed_entry,libtorrent::web_seed_entry const &>(std::allocator<libtorrent::web_seed_entry> & _Al, libtorrent::web_seed_entry * _Ptr, const libtorrent::web_seed_entry & <_Args_0>) Line 724    C++
    qbittorrent.exe!std::_Wrap_alloc<std::allocator<libtorrent::web_seed_entry> >::construct<libtorrent::web_seed_entry,libtorrent::web_seed_entry const &>(libtorrent::web_seed_entry * _Ptr, const libtorrent::web_seed_entry & <_Args_0>) Line 872   C++
    qbittorrent.exe!std::vector<libtorrent::web_seed_entry,std::allocator<libtorrent::web_seed_entry> >::push_back(const libtorrent::web_seed_entry & _Val) Line 1261   C++
    qbittorrent.exe!libtorrent::torrent_info::parse_torrent_file(const libtorrent::lazy_entry & torrent_file, boost::system::error_code & ec, int flags) Line 1325  C++
    qbittorrent.exe!libtorrent::torrent_info::torrent_info(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & filename, boost::system::error_code & ec, int flags) Line 836   C++
    qbittorrent.exe!BitTorrent::TorrentInfo::loadFromFile(const QString & path, QString & error) Line 66    C++
    qbittorrent.exe!BitTorrent::TorrentInfo::loadFromFile(const QString & path) Line 78 C++
    qbittorrent.exe!BitTorrent::Session::startUpTorrents() Line 1956    C++
    qbittorrent.exe!BitTorrent::Session::Session(QObject * parent) Line 219 C++
    qbittorrent.exe!BitTorrent::Session::initInstance() Line 297    C++
    qbittorrent.exe!Application::exec(const QStringList & params) Line 247  C++
    qbittorrent.exe!main(int argc, char * * argv) Line 235  C++
    qbittorrent.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 113 C++
    [External Code] 
    [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]  

The problem was that I compiled static libtorrent-rasterbar WITHOUT geoip support (TORRENT_DISABLE_GEO_IP is set by default by cmake generator)
but qbittorrent was compiled WITH geoip support.
So web_seed_entry had different sizes (208 bytes vs 200 bytes), and it' fields had different offsets.
That's why default copy constructor of web_seed_entry crashed program.
Compiling both qb and libtorrent with the same geoip options fixed this issue.

@zenden2k commented on GitHub (Nov 15, 2015): I had the same error with `web_seed_entry`: ``` qbittorrent.exe!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 154 C++ qbittorrent.exe!operator new(unsigned int size) Line 63 C++ qbittorrent.exe!std::_Allocate<char>(unsigned int _Count, char * __formal) Line 28 C++ qbittorrent.exe!std::allocator<char>::allocate(unsigned int _Count) Line 578 C++ qbittorrent.exe!std::_Wrap_alloc<std::allocator<char> >::allocate(unsigned int _Count) Line 848 C++ qbittorrent.exe!std::vector<unsigned char,std::allocator<unsigned char> >::_Buy(unsigned int _Capacity) Line 1557 C++ qbittorrent.exe!std::vector<char,std::allocator<char> >::vector<char,std::allocator<char> >(const std::vector<char,std::allocator<char> > & _Right) Line 722 C++ qbittorrent.exe!libtorrent::web_seed_entry::web_seed_entry(const libtorrent::web_seed_entry & __that) C++ > qbittorrent.exe!std::allocator<libtorrent::web_seed_entry>::construct(libtorrent::web_seed_entry * _Ptr, const libtorrent::web_seed_entry & _Val) Line 593 C++ qbittorrent.exe!std::allocator_traits<std::allocator<libtorrent::web_seed_entry> >::construct<libtorrent::web_seed_entry,libtorrent::web_seed_entry const &>(std::allocator<libtorrent::web_seed_entry> & _Al, libtorrent::web_seed_entry * _Ptr, const libtorrent::web_seed_entry & <_Args_0>) Line 724 C++ qbittorrent.exe!std::_Wrap_alloc<std::allocator<libtorrent::web_seed_entry> >::construct<libtorrent::web_seed_entry,libtorrent::web_seed_entry const &>(libtorrent::web_seed_entry * _Ptr, const libtorrent::web_seed_entry & <_Args_0>) Line 872 C++ qbittorrent.exe!std::vector<libtorrent::web_seed_entry,std::allocator<libtorrent::web_seed_entry> >::push_back(const libtorrent::web_seed_entry & _Val) Line 1261 C++ qbittorrent.exe!libtorrent::torrent_info::parse_torrent_file(const libtorrent::lazy_entry & torrent_file, boost::system::error_code & ec, int flags) Line 1325 C++ qbittorrent.exe!libtorrent::torrent_info::torrent_info(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & filename, boost::system::error_code & ec, int flags) Line 836 C++ qbittorrent.exe!BitTorrent::TorrentInfo::loadFromFile(const QString & path, QString & error) Line 66 C++ qbittorrent.exe!BitTorrent::TorrentInfo::loadFromFile(const QString & path) Line 78 C++ qbittorrent.exe!BitTorrent::Session::startUpTorrents() Line 1956 C++ qbittorrent.exe!BitTorrent::Session::Session(QObject * parent) Line 219 C++ qbittorrent.exe!BitTorrent::Session::initInstance() Line 297 C++ qbittorrent.exe!Application::exec(const QStringList & params) Line 247 C++ qbittorrent.exe!main(int argc, char * * argv) Line 235 C++ qbittorrent.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 113 C++ [External Code] [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] ``` The problem was that I compiled static libtorrent-rasterbar **WITHOUT geoip support** (TORRENT_DISABLE_GEO_IP is set by default by cmake generator) but qbittorrent was compiled **WITH geoip support.** So `web_seed_entry` had different sizes (208 bytes vs 200 bytes), and it' fields had different offsets. That's why default copy constructor of `web_seed_entry` crashed program. Compiling both qb and libtorrent with the same geoip options fixed this issue.
Author
Owner

@sledgehammer999 commented on GitHub (Nov 15, 2015):

Also you are using and old version. You can download latest version from our PPAs.

@sledgehammer999 commented on GitHub (Nov 15, 2015): Also you are using and old version. You can download latest version from our PPAs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#3332
No description provided.