Summary: | (steps,testcase) Dolphin crashed entering folder (QUrl, KFilePreviewGenerator::Private::delayedIconUpdate) | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Craig Magina <craig.magina> |
Component: | general | Assignee: | Peter Penz <peter.penz19> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | 65prophecy, abbadon80, alberich, andresbajotierra, andresrh2000, andrev2, arunmarjun, blitz00, carmack, cniehaus, darthsteel, e.lex, finex, frank78ac, gary, gatoso, gjaviergr, jerome.multrier, jo.oiongen, joshlukas, jrodrigomd, juan_aguilar, kde, loacoon, madnux, michelange, mola89, mw, p.a.s, p.garcifer, pasnox, richts, shivrang.setlur, sputnikshock, strikeapope, thomas.b.pringle, thomasj, tiger_vision2036, tim474, trotos, tuxerito, wanker_trash-stuff, x545, zdenek.zikan |
Priority: | NOR | Keywords: | testcase |
Version: | 16.12.2 | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Craig Magina
2009-07-14 05:19:06 UTC
Did you browse the network or did you manually enter the URI of the smb share? Anyway the backtrace is very similar to bug 199618. Indeed, it is also related to bug 193466. *** Bug 200714 has been marked as a duplicate of this bug. *** *** Bug 201957 has been marked as a duplicate of this bug. *** *** Bug 201544 has been marked as a duplicate of this bug. *** *** Bug 202464 has been marked as a duplicate of this bug. *** *** Bug 202768 has been marked as a duplicate of this bug. *** I managed to identify some testcase steps thanks to the help of the reporter of bug 202768. You will need: - A mostly clean Dolphin configuration (may be optional) - A script or application that writes data to a file every certain seconds. (In this case, we could use a python script provided at bug 202768 comment 3 (https://bugs.kde.org/attachment.cgi?id=35936) , it writes 1024bytes of random data to a file every second) Steps - Close the Dolphin instances you have open (and clean/move your config "dolphinrc") - Create a test folder (I'm going to call it "TESTDIR") - Copy the python script to that folder - Run Konsole, chdir to TESTDIR and launch Dolphin to show that folder (ex. "dolphin .") Dolphin should start and show TESTDIR contents - Select Details View (this may be irrelevant; it's the default here) - Activate the Preview Mode using the button in the toolbar - Reduce the size of the preview to the minimum (this may be irrelevant) - Now, run the python app from Konsole. The file «file to make dolphin crash.zip.part» should appear and should start growing 1kb per second. - Wait until it has 9Kb or 10Kb (after 9 or 10 seconds). - Now click on the KUrlNavigator to make it editable; add "/*.*" to the end (now the path will be "TESTDIR/*.*") and press Enter. - If your mouse is over the KUrlNavigator, move it to the central view (which is empty because the path is indeed invalid; we will also get an error in the status bar). - Leave the mouse there and wait. After 5 seconds ~ Dolphin will crash with the mentioned backtrace. - If Dolphin does not crash just move the mouse cursor position between the KUrlNavigator (which is still in the editable mode) and the main directory view. If you can't reproduce, may be you have to clean configs and start over again. I can reproduce mostly all the times with the described tests (however may be there are useless steps, or missing required information.. just ask) BTW, I can reproduce using: Qt: 4.5.2 (KDE-Qt git commit f9802f2bbbd23137acb5f80d1f131fa6b1a85752 Date: Fri Jun 12 15:06:29 2009 +0200) KDE: 4.3.62 (KDE 4.3.62 (KDE 4.4 >= 20090728)) kdelibs svn rev. 1006918 / kdebase svn rev. 1006918 on ArchLinux i686 - Kernel 2.6.30.4 Updated backtrace: Application: Dolphin (dolphin), signal: Segmentation fault [KCrash Handler] #6 0xb644226b in QUrl (this=0xbf939d18, other=@0x8) at io/qurl.cpp:3936 #7 0xb7256a49 in KUrl (this=0xbf939d18, _u=@0x8) at /home/kde-devel/kde/src/KDE/kdelibs/kdecore/io/kurl.cpp:472 #8 0xb7ec447e in KFileItem::url (this=0x86cbe38) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kfileitem.cpp:1274 #9 0xb7eb235f in KDirModel::indexForItem (this=0x86f16f8, item=@0x86cbe38) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirmodel.cpp:919 #10 0xb7d824f6 in KFilePreviewGenerator::Private::orderItems (this=0x87f7058, items=@0xbf939e3c) at /home/kde-devel/kde/src/KDE/kdelibs/kfile/kfilepreviewgenerator.cpp:1014 #11 0xb7d860dd in KFilePreviewGenerator::Private::updateIcons (this=0x87f7058, items=@0xbf939e9c) at /home/kde-devel/kde/src/KDE/kdelibs/kfile/kfilepreviewgenerator.cpp:508 #12 0xb7d86322 in KFilePreviewGenerator::Private::delayedIconUpdate (this=0x87f7058) at /home/kde-devel/kde/src/KDE/kdelibs/kfile/kfilepreviewgenerator.cpp:1079 #13 0xb7d87396 in KFilePreviewGenerator::qt_metacall (this=0x87f6e80, _c=QMetaObject::InvokeMetaMethod, _id=14, _a=0xbf939f38) at /home/kde-devel/kde/build/KDE/kdelibs/kfile/kfilepreviewgenerator.moc:95 #14 0xb64a69ca in QMetaObject::activate (sender=0x87f7598, from_signal_index=4, to_signal_index=4, argv=0x0) at kernel/qobject.cpp:3112 #15 0xb64a6d42 in QMetaObject::activate (sender=0x87f7598, m=0xb65b5be4, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3186 #16 0xb64eb00f in QTimer::timeout (this=0x87f7598) at .moc/debug-shared/moc_qtimer.cpp:128 #17 0xb64af5de in QTimer::timerEvent (this=0x87f7598, e=0xbf93a4b4) at kernel/qtimer.cpp:261 #18 0xb64a2be2 in QObject::event (this=0x87f7598, e=0xbf93a4b4) at kernel/qobject.cpp:1074 #19 0xb672800b in QApplicationPrivate::notify_helper (this=0x8671c40, receiver=0x87f7598, e=0xbf93a4b4) at kernel/qapplication.cpp:4056 #20 0xb672646c in QApplication::notify (this=0xbf93a80c, receiver=0x87f7598, e=0xbf93a4b4) at kernel/qapplication.cpp:3603 #21 0xb764c0aa in KApplication::notify (this=0xbf93a80c, receiver=0x87f7598, event=0xbf93a4b4) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302 #22 0xb648d1c1 in QCoreApplication::notifyInternal (this=0xbf93a80c, receiver=0x87f7598, event=0xbf93a4b4) at kernel/qcoreapplication.cpp:610 #23 0xb6719741 in QCoreApplication::sendEvent (receiver=0x87f7598, event=0xbf93a4b4) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213 #24 0xb64c4672 in QTimerInfoList::activateTimers (this=0x866a754) at kernel/qeventdispatcher_unix.cpp:572 #25 0xb64c0b17 in timerSourceDispatch (source=0x866a720) at kernel/qeventdispatcher_glib.cpp:165 #26 0xb5c86d98 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #27 0xb5c8a3e0 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0 #28 0xb5c8a513 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #29 0xb64c1a5a in QEventDispatcherGlib::processEvents (this=0x8668af0, flags={i = 36}) at kernel/qeventdispatcher_glib.cpp:327 #30 0xb67d9c6e in QGuiEventDispatcherGlib::processEvents (this=0x8668af0, flags={i = 36}) at kernel/qguieventdispatcher_glib.cpp:202 #31 0xb648a79f in QEventLoop::processEvents (this=0xbf93a75c, flags={i = 36}) at kernel/qeventloop.cpp:149 #32 0xb648a8e4 in QEventLoop::exec (this=0xbf93a75c, flags={i = 0}) at kernel/qeventloop.cpp:201 #33 0xb648d89d in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888 #34 0xb6726128 in QApplication::exec () at kernel/qapplication.cpp:3525 #35 0x08079605 in main (argc=2, argv=0xbf93a9e4) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/main.cpp:94 *** Bug 202828 has been marked as a duplicate of this bug. *** *** Bug 203141 has been marked as a duplicate of this bug. *** *** Bug 203519 has been marked as a duplicate of this bug. *** *** Bug 203728 has been marked as a duplicate of this bug. *** *** Bug 204447 has been marked as a duplicate of this bug. *** *** Bug 204799 has been marked as a duplicate of this bug. *** *** Bug 204995 has been marked as a duplicate of this bug. *** *** Bug 205308 has been marked as a duplicate of this bug. *** *** Bug 205695 has been marked as a duplicate of this bug. *** *** Bug 205860 has been marked as a duplicate of this bug. *** *** Bug 206029 has been marked as a duplicate of this bug. *** *** Bug 206044 has been marked as a duplicate of this bug. *** *** Bug 206139 has been marked as a duplicate of this bug. *** *** Bug 206286 has been marked as a duplicate of this bug. *** *** Bug 206302 has been marked as a duplicate of this bug. *** *** Bug 206706 has been marked as a duplicate of this bug. *** *** Bug 206765 has been marked as a duplicate of this bug. *** *** Bug 206899 has been marked as a duplicate of this bug. *** @Peter: The code that causes this crash was committed in http://websvn.kde.org/?view=rev&revision=969368 Most reports seem to have in common that the URL of the current view was changed after or during a huge copy operation, and then Dolphin crashes. What I think might be happening (without really knowing the internals): 1. The file data change during the copy operation. KDirModel emits dataChanged(const QModelIndex&, const QModelIndex&), which is connected to KFilePreviewGenerator::Private::updateIcons(const QModelIndex&, const QModelIndex&) In that function, the 5 seconds timer m_changedItemsTimer gets started. 2. The URL of the current view changes. 3. After 5 seconds, the timer expires and calls KFilePreviewGenerator::Private::delayedIconUpdate(). That ends up in KFilePreviewGenerator::Private::orderItems(KFileItemList& items), which calls KDirModel::indexForItem(const KFileItem& item) to get the item's model index. But it seems that the item is not really valid any more (because of the URL change), and trying to find out its URL leads to a segfault. Maybe one could somehow stop the timer if the URL of the current view changes, or KFilePreviewGenerator::Private::delayedIconUpdate() could check if the URL has changed in the meantime and just return without doing anything if that is the case. I haven't had the time to try that yet, though. In any case, I think this should be fixed or that commit reverted before 4.3.2. It looks like this regression causes more trouble than bug 168666 which is fixed by it ;-) Thanks Frank for the analyses, I'll try to fix this issue until the end of the week and backport it to KDE 4.3.x :-) It was on my radar already because of the huge number of duplicates, but did not have the time yet to analyze it... :-( SVN commit 1022119 by ppenz: When KFilePreviewGenerator::Private::killPreviewJobs() is invoked, all timers must get stopped to. Otherwise it is possible that a timer like m_changedItemsTimer will invoke orderItems() on an already invalid URL which will result in a crash. Thanks a lot to Frank Reininghaus for the analyses and Dario Andres & FiNeX for taking care to recognize the huge number of duplicates. BUG: 200125 M +4 -0 kfilepreviewgenerator.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1022119 SVN commit 1022120 by ppenz: Backport of SVN commit 1022119: When KFilePreviewGenerator::Private::killPreviewJobs() is invoked, all timers must get stopped to. Otherwise it is possible that a timer like m_changedItemsTimer will invoke orderItems() on an already invalid URL which will result in a crash. Thanks a lot to Frank Reininghaus for the analyses and Dario Andres & FiNeX for taking care to recognize the huge number of duplicates. CCBUG: 200125 M +4 -0 kfilepreviewgenerator.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1022120 *** Bug 206925 has been marked as a duplicate of this bug. *** *** Bug 199618 has been marked as a duplicate of this bug. *** *** Bug 207009 has been marked as a duplicate of this bug. *** *** Bug 198120 has been marked as a duplicate of this bug. *** *** Bug 207277 has been marked as a duplicate of this bug. *** *** Bug 207313 has been marked as a duplicate of this bug. *** *** Bug 207455 has been marked as a duplicate of this bug. *** *** Bug 207536 has been marked as a duplicate of this bug. *** *** Bug 208074 has been marked as a duplicate of this bug. *** *** Bug 208240 has been marked as a duplicate of this bug. *** *** Bug 208556 has been marked as a duplicate of this bug. *** *** Bug 208980 has been marked as a duplicate of this bug. *** *** Bug 208895 has been marked as a duplicate of this bug. *** *** Bug 209166 has been marked as a duplicate of this bug. *** *** Bug 209257 has been marked as a duplicate of this bug. *** *** Bug 209461 has been marked as a duplicate of this bug. *** *** Bug 209691 has been marked as a duplicate of this bug. *** *** Bug 209958 has been marked as a duplicate of this bug. *** *** Bug 211942 has been marked as a duplicate of this bug. *** *** Bug 219993 has been marked as a duplicate of this bug. *** |