qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.06k stars 3.89k forks source link

Crash in add torrent dialog #6555

Closed thalieht closed 6 years ago

thalieht commented 7 years ago

qBittorrent version and Operating System:

Current master 3.4.0 alpha, Arch KDE

If on linux, libtorrent and Qt version:

Qt 5.7.1, libtorrent 1.1.1

What is the problem:

qbit crashes if add new torrent dialog is resized horizontally with the cursor on the edge of the screen the moment metadata is loaded (window position resets).

In KDE it's allowed to resize this window while it's out of focus (unlike win 7)

Steps to reproduce:

  1. Load a magnet link
  2. Before metadata is fetched click outside the add torrent window.
  3. Resize window horizontally to the edge of screen and hold the resize.
  4. When metadata is fetched qbit crashes (if window position is reset)

Extra info(if any):

I have also seen it crash during some other stuff in add torrent dialog such as when opening the "save at" history or "category" the moment the window is reset. I've even seen it crash the moment metadata is fetched without me doing anything at all but it seems random.

The inferior stopped because it received a signal from the operating system.

Signal name : 
SIGABRT
Signal meaning : 
Aborted
1  raise                                                                                           0x7ffff472804f 
2  abort                                                                                           0x7ffff472947a 
3  __gnu_cxx::__verbose_terminate_handler                                     vterminate.cc   95   0x7ffff503f4bd 
4  __cxxabiv1::__terminate                                                    eh_terminate.cc 47   0x7ffff503d276 
5  std::terminate                                                             eh_terminate.cc 57   0x7ffff503d2c1 
6  __cxxabiv1::__cxa_pure_virtual                                             pure.cc         50   0x7ffff503de2f 
7  BitTorrent::Session::handleAlert                                           session.cpp     3267 0x536859       
8  BitTorrent::Session::readAlerts                                            session.cpp     3257 0x536b2b       
9  BitTorrent::Session::qt_static_metacall                                    moc_session.cpp 301  0x6a9505       
10 QObject::event(QEvent *)                                                                        0x7ffff5806f29 
11 QApplicationPrivate::notify_helper(QObject *, QEvent *)                                         0x7ffff6ce235c 
12 QApplication::notify(QObject *, QEvent *)                                                       0x7ffff6ce9ad1 
13 Application::notify                                                        application.cpp 497  0x4d09c2       
14 QCoreApplication::notifyInternal2(QObject *, QEvent *)                                          0x7ffff57da8e0 
15 QCoreApplicationPrivate::sendPostedEvents(QObject *, int, QThreadData *)                        0x7ffff57dd06d 
16 ??                                                                                              0x7ffff582eeb3 
17 g_main_context_dispatch                                                                         0x7ffff1ef7587 
18 ??                                                                                              0x7ffff1ef77f0 
19 g_main_context_iteration                                                                        0x7ffff1ef789c 
20 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)                      0x7ffff582f2bf 
21 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)                                         0x7ffff57d8d3a 
22 QCoreApplication::exec()                                                                        0x7ffff57e123c 
23 Application::exec                                                          application.cpp 442  0x4d37e1       
24 main                                                                       main.cpp        285  0x4c415d       
gilbertoca commented 7 years ago

It occurs in v3.3.11:

ilbertoca@linux-s6k1:~> cat /etc/os-release 
NAME="openSUSE Leap"
VERSION="42.2"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="42.2"
PRETTY_NAME="openSUSE Leap 42.2"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:42.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
gilbertoca@linux-s6k1:~> qbittorrent
kf5.kio.core: KLocalSocket(0x3243230) Jumbo packet of 45160 bytes
QXcbConnection: XCB error: 3 (BadWindow), sequence: 59587, resource id: 52712926, major code: 40 (TranslateCoords), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 4599, resource id: 52740667, major code: 40 (TranslateCoords), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 5653, resource id: 52741375, major code: 40 (TranslateCoords), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 14081, resource id: 52745360, major code: 40 (TranslateCoords), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 15510, resource id: 52753688, major code: 40 (TranslateCoords), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 17080, resource id: 52754427, major code: 40 (TranslateCoords), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 32954, resource id: 52765125, major code: 40 (TranslateCoords), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 35178, resource id: 52766136, major code: 40 (TranslateCoords), minor code: 0
pure virtual method called
terminate called without an active exception

