Bug 312679 - Dolphin crash when opened.
Summary: Dolphin crash when opened.
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 2.1.97
Platform: Fedora RPMs Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-05 13:21 UTC by rhgadsdon
Modified: 2013-01-11 15:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rhgadsdon 2013-01-05 13:21:16 UTC
Application: dolphin (2.1.97)
KDE Platform Version: 4.9.97
Qt Version: 4.8.4
Operating System: Linux 3.7.1 x86_64
Distribution: "Fedora release 18 (Spherical Cow)"

-- Information about the crash:
Dolphin crashes when opening a folder containing many files (photo images).    Crash still occurs with preview disabled..

The crash can be reproduced every time.

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

Thread 5 (Thread 0x7f0cce9e7700 (LWP 6088)):
#0  0x0000003dd30e998d in poll () from /lib64/libc.so.6
#1  0x0000003dd2c47d44 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
#2  0x0000003dd2c47e64 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x0000003dde9a60f6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#4  0x0000003dde9767df in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#5  0x0000003dde976a68 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#6  0x0000003dde878950 in QThread::exec() () from /lib64/libQtCore.so.4
#7  0x0000003dde95700f in QInotifyFileSystemWatcherEngine::run() () from /lib64/libQtCore.so.4
#8  0x0000003dde87b92c in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#9  0x00000035feeaf3f4 in ?? () from /lib64/libGL.so.1
#10 0x0000003dd3807d15 in start_thread () from /lib64/libpthread.so.0
#11 0x0000003dd30f246d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f0ccd74d700 (LWP 6092)):
#0  0x0000003dd380b952 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003dde87bde7 in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x0000003dde86f66f in QThreadPoolThread::run() () from /lib64/libQtCore.so.4
#3  0x0000003dde87b92c in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#4  0x00000035feeaf3f4 in ?? () from /lib64/libGL.so.1
#5  0x0000003dd3807d15 in start_thread () from /lib64/libpthread.so.0
#6  0x0000003dd30f246d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f0cccf4c700 (LWP 6093)):
[KCrash Handler]
#5  0x0000003dde889800 in QDateTime::QDateTime(QDateTime const&) () from /lib64/libQtCore.so.4
#6  0x00007f0cdb1f98dc in KTimeZone::Transition::time() const () from /lib64/libkdecore.so.5
#7  0x00007f0cdb1fb0c7 in KTimeZoneDataPrivate::transitionIndex(QDateTime const&) const () from /lib64/libkdecore.so.5
#8  0x00007f0cdb1fca76 in KTimeZoneData::transitionIndex(QDateTime const&, int*, bool*) const () from /lib64/libkdecore.so.5
#9  0x00007f0cdb1fd9eb in KTimeZoneBackend::offsetAtZoneTime(KTimeZone const*, QDateTime const&, int*) const () from /lib64/libkdecore.so.5
#10 0x00007f0cdb1e78b4 in KDateTimePrivate::timeZoneOffset() const () from /lib64/libkdecore.so.5
#11 0x00007f0cdb1e7bcc in KDateTimePrivate::toUtc(KTimeZone const&) const () from /lib64/libkdecore.so.5
#12 0x00007f0cdb1eb305 in KDateTime::operator<(KDateTime const&) const () from /lib64/libkdecore.so.5
#13 0x00007f0cddfc0be3 in KFileItemModel::sortRoleCompare(KFileItemModel::ItemData const*, KFileItemModel::ItemData const*) const () from /lib64/libdolphinprivate.so.4
#14 0x00007f0cddfc1820 in KFileItemModel::lessThan(KFileItemModel::ItemData const*, KFileItemModel::ItemData const*) const () from /lib64/libdolphinprivate.so.4
#15 0x00007f0cddff09b9 in KFileItemModelSortAlgorithm::upperBound(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, KFileItemModel::ItemData const*) () from /lib64/libdolphinprivate.so.4
#16 0x00007f0cddff0af9 in KFileItemModelSortAlgorithm::merge(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator) () from /lib64/libdolphinprivate.so.4
#17 0x00007f0cddff0bb0 in KFileItemModelSortAlgorithm::merge(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator) () from /lib64/libdolphinprivate.so.4
#18 0x00007f0cddff0b84 in KFileItemModelSortAlgorithm::merge(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator) () from /lib64/libdolphinprivate.so.4
#19 0x00007f0cddff0bb0 in KFileItemModelSortAlgorithm::merge(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator) () from /lib64/libdolphinprivate.so.4
#20 0x00007f0cddff0b84 in KFileItemModelSortAlgorithm::merge(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator) () from /lib64/libdolphinprivate.so.4
#21 0x00007f0cddff0b84 in KFileItemModelSortAlgorithm::merge(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator) () from /lib64/libdolphinprivate.so.4
#22 0x00007f0cddff0b84 in KFileItemModelSortAlgorithm::merge(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator) () from /lib64/libdolphinprivate.so.4
#23 0x00007f0cddff0b84 in KFileItemModelSortAlgorithm::merge(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator) () from /lib64/libdolphinprivate.so.4
#24 0x00007f0cddff0d1d in KFileItemModelSortAlgorithm::sequentialSort(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator) () from /lib64/libdolphinprivate.so.4
#25 0x00007f0cddff0d9f in KFileItemModelSortAlgorithm::parallelSort(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, int) () from /lib64/libdolphinprivate.so.4
#26 0x00007f0cddff0f9a in QtConcurrent::StoredFunctorCall4<void, void (*)(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, int), KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, int>::runFunctor() () from /lib64/libdolphinprivate.so.4
#27 0x00007f0cddff0ff6 in QtConcurrent::RunFunctionTask<void>::run() () from /lib64/libdolphinprivate.so.4
#28 0x0000003dde86f57d in QThreadPoolThread::run() () from /lib64/libQtCore.so.4
#29 0x0000003dde87b92c in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#30 0x00000035feeaf3f4 in ?? () from /lib64/libGL.so.1
#31 0x0000003dd3807d15 in start_thread () from /lib64/libpthread.so.0
#32 0x0000003dd30f246d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f0cbffff700 (LWP 6094)):
#0  0x0000003dd380b952 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003dde87bde7 in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x0000003dde86f66f in QThreadPoolThread::run() () from /lib64/libQtCore.so.4
#3  0x0000003dde87b92c in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#4  0x00000035feeaf3f4 in ?? () from /lib64/libGL.so.1
#5  0x0000003dd3807d15 in start_thread () from /lib64/libpthread.so.0
#6  0x0000003dd30f246d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f0cd987f880 (LWP 6086)):
#0  0x0000003dd380b5e5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003dde87be8b in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x0000003dde868e8c in QFutureInterfaceBase::waitForFinished() () from /lib64/libQtCore.so.4
#3  0x00007f0cddff0ea3 in KFileItemModelSortAlgorithm::parallelSort(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, int) () from /lib64/libdolphinprivate.so.4
#4  0x00007f0cddff0e99 in KFileItemModelSortAlgorithm::parallelSort(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator, int) () from /lib64/libdolphinprivate.so.4
#5  0x00007f0cddff0f23 in KFileItemModelSortAlgorithm::sort(KFileItemModel*, QList<KFileItemModel::ItemData*>::iterator, QList<KFileItemModel::ItemData*>::iterator) () from /lib64/libdolphinprivate.so.4
#6  0x00007f0cddfc195b in KFileItemModel::insertItems(KFileItemList const&) () from /lib64/libdolphinprivate.so.4
#7  0x00007f0cddfc1ccf in KFileItemModel::dispatchPendingItemsToInsert() () from /lib64/libdolphinprivate.so.4
#8  0x00007f0cddfc1d34 in KFileItemModel::slotCompleted() () from /lib64/libdolphinprivate.so.4
#9  0x0000003dde98cebf in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib64/libQtCore.so.4
#10 0x00007f0cdca6dca5 in KDirLister::completed(KUrl const&) () from /lib64/libkio.so.5
#11 0x00007f0cdca7b0b8 in KDirListerCache::slotResult(KJob*) () from /lib64/libkio.so.5
#12 0x0000003dde98cebf in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib64/libQtCore.so.4
#13 0x00007f0cdb237142 in KJob::result(KJob*) () from /lib64/libkdecore.so.5
#14 0x00007f0cdb237180 in KJob::emitResult() () from /lib64/libkdecore.so.5
#15 0x00007f0cdca54285 in KIO::SimpleJob::slotFinished() () from /lib64/libkio.so.5
#16 0x00007f0cdca5838b in KIO::ListJob::slotFinished() () from /lib64/libkio.so.5
#17 0x0000003dde98cebf in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib64/libQtCore.so.4
#18 0x00007f0cdcaf7011 in KIO::SlaveInterface::dispatch(int, QByteArray const&) () from /lib64/libkio.so.5
#19 0x00007f0cdcaf40ea in KIO::SlaveInterface::dispatch() () from /lib64/libkio.so.5
#20 0x00007f0cdcae864e in KIO::Slave::gotInput() () from /lib64/libkio.so.5
#21 0x0000003dde98cebf in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib64/libQtCore.so.4
#22 0x00007f0cdca291e2 in KIO::ConnectionPrivate::dequeue() () from /lib64/libkio.so.5
#23 0x0000003dde98c39e in QObject::event(QEvent*) () from /lib64/libQtCore.so.4
#24 0x0000003de3bca5cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#25 0x0000003de3bcea4a in QApplication::notify(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#26 0x00007f0cdbd21f26 in KApplication::notify(QObject*, QEvent*) () from /lib64/libkdeui.so.5
#27 0x0000003dde977a8e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQtCore.so.4
#28 0x0000003dde97b541 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQtCore.so.4
#29 0x0000003dde9a5f43 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQtCore.so.4
#30 0x0000003dd2c47a75 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#31 0x0000003dd2c47da8 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
#32 0x0000003dd2c47e64 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#33 0x0000003dde9a60d6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#34 0x0000003de3c6a73e in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtGui.so.4
#35 0x0000003dde9767df in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#36 0x0000003dde976a68 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#37 0x0000003dde97b858 in QCoreApplication::exec() () from /lib64/libQtCore.so.4
#38 0x00007f0cde2975d7 in kdemain () from /lib64/libkdeinit4_dolphin.so
#39 0x0000003dd3021a05 in __libc_start_main () from /lib64/libc.so.6
#40 0x00000000004008d1 in _start ()

