Bug 351830

Summary: Dolphin 15.08 segfaults in libQt5Core on hover after entering specific directories
Product: [Applications] dolphin Reporter: Steve Pryde <spryde81>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: frank78ac
Priority: NOR    
Version First Reported In: 16.12.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Steve Pryde 2015-08-27 00:11:26 UTC
When opening certain directories, dolphin 15.08 segfaults and disappears.
I'm running Arch Linux on a Dell Latitude E6510. All packages updated to latest. No testing repos etc.

It only segfaults on some directories and not others. It seems to happen most in directories containing about 1600 perl modules. Navigating to the same directory in dolphin 14.12.3 works fine.

Incidentally I did try updating the MIME type for perl modules. Dolphin has long incorrectly recognised .pm files and treated them as .m files. Regardless, I changed the default app to open these, and it seems dolphin 15.08 started crashing after that. I don't know if this change was related.

I do have a backtrace, after running 'gdb dolphin' and reproducing the crash.

(gdb) thread apply all bt

Thread 3 (Thread 0x7fffe06dd700 (LWP 2645)):
#0  0x00007ffff783a18d in poll () from /usr/lib/libc.so.6
#1  0x00007fffea6679f2 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007fffea66956f in xcb_wait_for_event () from /usr/lib/libxcb.so.1
#3  0x00007fffe1df8ca9 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#4  0x00007ffff1a27a9e in ?? () from /usr/lib/libQt5Core.so.5
#5  0x00007fffece3d4a4 in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007ffff784312d in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fffd22fe700 (LWP 2646)):
#0  0x00007ffff783a18d in poll () from /usr/lib/libc.so.6
#1  0x00007fffec70ac7c in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fffec70ad8c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007ffff1c5f23f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#4  0x00007ffff1c0626a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#5  0x00007ffff1a22af4 in QThread::exec() () from /usr/lib/libQt5Core.so.5
#6  0x00007ffff1a27a9e in ?? () from /usr/lib/libQt5Core.so.5
#7  0x00007fffece3d4a4 in start_thread () from /usr/lib/libpthread.so.0
#8  0x00007ffff784312d in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7ffff7ec5800 (LWP 2641)):
#0  0x00007ffff1ab93a8 in operator==(QString const&, QString const&) () from /usr/lib/libQt5Core.so.5
#1  0x00007ffff1c96d04 in ?? () from /usr/lib/libQt5Core.so.5
#2  0x00007ffff1c8a53a in QMimeType::comment() const () from /usr/lib/libQt5Core.so.5
#3  0x00007ffff5801e60 in KFileItem::mimeComment() const () from /usr/lib/libKF5KIOCore.so.5
#4  0x00007ffff580247f in KFileItem::getStatusBarInfo() const () from /usr/lib/libKF5KIOCore.so.5
#5  0x00007ffff7b4c745 in ?? () from /usr/lib/libkdeinit5_dolphin.so
#6  0x00007ffff1c36e77 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#7  0x00007ffff751a1b5 in DolphinView::requestItemInfo(KFileItem const&) () from /usr/lib/libdolphinprivate.so.5
#8  0x00007ffff74ecd7e in DolphinView::slotItemHovered(int) () from /usr/lib/libdolphinprivate.so.5
#9  0x00007ffff1c36e77 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#10 0x00007ffff7518811 in KItemListController::itemHovered(int) () from /usr/lib/libdolphinprivate.so.5
#11 0x00007ffff74a5148 in KItemListController::hoverMoveEvent(QGraphicsSceneHoverEvent*, QTransform const&) () from /usr/lib/libdolphinprivate.so.5
#12 0x00007ffff74a493c in KItemListController::processEvent(QEvent*, QTransform const&) () from /usr/lib/libdolphinprivate.so.5
#13 0x00007ffff74b85d2 in KItemListView::event(QEvent*) () from /usr/lib/libdolphinprivate.so.5
#14 0x00007ffff2dd300c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#15 0x00007ffff2dd84e6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#16 0x00007ffff1c0889b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#17 0x00007ffff30f720d in ?? () from /usr/lib/libQt5Widgets.so.5
#18 0x00007ffff30fcd00 in ?? () from /usr/lib/libQt5Widgets.so.5
#19 0x00007ffff30fd18e in ?? () from /usr/lib/libQt5Widgets.so.5
#20 0x00007ffff30fd603 in QGraphicsScene::mouseMoveEvent(QGraphicsSceneMouseEvent*) () from /usr/lib/libQt5Widgets.so.5
#21 0x00007ffff3109dc4 in QGraphicsScene::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#22 0x00007ffff2dd300c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#23 0x00007ffff2dd84e6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#24 0x00007ffff1c0889b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#25 0x00007ffff3122623 in QGraphicsViewPrivate::mouseMoveEventHandler(QMouseEvent*) () from /usr/lib/libQt5Widgets.so.5
#26 0x00007ffff2e15f08 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#27 0x00007ffff2f14f6e in QFrame::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#28 0x00007ffff31253f3 in QGraphicsView::viewportEvent(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#29 0x00007ffff1c0868c in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#30 0x00007ffff2dd2fec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#31 0x00007ffff2dd8be9 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#32 0x00007ffff1c0889b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#33 0x00007ffff2dd7af2 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQt5Widgets.so.5
#34 0x00007ffff2e3074b in ?? () from /usr/lib/libQt5Widgets.so.5
#35 0x00007ffff2e32cfb in ?? () from /usr/lib/libQt5Widgets.so.5
#36 0x00007ffff2dd300c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#37 0x00007ffff2dd84e6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#38 0x00007ffff1c0889b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#39 0x00007ffff25f8c81 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/libQt5Gui.so.5
#40 0x00007ffff25fa955 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/libQt5Gui.so.5
#41 0x00007ffff25dfe08 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
#42 0x00007fffe1e299f0 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#43 0x00007fffec70a9fd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#44 0x00007fffec70ace0 in ?? () from /usr/lib/libglib-2.0.so.0
#45 0x00007fffec70ad8c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#46 0x00007ffff1c5f23f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#47 0x00007ffff1c0626a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#48 0x00007ffff1c0e20c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#49 0x00007ffff7b5dda4 in kdemain () from /usr/lib/libkdeinit5_dolphin.so
#50 0x00007ffff777a610 in __libc_start_main () from /usr/lib/libc.so.6
#51 0x0000000000400779 in _start ()