*************************************************************
Catching signal: SIGABRT
Please file a bug report at http://bug.qbittorrent.org and provide the following information:

qBittorrent version: v3.3.11
stack trace:
  /lib64/libc.so.6 : gsignal()+0x37  [0x7fb2c72228d7]
  /lib64/libc.so.6 : abort()+0x13a  [0x7fb2c7223caa]
  /usr/lib64/libstdc++.so.6 : __gnu_cxx::__verbose_terminate_handler()+0x15d  [0x7fb2c7b3d72d]
  /usr/lib64/libstdc++.so.6 : ()+0x96706  [0x7fb2c7b3b706]                                   
  /usr/lib64/libstdc++.so.6 : ()+0x96751  [0x7fb2c7b3b751]                                   
  /usr/lib64/libstdc++.so.6 : ()+0x9721f  [0x7fb2c7b3c21f]                                   
  qbittorrent : BitTorrent::Session::handleAlert(libtorrent::alert*)+0x19  [0x535779]        
  qbittorrent : BitTorrent::Session::readAlerts()+0x4b  [0x535a5b]                           
  qbittorrent() [0x6924f5]
  /usr/lib64/libQt5Core.so.5 : QObject::event(QEvent*)+0x296  [0x7fb2c82e8166]
  /usr/lib64/libQt5Widgets.so.5 : QApplicationPrivate::notify_helper(QObject*, QEvent*)+0x9c  [0x7fb2c97d8e3c]
  /usr/lib64/libQt5Widgets.so.5 : QApplication::notify(QObject*, QEvent*)+0x3fa  [0x7fb2c97dd49a]
  qbittorrent : Application::notify(QObject*, QEvent*)+0x12  [0x4dcbf2]
  /usr/lib64/libQt5Core.so.5 : QCoreApplication::notifyInternal2(QObject*, QEvent*)+0x75  [0x7fb2c82bcfc5]
  /usr/lib64/libQt5Core.so.5 : QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+0x1ca  [0x7fb2c82bedaa]
  /usr/lib64/libQt5Core.so.5 : ()+0x2c2c83  [0x7fb2c830dc83]
  /usr/lib64/libglib-2.0.so.0 : g_main_context_dispatch()+0x254  [0x7fb2c6613134]
  /usr/lib64/libglib-2.0.so.0 : ()+0x4c388  [0x7fb2c6613388]
  /usr/lib64/libglib-2.0.so.0 : g_main_context_iteration()+0x2c  [0x7fb2c661342c]
  /usr/lib64/libQt5Core.so.5 : QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x5c  [0x7fb2c830d30c]
  /usr/lib64/libQt5Core.so.5 : QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xfb  [0x7fb2c82bafdb]
  /usr/lib64/libQt5Core.so.5 : QCoreApplication::exec()+0x86  [0x7fb2c82c2ec6]
  qbittorrent : Application::exec(QStringList const&)+0x202  [0x4df4a2]
  qbittorrent : main()+0x458  [0x4d03e8]
  /lib64/libc.so.6 : __libc_start_main()+0xf5  [0x7fb2c720e6e5]
  qbittorrent : _start()+0x29  [0x4db089]
Consider installing debug symbols for packages containing files with empty function names (i.e. empty braces "()") to make your stack trace more useful
Abortado (imagem do núcleo gravada)
gilbertoca@linux-s6k1:~> 
thalieht commented 7 years ago

Maybe it's the same as #4128, #4173, #4180, #4709, #6106, #6125

thalieht commented 7 years ago

In latest 3.4.0alpha, and after many tries, i can no longer replicate because the addnewtorrent window's position doesn't seem to reset on metadata retrieval anymore and because it's no longer possible to resize that window without it being in focus (clicking on the edge of the window now puts it in focus).

I have no idea if it was some update in KDE or qbit or a combination that fixed it.

aphirst commented 7 years ago

I get a similar crash if, before the metadata finishes downloading, I try to change the download folder. It seems to primarily when the dropdown / select window is active at the moment the metadata finishes, but it has done it to me before even after confirming a new folder. Should I make a new post or is it sufficient here?

ngosang commented 6 years ago

We are closing all issues related to old qBittorrent versions (qBittorrent < 4.1.0). Please, update to last release and, if the bug/error/crash is still present, open another issue. Thank you.