Reported using DrKonqi
Comment 1 Frank Reininghaus 2013-01-05 14:02:09 UTC
Thanks for the bug report.

The crash happens in the QDateTime constructor in a secondary thread, so I'm wondering if it's caused by the new parallel sorting, even though it seems unlikely at first sight, given that QDateTime is supposed to be reentrant.

Two questions:

1) How many photos are exactly in that directory? Are there only photos in there, or anything else?
2) Does it only happen if you sort by 'Date', or also when sorting by other things, such as 'Name', 'Size', etc.?
Comment 2 rhgadsdon 2013-01-05 15:36:13 UTC
Hi Frank,

1)  There are 4,766 files in the 'crashing' folder.   Most are jpeg
images, but there are about 1500 xcf / png / psd files, a couple of txt
files, and one folder.  

2)   Tried 'sort by size', 'sort by type', 'sort by name', and
everything works OK.    As soon as I select 'sort by date' Dolphin
crashes.   100% reproducable, for this one folder..           Other
folders, with fewer files, work OK..

Workaround is to revert kde-baseapps and kde-baseapps-libs  to 4.9.5..

Thanks..

Robert.

On 01/05/2013 02:02 PM, Frank Reininghaus wrote:
> https://bugs.kde.org/show_bug.cgi?id=312679
>
> --- Comment #1 from Frank Reininghaus <frank78ac@googlemail.com> ---
> Thanks for the bug report.
>
> The crash happens in the QDateTime constructor in a secondary thread, so I'm
> wondering if it's caused by the new parallel sorting, even though it seems
> unlikely at first sight, given that QDateTime is supposed to be reentrant.
>
> Two questions:
>
> 1) How many photos are exactly in that directory? Are there only photos in
> there, or anything else?
> 2) Does it only happen if you sort by 'Date', or also when sorting by other
> things, such as 'Name', 'Size', etc.?
>
Comment 3 Frank Reininghaus 2013-01-05 17:53:35 UTC
Thanks, but I couldn't reproduce the crash so far. In order to understand the backtrace better it might help if you could install debugging symbols for kdelibs and qt, reproduce the crash, and paste the new backtrace here. There is some info about that at

