Bug 310579 - Crashes when pressing the Menu key + tooltip [QCoreApplication::notifyInternal]
Summary: Crashes when pressing the Menu key + tooltip [QCoreApplication::notifyInternal]
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 2.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-23 22:27 UTC by G360
Modified: 2012-11-24 16:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.9.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description G360 2012-11-23 22:27:34 UTC
Application: dolphin (2.1)
KDE Platform Version: 4.9.3
Qt Version: 4.8.3
Operating System: Linux 3.6.6-1-ARCH i686
Distribution (Platform): Archlinux Packages

-- Information about the crash:
After I selected a file with the keyboard, and pressed the 'Menu key', Dolphin crashes.
With the tooltip disabled, I can not reproduce the crash.

To reproduce the crash:
1. Put the mouse cursor above a file icon (the tooltip appears).
2. Press the 'Menu key'.
3. Move the mouse cursor above the tooltip.

Pressing the 'Menu key' is here the key! If you click the right mouse button to get the menu, the tooltip disappears.

The crash can be reproduced every time.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0xb1834740 (LWP 2329))]

Thread 2 (Thread 0xaef79b40 (LWP 2331)):
#0  0xb4c82e3d in clock_gettime () from /usr/lib/librt.so.1
#1  0xb631dc45 in ?? () from /usr/lib/libQtCore.so.4
#2  0xb6404ffe in ?? () from /usr/lib/libQtCore.so.4
#3  0x7fffffff in ?? ()
#4  0xb640538a in ?? () from /usr/lib/libQtCore.so.4
#5  0x7fffffff in ?? ()

Thread 1 (Thread 0xb1834740 (LWP 2329)):
[KCrash Handler]
#6  0xb63d28d7 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#7  0xb584d780 in QApplicationPrivate::dispatchEnterLeave(QWidget*, QWidget*) () from /usr/lib/libQtGui.so.4
#8  0xb58d5405 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#9  0xb58fe664 in ?? () from /usr/lib/libQtGui.so.4
#10 0xb4bca793 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#11 0xb4bcab30 in ?? () from /usr/lib/libglib-2.0.so.0
#12 0xb4bcac11 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#13 0xb6404611 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#14 0xb58fe24a in ?? () from /usr/lib/libQtGui.so.4
#15 0xb63d13cc in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#16 0xb63d16c1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#17 0xb5cf7847 in QMenu::exec(QPoint const&, QAction*) () from /usr/lib/libQtGui.so.4
#18 0xb7755003 in ?? () from /usr/lib/libkdeinit4_dolphin.so
#19 0xb77559b5 in ?? () from /usr/lib/libkdeinit4_dolphin.so
#20 0xb77495ff in ?? () from /usr/lib/libkdeinit4_dolphin.so
#21 0xb774d4d8 in ?? () from /usr/lib/libkdeinit4_dolphin.so
#22 0xb63eab66 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#23 0xb73bb4cd in DolphinView::requestContextMenu(QPoint const&, KFileItem const&, KUrl const&, QList<QAction*> const&) () from /usr/lib/libdolphinprivate.so.4
#24 0xb73bc1e4 in DolphinView::slotItemContextMenuRequested(int, QPointF const&) () from /usr/lib/libdolphinprivate.so.4
#25 0xb73c13a5 in ?? () from /usr/lib/libdolphinprivate.so.4
#26 0xb63eab66 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#27 0xb7381aad in KItemListController::itemContextMenuRequested(int, QPointF const&) () from /usr/lib/libdolphinprivate.so.4
#28 0xb73826fd in KItemListController::keyPressEvent(QKeyEvent*) () from /usr/lib/libdolphinprivate.so.4
#29 0xb7380a6c in KItemListController::processEvent(QEvent*, QTransform const&) () from /usr/lib/libdolphinprivate.so.4
#30 0xb7389a38 in KItemListView::event(QEvent*) () from /usr/lib/libdolphinprivate.so.4
#31 0xb584d02c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#32 0xb5851a2f in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#33 0xb69fd5b1 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#34 0xb63d28ee in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#35 0xb737f0b1 in KItemListContainer::keyPressEvent(QKeyEvent*) () from /usr/lib/libdolphinprivate.so.4
#36 0xb58a623b in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#37 0xb5cb1be5 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
#38 0xb5d4415c in QAbstractScrollArea::event(QEvent*) () from /usr/lib/libQtGui.so.4
#39 0xb584d02c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#40 0xb585233d in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#41 0xb69fd5b1 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#42 0xb63d28ee in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#43 0xb584b13d in ?? () from /usr/lib/libQtGui.so.4
#44 0xb58fa0b1 in ?? () from /usr/lib/libQtGui.so.4
#45 0xb58fa4e2 in ?? () from /usr/lib/libQtGui.so.4
#46 0xb58d4bed in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#47 0xb58fe664 in ?? () from /usr/lib/libQtGui.so.4
#48 0xb4bca793 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#49 0xb4bcab30 in ?? () from /usr/lib/libglib-2.0.so.0
#50 0xb4bcac11 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#51 0xb6404611 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#52 0xb58fe24a in ?? () from /usr/lib/libQtGui.so.4
#53 0xb63d13cc in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#54 0xb63d16c1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#55 0xb63d695a in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#56 0xb584aeb4 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#57 0xb77571d5 in kdemain () from /usr/lib/libkdeinit4_dolphin.so
#58 0x0804855b in ?? ()
#59 0xb7588605 in __libc_start_main () from /usr/lib/libc.so.6
#60 0x08048581 in _start ()

