qbittorrent / qBittorrent

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

Crash Info for Ver 3.1.10 qBittorrent #1986

Closed ghost closed 6 years ago

ghost commented 9 years ago

qBittorrent has crashed Please report a bug at http://bugs.qbittorrent.org and provide the following backtrace.

qBittorrent version: v3.1.10 Libtorrent version: 0.16.18.0 Qt version: 4.8.6 Boost version: 1.56.0

#  0 qbittorrent.exe      0x00c7d587  straceWin::getBacktrace()
#  1 qbittorrent.exe      0x00c7e8f7  sigsegvHandler(__formal)
#  2 qbittorrent.exe      0x012eb31e  _XcptFilter(xcptnum, pxcptinfoptrs)
#  3 qbittorrent.exe      0x012dbabe  __tmainCRTStartup()
#  4 qbittorrent.exe      0x012ed5f0  _EH4_CallFilterFunc()
#  5 qbittorrent.exe      0x012dcc5e  _except_handler4(ExceptionRecord, EstablisherFrame, ContextRecord, DispatcherContext)
#  6 ntdll.dll            0x778771f9  RtlRaiseStatus()
#  7 ntdll.dll            0x778771cb  RtlRaiseStatus()
#  8 ntdll.dll            0x77877057  KiUserExceptionDispatcher()
#  9 qbittorrent.exe      0x00caf232  AddNewTorrentDialog::setdialogPosition()
#10 qbittorrent.exe      0x00cb04fe  AddNewTorrentDialog::setupTreeview()
#11 qbittorrent.exe      0x00cafc94  AddNewTorrentDialog::updateMetadata(h)
#12 qbittorrent.exe      0x00cbe8cd  AddNewTorrentDialog::qt_static_metacall(_o, _c, _id, _a)
#13 qbittorrent.exe      0x0109fceb  QMetaObject::activate()
#14 qbittorrent.exe      0x00cb5f4f  QBtSession::metadataReceivedHidden(_t1)
#15 qbittorrent.exe      0x00bf8699  QBtSession::readAlerts()
#16 qbittorrent.exe      0x00cb576c  QBtSession::qt_static_metacall(_o, _c, _id, _a)
#17 qbittorrent.exe      0x0109fceb  QMetaObject::activate()
#18 qbittorrent.exe      0x010c6572  QTimer::timerEvent()
#19 qbittorrent.exe      0x0109db80  QObject::event()
#20 qbittorrent.exe      0x00d486e8  QApplicationPrivate::notify_helper()
#21 qbittorrent.exe      0x00d47090  QApplication::notify()
#22 qbittorrent.exe      0x00ca5fd5  SessionApplication::notify(receiver, event)
#23 qbittorrent.exe      0x010af40a  QCoreApplication::notifyInternal()
#24 qbittorrent.exe      0x00d4b0e5  QCoreApplication::sendEvent()
#25 qbittorrent.exe      0x01103608  QEventDispatcherWin32Private::sendTimerEvent()
#26 qbittorrent.exe      0x0110325a  qt_internal_proc()
#27 USER32.dll           0x76acc4e7  gapfnScSendMessage()
#28 USER32.dll           0x76acc5e7  gapfnScSendMessage()
#29 USER32.dll           0x76accc19  gapfnScSendMessage()
#30 USER32.dll           0x76accc70  DispatchMessageW()
#31 qbittorrent.exe      0x01103d7e  QEventDispatcherWin32::processEvents()
#32 qbittorrent.exe      0x00e62a4c  QGuiEventDispatcherWin32::processEvents()
#33 qbittorrent.exe      0x010fdd1f  QEventLoop::processEvents()
#34 qbittorrent.exe      0x010fde05  QEventLoop::exec()
#35 qbittorrent.exe      0x010af637  QCoreApplication::exec()
#36 qbittorrent.exe      0x00c7f9ba  main(argc, argv)
#37 qbittorrent.exe      0x01137678  WinMain()
#38 qbittorrent.exe      0x012dba95  __tmainCRTStartup()
#39 kernel32.dll         0x7603ee1c  BaseThreadInitThunk()
#40 ntdll.dll            0x778937eb  RtlInitializeExceptionChain()
#41 ntdll.dll            0x778937be  RtlInitializeExceptionChain()