http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports#Fedora

Another thing that might help is to run Dolphin in Valgrind because this can provide some information about things that went wrong before the crash actually happened:

valgrind dolphin 2> log.txt

Note that this will slow down Dolphin considerably. Thanks for your help!
Comment 4 rhgadsdon 2013-01-05 19:26:17 UTC
OK..   I'll install the ..debuginfo rpms, and do some tests..      I've
tried some more folders, and the crash only occurs with this particular
one..     I'll also try creating a _new_ folder, and copying the
contents across, to see if that makes any difference..

Robert.

On 01/05/2013 05:53 PM, Frank Reininghaus wrote:
> https://bugs.kde.org/show_bug.cgi?id=312679
>
> --- Comment #3 from Frank Reininghaus <frank78ac@googlemail.com> ---
> Thanks, but I couldn't reproduce the crash so far. In order to understand the
> backtrace better it might help if you could install debugging symbols for
> kdelibs and qt, reproduce the crash, and paste the new backtrace here. There is
> some info about that at
>
> http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports#Fedora
>
> Another thing that might help is to run Dolphin in Valgrind because this can
> provide some information about things that went wrong before the crash actually
> happened:
>
> valgrind dolphin 2> log.txt
>
> Note that this will slow down Dolphin considerably. Thanks for your help!
>
Comment 5 rhgadsdon 2013-01-06 22:54:04 UTC
Crash backtrace with debug installed:

Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f950fd19880 (LWP 13424))]

