New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pcmanfm-qt sigsegv #685

Closed
agaida opened this Issue May 30, 2018 · 16 comments

Comments

3 participants
@agaida
Member

agaida commented May 30, 2018

Expected Behavior

should not crash

Current Behavior

crashes

Possible Solution

fix it

Steps to Reproduce (for bugs)

from Exagone313 in freenode lxqt

<Exagone313> Hi, I have pcmanfm-qt 0.13 and I have reproducible way to make it sigsegv, but I want someone to try out that is NOT using Arch Linux so I know if it's not just about a rebuild needed, I'll create the issue if you can reproduce it.  Open pcmanfm-qt, open a new tab (CTRL+T), open a directory in that second tab, click on the first tab, open a directory in that first tab, click on the second tab => sigsegv.  Here is a gdb backtrace: https://ptpb.pw/6o8u  Thanks

AG: one will notice a repaint bug in the second window - content will not be painted - switching a few times back and forth and it will crash 

crash and backtrace

Thread 1 "pcmanfm-qt" received signal SIGSEGV, Segmentation fault.
Fm::FolderView::folder (this=0x55555592b6c0)
    at /home/agaida/lxqt/libfm-qt-git/src/libfm-qt/src/folderview.h:86
86              return model_ ? static_cast<FolderModel*>(model_->sourceModel())->folder() : nullptr;
(gdb) bt
#0  0x00007ffff74f60bd in Fm::FolderView::folder() const (this=0x55555592b6c0)
    at /home/agaida/lxqt/libfm-qt-git/src/libfm-qt/src/folderview.h:86
#1  0x00007ffff74f60bd in Fm::FolderView::path() (this=0x55555592b6c0)
    at /home/agaida/lxqt/libfm-qt-git/src/libfm-qt/src/folderview.h:95
#2  0x00007ffff74f60bd in Fm::FolderView::onFileClicked(int, std::shared_ptr<Fm::FileInfo const> const&) (this=0x55555592b6c0, fileInfo=std::shared_ptr<const Fm::FileInfo> (empty) = {...}, type=2)
    at /home/agaida/lxqt/libfm-qt-git/src/libfm-qt/src/folderview.cpp:1311
#3  0x00007ffff74f731d in Fm::FolderView::onFileClicked(int, std::shared_ptr<Fm::FileInfo const> const&) (this=0x55555592b6c0, type=<optimized out>, fileInfo=...)
    at /home/agaida/lxqt/libfm-qt-git/src/libfm-qt/src/folderview.cpp:1299
#4  0x0000555555595855 in PCManFM::View::onFileClicked(int, std::shared_ptr<Fm::FileInfo const> const&) (this=0x55555592b6c0, type=<optimized out>, fileInfo=..., this=<optimized out>, fileInfo=..., type=<optimized out>) at /home/agaida/lxqt/pcmanfm-qt-git/src/pcmanfm-qt/pcmanfm/view.cpp:50
#5  0x00007ffff5e03b60 in QMetaObject::activate(QObject*, int, int, void**) ()
    at /usr/lib/libQt5Core.so.5
#6  0x00007ffff754a1a3 in Fm::FolderView::clicked(int, std::shared_ptr<Fm::FileInfo const> const&) (this=this@entry=0x55555592b6c0, _t1=<optimized out>, 
    _t1@entry=2, _t2=std::shared_ptr<const Fm::FileInfo> (empty) = {...})
    at /home/agaida/lxqt/libfm-qt-git/src/build/src/fm-qt_autogen/EWIEGA46WW/moc_folderview.cpp:262
#7  0x00007ffff74f546d in Fm::FolderView::emitClickedAt(Fm::FolderView::ClickType, QPoint const&) (this=this@entry=0x55555592b6c0, type=type@entry=Fm::FolderView::ContextMenuClick, pos=...)
    at /usr/include/c++/8.1.0/bits/shared_ptr_base.h:600