List of linked Modules:
qbittorrent    0x00be0000    Image: C:\Program Files\qBittorrent\qbittorrent.exe
                                    .\qbittorrent.pdb
ntdll          0x77830000    Image: C:\Windows\SYSTEM32\ntdll.dll
kernel32       0x75ff0000    Image: C:\Windows\system32\kernel32.dll
KERNELBASE     0x75990000    Image: C:\Windows\system32\KERNELBASE.dll
dbghelp        0x74ad0000    Image: C:\Windows\system32\dbghelp.dll
msvcrt         0x779b0000    Image: C:\Windows\system32\msvcrt.dll
ADVAPI32       0x75d80000    Image: C:\Windows\system32\ADVAPI32.dll
sechost        0x76770000    Image: C:\Windows\SYSTEM32\sechost.dll
RPCRT4         0x766c0000    Image: C:\Windows\system32\RPCRT4.dll
SHELL32        0x76be0000    Image: C:\Windows\system32\SHELL32.dll
SHLWAPI        0x76b80000    Image: C:\Windows\system32\SHLWAPI.dll
GDI32          0x76270000    Image: C:\Windows\system32\GDI32.dll
USER32         0x76ab0000    Image: C:\Windows\system32\USER32.dll
LPK            0x77970000    Image: C:\Windows\system32\LPK.dll
USP10          0x765a0000    Image: C:\Windows\system32\USP10.dll
POWRPROF       0x74760000    Image: C:\Windows\system32\POWRPROF.dll
SETUPAPI       0x760d0000    Image: C:\Windows\system32\SETUPAPI.dll
CFGMGR32       0x759e0000    Image: C:\Windows\system32\CFGMGR32.dll
OLEAUT32       0x75f60000    Image: C:\Windows\system32\OLEAUT32.dll
ole32          0x75bd0000    Image: C:\Windows\system32\ole32.dll
DEVOBJ         0x75a40000    Image: C:\Windows\system32\DEVOBJ.dll
COMDLG32       0x76640000    Image: C:\Windows\system32\COMDLG32.dll
COMCTL32       0x74330000    Image: C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\COMCTL32.dll
IMM32          0x77990000    Image: C:\Windows\system32\IMM32.dll
MSCTF          0x76790000    Image: C:\Windows\system32\MSCTF.dll
WINMM          0x72b40000    Image: C:\Windows\system32\WINMM.dll
WS2_32         0x764c0000    Image: C:\Windows\system32\WS2_32.dll
NSI            0x76500000    Image: C:\Windows\system32\NSI.dll
MSWSOCK        0x75280000    Image: C:\Windows\system32\MSWSOCK.dll
CRYPT32        0x75a80000    Image: C:\Windows\system32\CRYPT32.dll
MSASN1         0x758c0000    Image: C:\Windows\system32\MSASN1.dll
SspiCli        0x75730000    Image: C:\Windows\system32\SspiCli.dll
uxtheme        0x742d0000    Image: C:\Windows\system32\uxtheme.dll
dwmapi         0x73ff0000    Image: C:\Windows\system32\dwmapi.dll
CRYPTBASE      0x757a0000    Image: C:\Windows\system32\CRYPTBASE.dll
userenv        0x75a10000    Image: C:\Windows\system32\userenv.dll
profapi        0x758b0000    Image: C:\Windows\system32\profapi.dll
CRYPTSP        0x752c0000    Image: C:\Windows\system32\CRYPTSP.dll
rsaenh         0x75060000    Image: C:\Windows\system32\rsaenh.dll
wship6         0x75270000    Image: C:\Windows\System32\wship6.dll
wshtcpip       0x74da0000    Image: C:\Windows\System32\wshtcpip.dll
DNSAPI         0x75140000    Image: C:\Windows\system32\DNSAPI.dll
WLIDNSP        0x73280000    Image: C:\Program Files\Common Files\Microsoft Shared\Windows Live\WLIDNSP.DLL
PSAPI          0x75f50000    Image: C:\Windows\system32\PSAPI.DLL
nimdnsNSP      0x63560000    Image: C:\Program Files\National Instruments\Shared\mDNS Responder\nimdnsNSP.dll
nimdnsResponder 0x63550000    Image: C:\Windows\system32\nimdnsResponder.dll
MSVCR90        0x73120000    Image: C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.dll
Iphlpapi       0x73860000    Image: C:\Windows\system32\Iphlpapi.DLL
WINNSI         0x73850000    Image: C:\Windows\system32\WINNSI.DLL
rasadhlp       0x72bd0000    Image: C:\Windows\system32\rasadhlp.dll
fwpuclnt       0x737c0000    Image: C:\Windows\System32\fwpuclnt.dll
RpcRtRemote    0x75840000    Image: C:\Windows\system32\RpcRtRemote.dll
comctl32       0x71390000    Image: C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5\comctl32.dll
sledgehammer999 commented 9 years ago