Possible duplicates by query: bug 310297, bug 308830, bug 308049, bug 306801, bug 306177.

Reported using DrKonqi
Comment 1 Frank Reininghaus 2012-11-24 03:59:36 UTC
Thanks for the bug report! Crashes with this backtrace have actually been reported quite a few times, it's really helpful to finally have a way to reproduce it and ask GDB what's going on :-)

The 'receiver' in QCoreApplication::notifyInternal() is the FileMetaDataToolTip, which has been deleted by the ToolTipManager.

I think what happens when you move the mouse pointer from the item to the tool tip is this:

1. The item is not hovered any more -> DolphinView::slotItemUnhovered(int) hides the tool tip via ToolTipManager::hideToolTip(), which deletes the tool tip immediately.

2. At the same time, the mouse pointer enters the tool tip and receives an event of type QEvent::Enter. This causes a crash in notifyInternal() because the pointer to the tool tip is now dangling.

Replacing the 'delete' in ToolTipManager by deleteLater() fixes it for me.

The only thing that I don't quite understand is why I can't reproduce it if the context menu is not open.
Comment 2 Frank Reininghaus 2012-11-24 04:11:22 UTC
Git commit a6f0745284617e3eccd0f69597105771e54aa31b by Frank Reininghaus.
Committed on 24/11/2012 at 05:08.
Pushed by freininghaus into branch 'KDE/4.9'.

Delete FileMetaDataToolTip using deleteLater() to prevent crashes

The problem was that Qt tried to deliver an 'Enter' event to the
dangling pointer that once pointed to the tool tip.

Many thanks to G. Christ for finding a way to reproduce this crash!
Related: bug 282257
FIXED-IN: 4.9.4

M  +3    -1    dolphin/src/views/tooltips/tooltipmanager.cpp

http://commits.kde.org/kde-baseapps/a6f0745284617e3eccd0f69597105771e54aa31b
Comment 3 Frank Reininghaus 2012-11-24 04:18:13 UTC
To see how incredibly useful this bug report was, have a look at bug 282257 (which collects all those reports with the same backtrace which were not reproducible) and see how often it has been reported!
Comment 4 G360 2012-11-24 16:05:43 UTC
Thank you Frank Reininghaus, for fixing this bug!