Thread 5 (Thread 0x7f9504e81700 (LWP 13426)):
#0  0x0000003dd30e998d in poll () from /lib64/libc.so.6
#1  0x0000003dd2c47d44 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
#2  0x0000003dd2c47e64 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f951193c0f6 in QEventDispatcherGlib::processEvents (this=0x7f95000008e0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f951190c7df in QEventLoop::processEvents (this=this@entry=0x7f9504e80c10, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f951190ca68 in QEventLoop::exec (this=0x7f9504e80c10, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f951180e950 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#7  0x00007f95118ed00f in QInotifyFileSystemWatcherEngine::run (this=0x1800eb0) at io/qfilesystemwatcher_inotify.cpp:256
#8  0x00007f951181192c in QThreadPrivate::start (arg=0x1800eb0) at thread/qthread_unix.cpp:338
#9  0x00000035feeaf3f4 in ?? () from /lib64/libGL.so.1
#10 0x0000003dd3807d15 in start_thread () from /lib64/libpthread.so.0
#11 0x0000003dd30f246d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f94ffb1f700 (LWP 13432)):
#0  0x0000003dd380b952 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9511811de7 in wait (time=30000, this=0x28c0f00) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x28c0e78, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f951180566f in QThreadPoolThread::run (this=0x28c0fe0) at concurrent/qthreadpool.cpp:141
#4  0x00007f951181192c in QThreadPrivate::start (arg=0x28c0fe0) at thread/qthread_unix.cpp:338
#5  0x00000035feeaf3f4 in ?? () from /lib64/libGL.so.1
#6  0x0000003dd3807d15 in start_thread () from /lib64/libpthread.so.0
#7  0x0000003dd30f246d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f94ff31e700 (LWP 13433)):
#0  0x0000003dd380b952 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9511811de7 in wait (time=30000, this=0x28c0f00) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x28c0e78, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f951180566f in QThreadPoolThread::run (this=0x28c1760) at concurrent/qthreadpool.cpp:141
#4  0x00007f951181192c in QThreadPrivate::start (arg=0x28c1760) at thread/qthread_unix.cpp:338
#5  0x00000035feeaf3f4 in ?? () from /lib64/libGL.so.1
#6  0x0000003dd3807d15 in start_thread () from /lib64/libpthread.so.0
#7  0x0000003dd30f246d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f94feb1d700 (LWP 13434)):
#0  0x0000003dd380b952 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9511811de7 in wait (time=30000, this=0x28c0f00) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x28c0e78, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f951180566f in QThreadPoolThread::run (this=0x7f94f0002b90) at concurrent/qthreadpool.cpp:141
#4  0x00007f951181192c in QThreadPrivate::start (arg=0x7f94f0002b90) at thread/qthread_unix.cpp:338
#5  0x00000035feeaf3f4 in ?? () from /lib64/libGL.so.1
#6  0x0000003dd3807d15 in start_thread () from /lib64/libpthread.so.0
#7  0x0000003dd30f246d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f950fd19880 (LWP 13424)):
[KCrash Handler]
#6  KTimeZone::Transition::time (this=0x0) at /usr/src/debug/kdelibs-4.9.97/kdecore/date/ktimezone.cpp:277
#7  0x000000366c6f80c7 in KTimeZoneDataPrivate::transitionIndex (this=0x1aea010, dt=...) at /usr/src/debug/kdelibs-4.9.97/kdecore/date/ktimezone.cpp:1088
#8  0x000000366c6f9a76 in KTimeZoneData::transitionIndex (this=0x14bc4f0, dt=..., secondIndex=0x7fff22b6843c, validTime=0x7fff22b6843b) at /usr/src/debug/kdelibs-4.9.97/kdecore/date/ktimezone.cpp:1287
#9  0x000000366c6fa9eb in offsetAtZoneTime (secondOffset=0x7fff22b684fc, zoneDateTime=..., caller=0x28a2af0, this=0x28a27a0) at /usr/src/debug/kdelibs-4.9.97/kdecore/date/ktimezone.cpp:516
#10 KTimeZoneBackend::offsetAtZoneTime (this=0x28a27a0, caller=0x28a2af0, zoneDateTime=..., secondOffset=0x7fff22b684fc) at /usr/src/debug/kdelibs-4.9.97/kdecore/date/ktimezone.cpp:467
#11 0x000000366c6e48b4 in timeZoneOffset (this=0x28a2ae0) at /usr/src/debug/kdelibs-4.9.97/kdecore/date/kdatetime.cpp:606
#12 KDateTimePrivate::timeZoneOffset (this=0x28a2ae0) at /usr/src/debug/kdelibs-4.9.97/kdecore/date/kdatetime.cpp:592
#13 0x000000366c6e4bcc in KDateTimePrivate::toUtc (this=0x28a2ae0, local=...) at /usr/src/debug/kdelibs-4.9.97/kdecore/date/kdatetime.cpp:693
#14 0x000000366c6e8305 in KDateTime::operator< (this=0x7fff22b68680, other=...) at /usr/src/debug/kdelibs-4.9.97/kdecore/date/kdatetime.cpp:1431
#15 0x00007f9513382be3 in KFileItemModel::sortRoleCompare (this=this@entry=0x18ea720, a=a@entry=0x28b5300, b=b@entry=0x28a2700) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/kfileitemmodel.cpp:1396
#16 0x00007f9513383820 in KFileItemModel::lessThan (this=0x18ea720, a=0x28b5300, b=0x28a2700) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/kfileitemmodel.cpp:1344
#17 0x00007f95133b29b9 in KFileItemModelSortAlgorithm::upperBound (model=model@entry=0x18ea720, begin=..., end=..., value=0x28b5300) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:161
#18 0x00007f95133b2af9 in KFileItemModelSortAlgorithm::merge (model=model@entry=0x18ea720, begin=..., pivot=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:106
#19 0x00007f95133b2b84 in KFileItemModelSortAlgorithm::merge (model=model@entry=0x18ea720, begin=..., pivot=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:114
#20 0x00007f95133b2b84 in KFileItemModelSortAlgorithm::merge (model=model@entry=0x18ea720, begin=..., pivot=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:114
#21 0x00007f95133b2bb0 in KFileItemModelSortAlgorithm::merge (model=model@entry=0x18ea720, begin=..., pivot=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:115
#22 0x00007f95133b2b84 in KFileItemModelSortAlgorithm::merge (model=model@entry=0x18ea720, begin=..., pivot=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:114
#23 0x00007f95133b2b84 in KFileItemModelSortAlgorithm::merge (model=model@entry=0x18ea720, begin=..., pivot=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:114
#24 0x00007f95133b2b84 in KFileItemModelSortAlgorithm::merge (model=model@entry=0x18ea720, begin=..., pivot=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:114
#25 0x00007f95133b2d1d in KFileItemModelSortAlgorithm::sequentialSort (model=model@entry=0x18ea720, begin=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:48
#26 0x00007f95133b2cf3 in KFileItemModelSortAlgorithm::sequentialSort (model=model@entry=0x18ea720, begin=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:47
#27 0x00007f95133b2cf3 in KFileItemModelSortAlgorithm::sequentialSort (model=model@entry=0x18ea720, begin=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:47
#28 0x00007f95133b2cf3 in KFileItemModelSortAlgorithm::sequentialSort (model=model@entry=0x18ea720, begin=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:47
#29 0x00007f95133b2d9f in KFileItemModelSortAlgorithm::parallelSort (model=model@entry=0x18ea720, begin=..., end=..., numberOfThreads=numberOfThreads@entry=1) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:69
#30 0x00007f95133b2e99 in KFileItemModelSortAlgorithm::parallelSort (model=model@entry=0x18ea720, begin=..., end=..., numberOfThreads=numberOfThreads@entry=2) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:63
#31 0x00007f95133b2e99 in KFileItemModelSortAlgorithm::parallelSort (model=0x18ea720, begin=..., end=..., numberOfThreads=<optimized out>) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:63
#32 0x00007f95133b2f23 in KFileItemModelSortAlgorithm::sort (model=<optimized out>, begin=..., end=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp:30
#33 0x00007f951338395b in KFileItemModel::insertItems (this=0x18ea720, items=...) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/kfileitemmodel.cpp:944
#34 0x00007f9513383ccf in dispatchPendingItemsToInsert (this=<optimized out>) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/kfileitemmodel.cpp:916
#35 KFileItemModel::dispatchPendingItemsToInsert (this=0x7fff22b68340) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/kfileitemmodel.cpp:913
#36 0x00007f9513383d34 in KFileItemModel::slotCompleted (this=0x18ea720) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/kitemviews/kfileitemmodel.cpp:688
#37 0x00007f9511922ebf in QMetaObject::activate (sender=0x18ea8e0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff22b69200) at kernel/qobject.cpp:3539
#38 0x000000366e110ca5 in KDirLister::completed (this=this@entry=0x18ea8e0, _t1=...) at /usr/src/debug/kdelibs-4.9.97/x86_64-redhat-linux-gnu/kio/kdirlister.moc:233
#39 0x000000366e11e0b8 in KDirListerCache::slotResult (this=0x180ebc0, j=<optimized out>) at /usr/src/debug/kdelibs-4.9.97/kio/kio/kdirlister.cpp:1316
#40 0x00007f9511922ebf in QMetaObject::activate (sender=0x1ab1e30, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff22b69440) at kernel/qobject.cpp:3539
#41 0x000000366c734142 in KJob::result (this=this@entry=0x1ab1e30, _t1=_t1@entry=0x1ab1e30) at /usr/src/debug/kdelibs-4.9.97/x86_64-redhat-linux-gnu/kdecore/kjob.moc:207
#42 0x000000366c734180 in KJob::emitResult (this=0x1ab1e30) at /usr/src/debug/kdelibs-4.9.97/kdecore/jobs/kjob.cpp:318
#43 0x000000366e0f7285 in KIO::SimpleJob::slotFinished (this=this@entry=0x1ab1e30) at /usr/src/debug/kdelibs-4.9.97/kio/kio/job.cpp:494
#44 0x000000366e0fb38b in KIO::ListJob::slotFinished (this=0x1ab1e30) at /usr/src/debug/kdelibs-4.9.97/kio/kio/job.cpp:2688
#45 0x00007f9511922ebf in QMetaObject::activate (sender=0x165ca60, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3539
#46 0x000000366e19a011 in KIO::SlaveInterface::dispatch (this=0x165ca60, _cmd=104, rawdata=...) at /usr/src/debug/kdelibs-4.9.97/kio/kio/slaveinterface.cpp:172
#47 0x000000366e1970ea in KIO::SlaveInterface::dispatch (this=0x165ca60) at /usr/src/debug/kdelibs-4.9.97/kio/kio/slaveinterface.cpp:88
#48 0x000000366e18b64e in KIO::Slave::gotInput (this=0x165ca60) at /usr/src/debug/kdelibs-4.9.97/kio/kio/slave.cpp:344
#49 0x00007f9511922ebf in QMetaObject::activate (sender=0x165e4a0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3539
#50 0x000000366e0cc1e2 in dequeue (this=<optimized out>) at /usr/src/debug/kdelibs-4.9.97/kio/kio/connection.cpp:82
#51 KIO::ConnectionPrivate::dequeue (this=0x19619c0) at /usr/src/debug/kdelibs-4.9.97/kio/kio/connection.cpp:71
#52 0x00007f951192239e in QObject::event (this=0x165e4a0, e=<optimized out>) at kernel/qobject.cpp:1194
#53 0x00007f951208d5cc in QApplicationPrivate::notify_helper (this=this@entry=0x14bfd40, receiver=receiver@entry=0x165e4a0, e=e@entry=0x17d5ec0) at kernel/qapplication.cpp:4562
#54 0x00007f9512091a4a in QApplication::notify (this=0x7fff22b6a550, receiver=0x165e4a0, e=0x17d5ec0) at kernel/qapplication.cpp:4423
#55 0x000000366ce46f26 in KApplication::notify (this=0x7fff22b6a550, receiver=0x165e4a0, event=0x17d5ec0) at /usr/src/debug/kdelibs-4.9.97/kdeui/kernel/kapplication.cpp:311
#56 0x00007f951190da8e in QCoreApplication::notifyInternal (this=0x7fff22b6a550, receiver=receiver@entry=0x165e4a0, event=event@entry=0x17d5ec0) at kernel/qcoreapplication.cpp:946
#57 0x00007f9511911541 in sendEvent (event=0x17d5ec0, receiver=0x165e4a0) at kernel/qcoreapplication.h:231
#58 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x14867a0) at kernel/qcoreapplication.cpp:1570
#59 0x00007f951193bf43 in sendPostedEvents () at kernel/qcoreapplication.h:236
#60 postEventSourceDispatch (s=0x14bb850) at kernel/qeventdispatcher_glib.cpp:279
#61 0x0000003dd2c47a75 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#62 0x0000003dd2c47da8 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
#63 0x0000003dd2c47e64 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#64 0x00007f951193c0d6 in QEventDispatcherGlib::processEvents (this=0x1488080, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#65 0x00007f951212d73e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#66 0x00007f951190c7df in QEventLoop::processEvents (this=this@entry=0x7fff22b6a410, flags=...) at kernel/qeventloop.cpp:149
#67 0x00007f951190ca68 in QEventLoop::exec (this=0x7fff22b6a410, flags=...) at kernel/qeventloop.cpp:204
#68 0x00007f9511911858 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#69 0x00007f95136595d7 in kdemain (argc=6, argv=0x7fff22b6a688) at /usr/src/debug/kde-baseapps-4.9.97/dolphin/src/main.cpp:90
#70 0x0000003dd3021a05 in __libc_start_main () from /lib64/libc.so.6
#71 0x00000000004008d1 in _start ()
Comment 6 rhgadsdon 2013-01-06 22:57:22 UTC
When I ran # valgrind dolphin 2> log.txt, dolphin did not crash when I opened the offending folder - in 'sort by date' order..