The crash seems to happen inside AddNewTorrentDialog::setdialogPosition() but I can't find something obviously wrong in it. @Anyn Will you be willing to try some test builds this weekend?

ghost commented 9 years ago

O.K.

Mail me what I must do.

Best Regards!

Drasko

From: sledgehammer999 [mailto:notifications@github.com] Sent: Tuesday, September 30, 2014 9:33 PM To: qbittorrent/qBittorrent Cc: Drasko Subject: Re: [qBittorrent] Crash Info for Ver 3.1.10 qBittorrent (#1986)

The crash seems to happen inside AddNewTorrentDialog::setdialogPosition() but I can't find something obviously wrong in it. @Anyn https://github.com/Anyn Will you be willing to try some test builds this weekend?

— Reply to this email directly or view it on GitHub https://github.com/qbittorrent/qBittorrent/issues/1986#issuecomment-57369269 . https://github.com/notifications/beacon/5621943__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNzcyNDc3NiwiZGF0YSI6eyJpZCI6NDQzMjE3ODN9fQ==--6435978384c73ac69b9846c2a44c8110872869de.gif

sthalik commented 9 years ago

@sledgehammer999 then why isn't exception type logged as per dump?

Are you using minidump functionality to begin with? the win32 stack dumps both small and more informative than backtrace with no symbols.

sorokin commented 9 years ago

@sledgehammer999 Why AddNewTorrentDialog::setdialogPosition() does qApp->processEvents()? Could it be that after message loop pump qbittorrent is closed or even AddNewTorrentDialog dialog is closed and code returns to AddNewTorrentDialog::setdialogPosition() with invalid "this" pointer?

sledgehammer999 commented 9 years ago

Why AddNewTorrentDialog::setdialogPosition() does qApp->processEvents()?

I didn't right that code but: Before setdialogPosition() is called there some calls to GUI stuff (eg update the treeview). So processEvents() is used to present those changes to the user. This could be removed, depending on what we do before.

Could it be that after message loop pump qbittorrent is closed

This could be an explanation why it crashes, but I can't imagine how the app could exit and the execution of this method could continue.

or even AddNewTorrentDialog dialog is closed and code returns to AddNewTorrentDialog::setdialogPosition() with invalid "this" pointer?

Another good explanation. Basically I was going to sprinkle those 2 functions with prints and let the user run the executable and see where it crashed exactly. (in the weekend as I mentioned)

@sledgehammer999 then why isn't exception type logged as per dump?

I didn't write the backtrace functionality. The code was taken from another FOSS project(quassel) and was repurposed for qbt by @Gelmir Relevant pull request: https://github.com/qbittorrent/qBittorrent/pull/337

sorokin commented 9 years ago

but I can't imagine how the app could exit and the execution of this method could continue.

Not the application, but the AddNewTorrentDialog dialog. As I understand processEvents could call almost any function, could it destroy AddNewTorrentDialog?

sledgehammer999 commented 9 years ago

could it destroy AddNewTorrentDialog?

If you trace back the program flow, then probably no.

sledgehammer999 commented 9 years ago

@Anyn can you test the following diagnostic build? Launch the qbittorrent.exe from the contained folder. Be sure to have extracted it first and dont run it from inside your decompression tool. Follow your usual steps to produce the crash. After the crash a new file named diagnostic.txt will be present in the same folder as qbittorrent.exe. Paste the contents here or on pastebin.com Also please don't answer via email. Github borks your responses. Come straight to the github issue instead. Link to the mentioned build: http://builds.shiki.hu/temp/qBittorrent%20v3.1.10%20patched%20for%20diagnostics.7z

ghost commented 9 years ago

Well I can not get anymore crash state but instead of this I get lot of delaying and laging of Interface during downloading. Here is the copy of contents of diagnostic.txt:

Processing events Getting center point Creating qinisettings instance Reading y from settings Checking value of y Value of y non-negative. setting y of the center point Doing move(center);

Best Regards!

sledgehammer999 commented 9 years ago

What happens if you use the official 3.1.10 instead? Does it still crash?

ghost commented 9 years ago

Good question but I can not test it right now because I am not on this PC. I will mail you in the morning (I am in Zagreb, Croatia). Best reg. Drasko

P.S. When I test this must I activate both of it? Before crashing I also experience the bad delaying and lag of Interface (see other issue about it)

Sent with AquaMail for Android http://www.aqua-mail.com

On October 5, 2014 10:53:48 PM sledgehammer999 notifications@github.com wrote:

What happens if you use the official 3.1.10 instead? Does it still crash?


Reply to this email directly or view it on GitHub: https://github.com/qbittorrent/qBittorrent/issues/1986#issuecomment-57951898

sledgehammer999 commented 9 years ago

Only one instance of qbt will work anyway.

ghost commented 9 years ago

There is no (also) crashing on the official version. Only hanging and delaying of UI and other functionality in Windows! Best Reg. I use one RSS from the Piratebay and 2-3 dowloadings. This laging and delaying affect also and this writing so I must rewriting sometimes this text!

sledgehammer999 commented 9 years ago

Then I am closing this since you can't reproduce the crash and I have no idea why it happened.

sorokin commented 9 years ago

@sledgehammer999 I've changed a two lines qApp->processEvents(); to

  std::cerr << "before" << std::endl;
  for (int i = 0; i != 10000; ++i)
  {
    if ((i % 1000) == 0)
      std::cerr << i << std::endl;
    sleep(1);
    qApp->processEvents();
  }
  std::cerr << "after" << std::endl;

So I could make any action inside during qApp->processEvents(). For example I could open another add torrent dialog. After a bit of testing I've got a crash:

ivan@liberty:~/d/qbittorrent$ src/qbittorrent 
before
        0
        1000
        before
                0
                1000
                2000
                3000
                before
                        0
                        1000
                        2000
                        3000
                        4000
                        5000
                        before
                                0
                                1000
                                2000
                                3000
                                4000
                                before
                                        0
                                        1000
                                        2000
                                        3000
                                        4000
                                        5000
                                        6000
                                        7000
                                        8000
                                        9000
                                after
                                before
                                        0
                                        1000
                                        2000
                                        3000
                                        4000
                                        5000
                                        6000
                                        7000
                                        8000
                                        9000
                                after
                                5000
                                6000
                                7000
                                8000
                                9000
                        after
                        before
                                0
                                1000
                                2000
                                3000
                                4000
                                5000
                                6000
                                7000
                                8000
                                9000
                        after
                        6000
                        7000
                        8000
                        9000
                after
                before
                        0
                        1000
                        2000
                        3000
                        4000
                        5000
                        6000
                        7000
                        8000
                        9000
                after
                4000
                5000
                6000
                7000
                8000
                9000
        after
ASAN:SIGSEGV
=================================================================
==3376== ERROR: AddressSanitizer: SEGV on unknown address 0x000061800794 (pc 0x7f00376e86f4 sp 0x7fffae3bf9f8 bp 0x7fffae3bfa10 T0)
AddressSanitizer can not provide additional info.
    #0 0x7f00376e86f3 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x2066f3)
    #1 0x83550f (/home/ivan/d/qbittorrent/src/qbittorrent+0x83550f)
    #2 0x835c15 (/home/ivan/d/qbittorrent/src/qbittorrent+0x835c15)
    #3 0x7f0036e46879 (/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+0x191879)
    #4 0x7f0037cfa0d1 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x8180d1)
    #5 0x7f0037a5d9d2 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x57b9d2)
    #6 0x7f0037a5eb42 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x57cb42)
    #7 0x7f0037a5ec2b (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x57cc2b)
    #8 0x7f0037b15a49 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x633a49)
    #9 0x7f00376fb509 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x219509)
    #10 0x7f00376abe2b (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x1c9e2b)
    #11 0x7f00376b25dc (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x1d05dc)
    #12 0x81de61 (/home/ivan/d/qbittorrent/src/qbittorrent+0x81de61)
    #13 0x7f0036e324dc (/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+0x17d4dc)
    #14 0x7f00376b1d92 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x1cfd92)
    #15 0x7f00377269ca (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x2449ca)
    #16 0x7f0037726268 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x244268)
    #17 0x7f003774db01 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x26bb01)
    #18 0x7f0035572e03 (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0+0x48e03)
    #19 0x7f0035573047 (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0+0x49047)
    #20 0x7f00355730eb (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0+0x490eb)
    #21 0x7f0036e5f7a0 (/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+0x1aa7a0)
    #22 0x7f003774dbb5 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x26bbb5)
    #23 0x7f0036e3601e (/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+0x18101e)
    #24 0x835391 (/home/ivan/d/qbittorrent/src/qbittorrent+0x835391)
    #25 0x835c15 (/home/ivan/d/qbittorrent/src/qbittorrent+0x835c15)
    #26 0x7f0036e46879 (/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+0x191879)
    #27 0x7f0037cfa0d1 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x8180d1)
    #28 0x7f0037a5d9d2 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x57b9d2)
    #29 0x7f0037a5eb42 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x57cb42)
    #30 0x7f0037a5ec2b (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x57cc2b)
    #31 0x7f0037b15a49 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x633a49)
    #32 0x7f00376fb509 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x219509)
    #33 0x7f00376abe2b (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x1c9e2b)
    #34 0x7f00376b25dc (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x1d05dc)
    #35 0x81de61 (/home/ivan/d/qbittorrent/src/qbittorrent+0x81de61)
    #36 0x7f0036e324dc (/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+0x17d4dc)
    #37 0x7f00376b1d92 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x1cfd92)
    #38 0x7f00377269ca (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x2449ca)
    #39 0x7f0037726268 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x244268)
    #40 0x7f003774db01 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x26bb01)
    #41 0x7f0035572e03 (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0+0x48e03)
    #42 0x7f0035573047 (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0+0x49047)
    #43 0x7f00355730eb (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0+0x490eb)
    #44 0x7f0036e5f7a0 (/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+0x1aa7a0)
    #45 0x7f003774dbb5 (/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+0x26bbb5)
    #46 0x7f0036e310ae (/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+0x17c0ae)
    #47 0x7f0036e313a4 (/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+0x17c3a4)
    #48 0x7f0036e36b78 (/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+0x181b78)
    #49 0x509866 (/home/ivan/d/qbittorrent/src/qbittorrent+0x509866)
    #50 0x7f00360f0ec4 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21ec4)
    #51 0x512445 (/home/ivan/d/qbittorrent/src/qbittorrent+0x512445)
==3376== ABORTING

ivan@liberty:~/d/qbittorrent$ addr2line 0x83550f -i -e src/qbittorrent
/usr/include/qt4/QtGui/qwidget.h:958
/home/ivan/d/qbittorrent/src/addnewtorrentdialog.cpp:379
ivan@liberty:~/d/qbittorrent$ addr2line 0x835c15 -i -e src/qbittorrent
/home/ivan/d/qbittorrent/src/addnewtorrentdialog.cpp:173

As I understand somehow when control returned to AddNewTorrentDialog::relayout() the QWidget was already deleted. Perhaps something similar happened in AddNewTorrentDialog::setdialogPosition() in reported crash.

sledgehammer999 commented 9 years ago

I am reopening this since you are able to reproduce and test.

As I understand somehow when control returned to AddNewTorrentDialog::relayout() the QWidget was already deleted. Perhaps something similar happened in AddNewTorrentDialog::setdialogPosition() in reported crash.

Since you know your way through code I assume you have already looked at the program flow and nothing at first glance indicates a premature destruction of the object, right? I don't know what is your level of knowledge with qt but here are some info that might help you find the problem. In qt there are 4 ways of destructing an object AFAIK. The fist 2 come from the C++ language itself, a) when a variable goes out of scope, b) when deleting a pointer. Qt has the following 2 methods, a) calling deleteLater() on a QObject, b) setting the Qt::WA_DeleteOnClose attribute on a QWidget.

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.