#8  0x00007ffff74f8a37 in Fm::FolderView::contextMenuEvent(QContextMenuEvent*) (this=0x55555592b6c0, event=0x7fffffffd1c0) at /home/agaida/lxqt/libfm-qt-git/src/libfm-qt/src/folderview.cpp:817
#9  0x00007ffff6b89058 in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#10 0x00007ffff6b49984 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
    at /usr/lib/libQt5Widgets.so.5
---Type <return> to continue, or q <return> to quit---
#11 0x00007ffff6b51770 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#12 0x00007ffff5dd9bc9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
    at /usr/lib/libQt5Core.so.5
#13 0x00007ffff6ba4b94 in  () at /usr/lib/libQt5Widgets.so.5
#14 0x00007ffff6ba6fd5 in  () at /usr/lib/libQt5Widgets.so.5
#15 0x00007ffff6b49984 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
    at /usr/lib/libQt5Widgets.so.5
#16 0x00007ffff6b5125b in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#17 0x00007ffff5dd9bc9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
    at /usr/lib/libQt5Core.so.5
#18 0x00007ffff6381596 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/libQt5Gui.so.5
#19 0x00007ffff6383516 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib/libQt5Gui.so.5
#20 0x00007ffff635aa5c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Gui.so.5
#21 0x00007fffecbdbb3d in  () at /usr/lib/libQt5XcbQpa.so.5
#22 0x00007ffff5dd885c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/libQt5Core.so.5
#23 0x00007ffff5de0b56 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#24 0x0000555555575b81 in PCManFM::Application::exec() (this=0x7fffffffdcf0)
    at /home/agaida/lxqt/pcmanfm-qt-git/src/pcmanfm-qt/pcmanfm/application.cpp:332
#25 0x0000555555575b81 in main(int, char**) (argc=<optimized out>, argv=<optimized out>)
    at /home/agaida/lxqt/pcmanfm-qt-git/src/pcmanfm-qt/pcmanfm/pcmanfm.cpp:14
(gdb) 
System Information

Arch current, latest git-1 commit

@Exagone313

This comment has been minimized.

Exagone313 commented May 30, 2018

Video for reproducing the tab crash (qt5ct NOT concerned, tried also without): https://www.youtube.com/watch?v=dnZsJbFObS0
I don't remember how to reproduce the missing repaint issue.

@agaida

This comment has been minimized.

Member

agaida commented May 30, 2018

Reproducing the repaint bug:

 00:09:14 <+agaida> te painting bug - just switch a few times between both tabs and open new directories - after a few switches the content of the switched-to folder will not be painted anymore
 00:09:41 <+agaida> a few switches later the process crashes
@tsujan

This comment has been minimized.

Member

tsujan commented May 30, 2018

Wow! Strange that I'd never done such a thing! Although I can't reproduce the crash that's reported here, I can see that the second folder isn't painted and pacmanfm-qt crashes after I right-click inside it:

#0  0x00007f187be32c63 in  () at /usr/lib/libfm-qt.so.5
#1  0x00007f187be331ad in Fm::FolderView::onFileClicked(int, std::shared_ptr<Fm::FileInfo const> const&) ()
    at /usr/lib/libfm-qt.so.5
#2  0x0000558ace810216 in  ()
#3  0x00007f187a76fb60 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#4  0x00007f187be59074 in Fm::FolderView::clicked(int, std::shared_ptr<Fm::FileInfo const> const&) ()
    at /usr/lib/libfm-qt.so.5
#5  0x00007f187be8275f in Fm::FolderView::emitClickedAt(Fm::FolderView::ClickType, QPoint const&) ()
    at /usr/lib/libfm-qt.so.5
#6  0x00007f187be827ec in Fm::FolderView::contextMenuEvent(QContextMenuEvent*) () at /usr/lib/libfm-qt.so.5
#7  0x00007f187b4f5058 in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#8  0x00007f187b4b5984 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#9  0x00007f187b4bd770 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#10 0x00007f187a745bc9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#11 0x00007f187b510b94 in  () at /usr/lib/libQt5Widgets.so.5
#12 0x00007f187b512fd5 in  () at /usr/lib/libQt5Widgets.so.5
#13 0x00007f187b4b5984 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#14 0x00007f187b4bd25b in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#15 0x00007f187a745bc9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#16 0x00007f187aced596 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
    at /usr/lib/libQt5Gui.so.5