Valgrind output:
==13524== Memcheck, a memory error detector
==13524== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==13524== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==13524== Command: dolphin
==13524== 
dolphin(13524) KXMLGUI::ActionList::plug: Index  19  is not within range (0 -  11 
==13524== Invalid read of size 8
==13524==    at 0x5B5482A: qt_blend_argb32_on_argb32_ssse3(unsigned char*, int, unsigned char const*, int, int, int, int) (qdrawhelper_ssse3.cpp:179)
==13524==    by 0x5D1E4FC: QRasterPaintEngine::drawImage(QPointF const&, QImage const&) (qpaintengine_raster.cpp:2182)
==13524==    by 0x5D27F95: QRasterPaintEngine::drawPixmap(QPointF const&, QPixmap const&) (qpaintengine_raster.cpp:2057)
==13524==    by 0x5CAA81C: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5344)
==13524==    by 0xFC6B733: ??? (in /usr/lib64/kde4/plugins/styles/oxygen.so)
==13524==    by 0x5BABEFD: QWidget::event(QEvent*) (qwidget.cpp:8532)
==13524==    by 0x5B5C5CB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4562)
==13524==    by 0x5B60A49: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4423)
==13524==    by 0x366CE46F25: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311)
==13524==    by 0x6A02A8D: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:946)
==13524==    by 0x5BA7AC3: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (qcoreapplication.h:234)
==13524==    by 0x5BA85BE: QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (qwidget.cpp:5807)
==13524==  Address 0x17c84228 is 63,016 bytes inside a block of size 63,020 alloc'd
==13524==    at 0x4A0883C: malloc (vg_replace_malloc.c:270)
==13524==    by 0x5C127E5: QImageData::create(QSize const&, QImage::Format, int) (qimage.cpp:209)
==13524==    by 0x5C12D1A: QImage::QImage(int, int, QImage::Format) (qimage.cpp:811)
==13524==    by 0x5C3A036: QRasterPixmapData::resize(int, int) (qpixmap_raster.cpp:122)
==13524==    by 0x5C2C67D: QPixmap::fill(QColor const&) (qpixmap.cpp:1033)
==13524==    by 0xFC6B657: ??? (in /usr/lib64/kde4/plugins/styles/oxygen.so)
==13524==    by 0x5BABEFD: QWidget::event(QEvent*) (qwidget.cpp:8532)
==13524==    by 0x5B5C5CB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4562)
==13524==    by 0x5B60A49: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4423)
==13524==    by 0x366CE46F25: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311)
==13524==    by 0x6A02A8D: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:946)
==13524==    by 0x5BA7AC3: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (qcoreapplication.h:234)
==13524== 
==13524== 
==13524== HEAP SUMMARY:
==13524==     in use at exit: 399,426 bytes in 3,728 blocks
==13524==   total heap usage: 4,713,256 allocs, 4,709,528 frees, 1,919,214,116 bytes allocated
==13524== 
==13524== LEAK SUMMARY:
==13524==    definitely lost: 3,176 bytes in 29 blocks
==13524==    indirectly lost: 31,384 bytes in 146 blocks
==13524==      possibly lost: 18,464 bytes in 47 blocks
==13524==    still reachable: 346,402 bytes in 3,506 blocks
==13524==         suppressed: 0 bytes in 0 blocks
==13524== Rerun with --leak-check=full to see details of leaked memory
==13524== 
==13524== For counts of detected and suppressed errors, rerun with: -v
==13524== ERROR SUMMARY: 318 errors from 1 contexts (suppressed: 2 from 2)
Comment 7 Christoph Feck 2013-01-08 00:14:04 UTC
Well, QDateTime is reentrant, but KFileItem sorting uses KDateTime, which calls into KTimeZoneBackend. Not sure if those are reentrant.