Workaround: Use dolphin 14.12.3 instead.

Reproducible: Always

Steps to Reproduce:
1. Open dolphin 15.08
2. Navigate to directory containing large number of perl modules (*.pm)

Perhaps you also need to right-click a .pm file and change the default program, then try again? I did notice that changing the default program had no effect the first time I tried. It opened them in kate regardless. Perhaps this is related, perhaps not.

Actual Results:  
segfault

Expected Results:  
It should just show the directory listing.
It should also open files using the correct app.

Segmentation fault in libQt5Core.so.5
Comment 1 Frank Reininghaus 2015-08-29 18:56:12 UTC
Thanks for the bug report. Could you install debugging packages for KIO and Qt in order to get a more detailed backtrace? See https://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports for more information.

Moreover, if it is possible to generate a Valgrind log of the crash, this might help to identify the cause of the problem. See https://community.kde.org/Dolphin/FAQ/Crashes for details.

Thanks for your help.
Comment 2 Steve Pryde 2015-08-31 10:36:20 UTC
(In reply to Frank Reininghaus from comment #1)
> Thanks for the bug report. Could you install debugging packages for KIO and
> Qt in order to get a more detailed backtrace? See
> https://techbase.kde.org/Development/Tutorials/Debugging/
> How_to_create_useful_crash_reports for more information.
> 
> Moreover, if it is possible to generate a Valgrind log of the crash, this
> might help to identify the cause of the problem. See
> https://community.kde.org/Dolphin/FAQ/Crashes for details.
> 
> Thanks for your help.

And thanks for your response. I'll follow that in future :)

Annoyingly I am unable to reproduce this. I created a new user profile on my machine (to rule out stale config etc) and found that the problem didn't exist there. Meanwhile the problem has also disappeared on my usual login too. I now suspect that the bug is related to the MIME type settings on my machine, which I have modified since raising this bug.

For some reason dolphin does not recognise .pm files as perl modules, and instead insists on identifying them as .m files (matlab?). In the past I have changed the default application for .m files instead but dolphin 15.08 doesn't use the old setting and right now it won't let me update the new one. That's a separate issue.

As for this bug, since I can no longer reproduce it, I guess it can be resolved as WORKSFORME and reopened if anyone else happens to come across it. Is that fair?
Comment 3 Frank Reininghaus 2015-09-05 07:56:03 UTC
(In reply to Steve Pryde from comment #2)
> For some reason dolphin does not recognise .pm files as perl modules, and
> instead insists on identifying them as .m files (matlab?). In the past I
> have changed the default application for .m files instead but dolphin 15.08
> doesn't use the old setting and right now it won't let me update the new
> one. That's a separate issue.

This might be an issue in shared-mime-info or in Qt's mime type support then. In KDE SC 4.x, mime type handling was handled by kdelibs, but now the mime type handling is done by Qt. Some things might have changed in this area.

> As for this bug, since I can no longer reproduce it, I guess it can be
> resolved as WORKSFORME and reopened if anyone else happens to come across
> it. Is that fair?

Yes, let's do that. In any case, the backtrace looks like it might be a bug in Qt itself, but if this becomes reproducible again and there are any more details about this crash, please let us know.

Thanks!