Closed ghost closed 6 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?
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
@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.
@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?
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
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?
could it destroy AddNewTorrentDialog?
If you trace back the program flow, then probably no.
@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
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!
What happens if you use the official 3.1.10 instead? Does it still crash?
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
Only one instance of qbt will work anyway.
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!
Then I am closing this since you can't reproduce the crash and I have no idea why it happened.
@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.
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.
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.
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