Adding John.
Comment 8 Frank Reininghaus 2013-01-08 01:03:29 UTC
> Well, QDateTime is reentrant, but KFileItem sorting uses KDateTime, which
> calls into KTimeZoneBackend. Not sure if those are reentrant.

Well, if they are not (it would be nice if John could confirm this), we could just disable parallel sorting for the case that the items are not sorted by name. Natural sorting by name is by far the most expensive.

Another workaround might be to use KFileItem's time method that returns a time_t. That should be sufficient to find out which file is older, but that method is deprecated.

What I first found a bit strange is that KDateTimePrivate::toUtc() does not get called at all on my system from operator < (i.e., during sorting). But looking at the code of

KDateTime::operator<(const KDateTime &other),

it seems that this can indeed happen if there are multiple files which were created close to a shift to/from daylight saving time.
Comment 9 Frank Reininghaus 2013-01-11 15:58:41 UTC
Git commit 715f00a9b68ab96f040d24e0c21579c87e1851bd by Frank Reininghaus.
Committed on 11/01/2013 at 16:57.
Pushed by freininghaus into branch 'KDE/4.10'.

Only use parallel sorting when sorting by name

The reentrant natural comparison of strings is the only really
expensive operation. Other comparison functions are much cheaper and
might not be reentrant at all. Therefore, we disable parallel sorting
when not sorting by name to prevent crashes and other unpleasant
behaviour.
FIXED-IN: 4.10
REVIEW: 108309

M  +11   -2    dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp

http://commits.kde.org/kde-baseapps/715f00a9b68ab96f040d24e0c21579c87e1851bd