#17 0x00007f187acef516 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib/libQt5Gui.so.5
#18 0x00007f187acc6a5c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/libQt5Gui.so.5
#19 0x00007f1871879b3d in  () at /usr/lib/libQt5XcbQpa.so.5
#20 0x00007f187a74485c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#21 0x00007f187a74cb56 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#22 0x0000558ace7e6a53 in  ()
#23 0x00007f187c37506b in __libc_start_main () at /usr/lib/libc.so.6
#24 0x0000558ace7e80fa in _start ()

This is very bad. I'll look into it tomorrow.

@tsujan tsujan added the bug label May 30, 2018

@tsujan

This comment has been minimized.

Member

tsujan commented May 30, 2018

@agaida I use Arch's Qt-5.11 too. Can you reproduce this bug under Debian?

@agaida

This comment has been minimized.

Member

agaida commented May 30, 2018

it took me several attempts to reproduce this in arch - so just keep clicking - somewhen™ it will not repaint and after a while it will sigsegv - just have to switch to debian and test it there

@tsujan

This comment has been minimized.

Member

tsujan commented May 30, 2018

OK, this is related to Qt 5.11. I can't reproduce it with Qt 5.10 (on another machine). Damn! In just an hour after I upgraded to Qt 5.11, this is the third problem I encounter (the other 2 aren't related to LXQt and are tolerable).

@tsujan

This comment has been minimized.

Member

tsujan commented May 30, 2018

Whatever anyone might say, Qt in't backward compatible anymore. grrrrr....

@agaida

This comment has been minimized.

Member

agaida commented May 30, 2018

/me knows a distribution with latest LXQt and Qt 5.10 .. - and a default dark design

@tsujan

This comment has been minimized.

Member

tsujan commented May 30, 2018

To find the cause, I simplify the procedure:

(1) Open 2 windows that show your home.
(2) Go into a subfolder inside one.
(3) Go to another subfolder inside the other.

Then, a miracle will happen and the contents of the first window will be wiped out.

@agaida

This comment has been minimized.

Member

agaida commented May 30, 2018

we talk about Qt 5.11? I'm not able to reproduce with Qt 5.10

@tsujan

This comment has been minimized.

Member

tsujan commented May 30, 2018

we talk about Qt 5.11?

Yes. I found the cause but not the cure yet.

@agaida

This comment has been minimized.

Member

agaida commented May 30, 2018

God damn - will it ever be usable before the first or second point release again? :(

tsujan added a commit to lxqt/libfm-qt that referenced this issue May 31, 2018

Disconnect old source model completely
Fixes lxqt/pcmanfm-qt#685

This may be a workaround for a bug in Qt 5.11.
@tsujan

This comment has been minimized.

Member

tsujan commented May 31, 2018

@Exagone313 If possible, test lxqt/libfm-qt#197 with Qt 5.11. It works here.

@agaida Please test the same patch with Qt 5.10.

@Exagone313

This comment has been minimized.

Exagone313 commented May 31, 2018

It fixes the issue, yes.

@tsujan

This comment has been minimized.

Member

tsujan commented May 31, 2018

@Exagone313 Thanks for testing. It was a regression in Qt.

agaida added a commit to lxqt/libfm-qt that referenced this issue Jun 1, 2018

@agaida agaida closed this Jun 2, 2018

agaida added a commit to agaida/libfm-qt that referenced this issue Jun 2, 2018

@agaida

This comment has been minimized.

Member

agaida commented Jun 2, 2018

god damn - closing a bug with a commit to my branch is kind of strange

agaida added a commit to lxqt/libfm-qt that referenced this issue Jun 2, 2018

@agaida agaida added this to test in Issues Aug 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment