Bug 354558 - Dolphin crashed when accessing to "Configure Dolphin"
Summary: Dolphin crashed when accessing to "Configure Dolphin"
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: drkonqi
: 355531 356288 357712 357976 358357 358481 358737 360452 360670 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-29 12:58 UTC by Gauthier POGAM--LE MONTAGNER
Modified: 2018-03-04 13:07 UTC (History)
19 users (show)

See Also:
Latest Commit:
Version Fixed In: 15.12.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gauthier POGAM--LE MONTAGNER 2015-10-29 12:58:19 UTC
Application: dolphin (15.08.2)
 (Compiled from sources)
Qt Version: 5.5.1
Operating System: Linux 4.2.3exherbo x86_64
Distribution (Platform): Exherbo Packages

-- Information about the crash:
- What I was doing when the application crashed:

I was in the Pictures folder, with preview enabled (but not working) and I tried to open Dolphin configuration.

- Custom settings of the application:

The Preview was enabled but it doesn't work (the package required to enable it should not be installed - nothing is listed in General -> Preview).

The crash does not seem to be reproducible.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/usr/x86_64-pc-linux-gnu/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f983722e840 (LWP 10273))]

Thread 2 (Thread 0x7f9819144700 (LWP 10275)):
#0  0x00007f982e5c1223 in select () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6
#1  0x00007f982f161bc1 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#2  0x00007f982f1635e5 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#3  0x00007f982f163b2d in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#4  0x00007f982f10e5f2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#5  0x00007f982ef2a05c in QThread::exec() () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#6  0x00007f982ef2ef5f in QThreadPrivate::start(void*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#7  0x00007f982b18b414 in start_thread () from /usr/x86_64-pc-linux-gnu/lib/libpthread.so.0
#8  0x00007f982e5c85ed in clone () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6

Thread 1 (Thread 0x7f983722e840 (LWP 10273)):
[KCrash Handler]
#5  0x00007f982efb7343 in QtSharedPointer::ExternalRefCountData::getAndRef(QObject const*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#6  0x00007f983055bfb7 in QWidgetWindow::handleMouseEvent(QMouseEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#7  0x00007f983055e50b in QWidgetWindow::event(QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#8  0x00007f9830500d1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#9  0x00007f9830505e48 in QApplication::notify(QObject*, QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#10 0x00007f982f110a33 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#11 0x00007f982fd1305d in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Gui.so.5
#12 0x00007f982fd14a25 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Gui.so.5
#13 0x00007f982fcf9bff in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Gui.so.5
#14 0x00007f9822bb6fb6 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/x86_64-pc-linux-gnu/lib/libQt5XcbQpa.so.5
#15 0x00007f982f10e5f2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#16 0x00007f983065a440 in QMenu::exec(QPoint const&, QAction*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#17 0x00007f983069d57c in QToolButtonPrivate::popupTimerDone() () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#18 0x00007f982f13e811 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#19 0x00007f98305dd077 in QAbstractButtonPrivate::emitPressed() () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#20 0x00007f98305dd236 in QAbstractButton::mousePressEvent(QMouseEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#21 0x00007f983069e29c in QToolButton::mousePressEvent(QMouseEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#22 0x00007f9830541fe9 in QWidget::event(QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#23 0x00007f983069e519 in QToolButton::event(QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#24 0x00007f9830500d1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#25 0x00007f9830506637 in QApplication::notify(QObject*, QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#26 0x00007f982f110a33 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#27 0x00007f98305052a2 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#28 0x00007f983055c26d in QWidgetWindow::handleMouseEvent(QMouseEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#29 0x00007f983055e50b in QWidgetWindow::event(QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#30 0x00007f9830500d1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#31 0x00007f9830505e48 in QApplication::notify(QObject*, QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Widgets.so.5
#32 0x00007f982f110a33 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#33 0x00007f982fd1305d in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Gui.so.5
#34 0x00007f982fd14a25 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Gui.so.5
#35 0x00007f982fcf9bff in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Gui.so.5
#36 0x00007f9822bb6fb6 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/x86_64-pc-linux-gnu/lib/libQt5XcbQpa.so.5
#37 0x00007f982f10e5f2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#38 0x00007f982f1161cd in QCoreApplication::exec() () from /usr/x86_64-pc-linux-gnu/lib/libQt5Core.so.5
#39 0x00007f9836e91680 in kdemain () from /usr/x86_64-pc-linux-gnu/lib/libkdeinit5_dolphin.so
#40 0x00007f982e4ff690 in __libc_start_main () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6
#41 0x0000000000400b19 in _start ()

Reported using DrKonqi
Comment 1 walmartshopper 2015-11-05 20:05:01 UTC
I was able to reproduce this, but not consistently.  Sometimes it crashes several times in a row when trying to open the settings.  Sometimes it works several times in a row before crashing.

I am using Dolphin 15.08.2, frameworks 5.15.0, and qt 5.5.1 on Arch Linux.
Comment 2 Wolfgang Bauer 2015-11-06 18:44:20 UTC
(In reply to walmartshopper from comment #1)
> I was able to reproduce this, but not consistently.  Sometimes it crashes
> several times in a row when trying to open the settings.  Sometimes it works
> several times in a row before crashing.
> 
> I am using Dolphin 15.08.2, frameworks 5.15.0, and qt 5.5.1 on Arch Linux.

I can confirm this too, on openSUSE 13.2 with Dolphin 15.08.2, KF 5.15.0, and Qt 5.5.1.

And we have a downstream bug report here too:
https://bugzilla.opensuse.org/show_bug.cgi?id=952460
Comment 3 Wolfgang Bauer 2015-11-06 18:57:43 UTC
PS: It's not related to split-view at all.

The exact reproduction sequence:
- click on "Control"
- hover the mouse over any submenu in the same group as "Configure Dolphin..." (i.e. "Go to", "Extras", or "Help") until it appears (don't select anything)
- as long as the submenu is still displayed, move to "Configure Dolphin..." and select it

Dolphin will reliably crash.

If you select "Configure Dolphin..." while no other submenu is open, it doesn't crash.
Comment 4 Christoph Feck 2015-11-18 11:48:12 UTC
*** Bug 355531 has been marked as a duplicate of this bug. ***
Comment 5 Frank Reininghaus 2015-11-22 18:38:34 UTC
(In reply to Wolfgang Bauer from comment #3)

Thanks for the detailed instructions, but apparently, I am unable to open a sub-menu by hovering it and then click "Configure Dolphin..." quickly enough. Every time I try it, the sub-menu closes before I can select "Configure Dolphin...".

The backtrace looks like it might be a Qt issue. There aren't any frames from Dolphin or KDE Frameworks.
Comment 6 Wolfgang Bauer 2015-11-22 20:51:06 UTC
(In reply to Frank Reininghaus from comment #5)
> Thanks for the detailed instructions, but apparently, I am unable to open a
> sub-menu by hovering it and then click "Configure Dolphin..." quickly
> enough. Every time I try it, the sub-menu closes before I can select
> "Configure Dolphin...".

Hm, it is quite easily reproducible here, with every widget style I tried (even Fusion).
Might depend on your system though, I suppose...

Trying with the "Help" submenu might be the easiest way to reproduce it, because it is located just below the "Configure Dolphin..." entry.

But just to be clear:
this only happens if dolphins menu bar is disabled, i.e. by using the menu button ("Control") in the toolbar.
It doesn't seem to happen with "normal" menus though, i.e. I cannot reproduce it with dolphin either if I enable "Show Menubar". But then, there's no submenu either that could still be open...

> The backtrace looks like it might be a Qt issue. There aren't any frames
> from Dolphin or KDE Frameworks.

Right, I noticed that as well.

But still, dolphin might do something wrong when setting up that menu, or when opening the settings dialog.

I wasn't able to reproduce such a crash in a different application upto now. But then, most of them do not provide such a menu button in the tool bar in the first place...
Comment 7 Wolfgang Bauer 2015-11-23 16:21:26 UTC
PS: I just tried with a Kubuntu 15.10 LiveCD (Dolphin 15.08.2, Frameworks 5.15.0, Qt 5.4.2) and cannot reproduce the crash there (it is not even possible to click on "Configure Dolphin" while another submenu is open).

So it might be a problem with Qt 5.5 only...
Comment 8 Christoph Feck 2015-12-05 14:57:36 UTC
*** Bug 356288 has been marked as a duplicate of this bug. ***
Comment 9 FiNeX 2015-12-20 17:43:18 UTC
Just updated archlinux with latest KDE packages (uninstalled old KDE and installed new Plasma).

I've created a new clean user account and the first time I've tried to open Dolphin settings it crashed with the same backtrace.

P.S: I've experienced similar crashes on almost every KDE application when I've started the settings for the first time.
Comment 10 Viorel-Cătălin Răpițeanu 2016-01-03 17:01:39 UTC
I'm seeing the same behaviour with Dolphin version 5.12 and Frameworks 5.17.0.

The steps to reproduce this were:
1. Open the "Control" menu.
2. Hover the mouse on "Help" until the submenu is displayed.
3. Quickly while the "Help" submenu is still displayed select the "Configure Dolphin" submenu (that is located just above).
Comment 11 Fabian Vogt 2016-01-04 12:29:10 UTC
Dolphin does indeed do some weird stuff with its Control button:
in DolphinMainWindow::updateControlMenu:
 
    // All actions get cleared by QMenu::clear(). The sub-menus are deleted
    // by connecting to the aboutToHide() signal from the parent-menu.
    connect(menu, &QMenu::aboutToHide, helpMenu, &QMenu::deleteLater);

Is this even necessary?
Comment 12 Wolfgang Bauer 2016-01-05 14:12:37 UTC
(In reply to Fabian Vogt from comment #11)
> Dolphin does indeed do some weird stuff with its Control button:
> in DolphinMainWindow::updateControlMenu:
>  
>     // All actions get cleared by QMenu::clear(). The sub-menus are deleted
>     // by connecting to the aboutToHide() signal from the parent-menu.
>     connect(menu, &QMenu::aboutToHide, helpMenu, &QMenu::deleteLater);

This seems to be the problem indeed. Removing those connects does fix the crashes for me...
Comment 13 Frank Reininghaus 2016-01-06 18:18:22 UTC
Good investigation, Fabian and Wolfgang! It seems that these connects were added in

https://quickgit.kde.org/?p=dolphin.git&a=commit&h=2baa9ec45a3e7e169e73ee74c74c0954702ab882

The commit message doesn't tell much about why they were added though. The control menu still works fine for me after opening and closing it multiple times (note that updateControlMenu is called every time the menu is opened), so they can probably be removed.
Comment 14 Frank Reininghaus 2016-01-10 10:30:37 UTC
I did some more tests and verified that the proposed change does not cause any memory leaks. I created a review request to make sure that others can give feedback, and this bug can hopefully be fixed soon (however, it's too late for 15.12.1 already, I think):

https://git.reviewboard.kde.org/r/126693/

Thanks again to Fabian and Wolfgang!
Comment 15 alessandro.tassi 2016-01-11 09:02:32 UTC
I have just signed in kde bugtrace site to inform about this exact problem but it looks like you are finding the solution.
My system is Arch Linux - Linux 4.3.3-2-ARCH x86_64, Qt Version: 5.5.1 with KDE Plasma 5.5.3-2 and I have the same identical problem.
So thanks a lot.
Comment 16 Frank Reininghaus 2016-01-14 19:38:33 UTC
Git commit ddc050f23596493e8debd2dfd523fd572c098d63 by Frank Reininghaus.
Committed on 14/01/2016 at 19:36.
Pushed by freininghaus into branch 'Applications/15.12'.

Do not delete sub menus of the control menu explicitly

This is not necessary because the sub menus are children of the main
menu, such that they are deleted together with the other actions by
QMenu::clear().

This prevents a crash that can happen if a sub menu is open while
another menu action is clicked.

Thanks to Fabian Vogt and Wolfgang Bauer for investigating this issue!
FIXED-IN: 15.12.2
REVIEW: 126693

M  +2    -5    src/dolphinmainwindow.cpp

http://commits.kde.org/dolphin/ddc050f23596493e8debd2dfd523fd572c098d63
Comment 17 Wolfgang Bauer 2016-01-14 20:17:39 UTC
*** Bug 357976 has been marked as a duplicate of this bug. ***
Comment 18 Frank Reininghaus 2016-01-24 10:31:24 UTC
*** Bug 358357 has been marked as a duplicate of this bug. ***
Comment 19 Frank Reininghaus 2016-01-26 06:20:26 UTC
*** Bug 357712 has been marked as a duplicate of this bug. ***
Comment 20 Frank Reininghaus 2016-01-26 06:20:39 UTC
*** Bug 358481 has been marked as a duplicate of this bug. ***
Comment 21 Frank Reininghaus 2016-01-29 22:15:01 UTC
*** Bug 358737 has been marked as a duplicate of this bug. ***
Comment 22 Dmitry Olyenyov 2016-03-02 15:36:49 UTC
I had the same issue. I had old 4.8 kde installed from Gentoo. Recently I've switched to Fedora while keeping my home directory. Dolphin was crashing every time I try to open "Configure Dolphin". After turning on and off "Preview" button problem had disappeared.
Comment 23 Frank Reininghaus 2016-03-20 23:16:05 UTC
*** Bug 360452 has been marked as a duplicate of this bug. ***
Comment 24 Frank Reininghaus 2016-03-20 23:16:45 UTC
*** Bug 360670 has been marked as a duplicate of this bug. ***