dolphin crashed with SIGSEGV in QUrl::QUrl()

Bug #414995 reported by Secret
80
This bug affects 11 people
Affects Status Importance Assigned to Milestone
KDE Base
Fix Released
High
kdebase (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: dolphin

Kubuntu 9.10 alpha 4

I copied a lot of data (about 70 gig) from an external harddisk to my computer. Then dolphin (4:4.3.0-0ubuntu3) crashed

ProblemType: Crash
Architecture: i386
Date: Mon Aug 17 20:59:35 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/dolphin
Package: dolphin 4:4.3.0-0ubuntu3
ProcCmdline: /usr/bin/dolphin -icon system-file-manager -caption Dolphin
ProcEnviron:
 LANG=nl_NL.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-5.24-generic
SegvAnalysis:
 Segfault happened at: 0x324c829 <_ZN4QUrlC2ERKS_+9>: mov (%eax),%eax
 PC (0x0324c829) ok
 source "(%eax)" (0x00000008) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: kdebase
StacktraceTop:
 QUrl::QUrl(QUrl const&) () from /usr/lib/libQtCore.so.4
 KUrl::KUrl(KUrl const&) () from /usr/lib/libkdecore.so.5
 KFileItem::url() const () from /usr/lib/libkio.so.5
 KDirModel::indexForItem(KFileItem const&) const ()
 KFilePreviewGenerator::Private::orderItems(KFileItemList&)
Title: dolphin crashed with SIGSEGV in QUrl::QUrl()
Uname: Linux 2.6.31-5-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
In , Craig Magina (craig.magina) wrote :
Download full text (3.4 KiB)

Application that crashed: dolphin
Version of the application: 1.3
KDE Version: 4.2.96 (KDE 4.2.96 (KDE 4.3 RC2))
Qt Version: 4.5.2
Operating System: Linux 2.6.30-8-generic x86_64
Distribution: Ubuntu karmic (development branch)

 -- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
[KCrash Handler]
#5 QUrl (this=0x7fff321c3590, other=...) at io/qurl.cpp:3936
#6 0x00007f51ecd15999 in KUrl (this=0x7fff321c3590, _u=...) at ../../kdecore/io/kurl.cpp:468
#7 0x00007f51eebb4540 in KFileItem::url (this=<value optimized out>) at ../../kio/kio/kfileitem.cpp:1268
#8 0x00007f51eeba4ed4 in KDirModel::indexForItem (this=0xb14b90, item=...) at ../../kio/kio/kdirmodel.cpp:919
#9 0x00007f51ee84a92b in KFilePreviewGenerator::Private::orderItems (this=0x8b3d30, items=...) at ../../kfile/kfilepreviewgenerator.cpp:1013
#10 0x00007f51ee84e442 in KFilePreviewGenerator::Private::updateIcons (this=0x8b3d30, items=...) at ../../kfile/kfilepreviewgenerator.cpp:501
#11 0x00007f51ee84e69f in KFilePreviewGenerator::Private::delayedIconUpdate (this=0x8b3d30) at ../../kfile/kfilepreviewgenerator.cpp:1078
#12 0x00007f51ee84f565 in KFilePreviewGenerator::qt_metacall (this=0x194d1a0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff321c38b0) at ./kfilepreviewgenerator.moc:95
#13 0x00007f51ebb26e1c in QMetaObject::activate (sender=0xfc8850, from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=0x2bd) at kernel/qobject.cpp:3113
#14 0x00007f51ebb20dc3 in QObject::event (this=0xfc8850, e=0x10) at kernel/qobject.cpp:1075
#15 0x00007f51ebfa462c in QApplicationPrivate::notify_helper (this=0x8b4d10, receiver=0xfc8850, e=0x7fff321c3eb0) at kernel/qapplication.cpp:4056
#16 0x00007f51ebfab8fe in QApplication::notify (this=0x7fff321c4200, receiver=0xfc8850, e=0x7fff321c3eb0) at kernel/qapplication.cpp:4021
#17 0x00007f51ed2d23f6 in KApplication::notify (this=0x7fff321c4200, receiver=0xfc8850, event=0x7fff321c3eb0) at ../../kdeui/kernel/kapplication.cpp:302
#18 0x00007f51ebb11c6c in QCoreApplication::notifyInternal (this=0x7fff321c4200, receiver=0xfc8850, event=0x7fff321c3eb0) at kernel/qcoreapplication.cpp:610
#19 0x00007f51ebb3c912 in QCoreApplication::sendEvent (this=0x8b7f80) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#20 QTimerInfoList::activateTimers (this=0x8b7f80) at kernel/qeventdispatcher_unix.cpp:572
#21 0x00007f51ebb3a2ad in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:165
#22 0x00007f51e784a9fe in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#23 0x00007f51e784e3c8 in ?? () from /usr/lib/libglib-2.0.so.0
#24 0x00007f51e784e4f0 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#25 0x00007f51ebb3a1f6 in QEventDispatcherGlib::processEvents (this=0x88eb50, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:327
#26 0x00007f51ec038ace in QGuiEventDispatcherGlib::processEvents (this=0x7fff321c3590, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#27 0x00007f51ebb10572 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#28 0x00007f51eb...

Read more...

Revision history for this message
In , FiNeX (finex) wrote :

Did you browse the network or did you manually enter the URI of the smb share?

Revision history for this message
In , FiNeX (finex) wrote :

Anyway the backtrace is very similar to bug 199618.

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

Indeed, it is also related to bug 193466.

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 200714 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 201957 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 201544 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 202464 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 202768 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

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

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :
Download full text (3.6 KiB)

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_...

Read more...

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 202828 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 203141 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 203519 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 203728 has been marked as a duplicate of this bug. ***

Revision history for this message
Secret (ernst1700) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt (retraced)

StacktraceTop:QUrl (this=0xbfbe2d28, other=@0x8) at io/qurl.cpp:3936
KUrl (this=0xbfbe2d28, _u=@0x8)
KFileItem::url (this=0xa2bca80)
KDirModel::indexForItem (this=0x98690c8, item=@0xa2bca80)
KFilePreviewGenerator::Private::orderItems (this=0x98636d8,

Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt (retraced)
Changed in dolphin (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 204447 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 204799 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 204995 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 205308 has been marked as a duplicate of this bug. ***

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at: https://bugs.kde.org/show_bug.cgi?id=200125

visibility: private → public
affects: dolphin (Ubuntu) → kdebase (Ubuntu)
Changed in kdebase (Ubuntu):
importance: Medium → Low
status: New → Triaged
Changed in kdebase:
status: Unknown → Confirmed
Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 205695 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 205860 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 206029 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 206044 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 206139 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 206286 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 206302 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 206706 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 206765 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 206899 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

@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 ;-)

Revision history for this message
In , Peter-penz19 (peter-penz19) wrote :

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... :-(

Revision history for this message
In , Peter-penz19 (peter-penz19) wrote :

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

Revision history for this message
In , Peter-penz19 (peter-penz19) wrote :

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

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 206925 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 199618 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 207009 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 198120 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 207277 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 207313 has been marked as a duplicate of this bug. ***

Changed in kdebase:
status: Confirmed → Fix Released
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Fix committed for KDE 4.3.2.

Changed in kdebase (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 207455 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 207536 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 208074 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 208240 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 208556 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 208980 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 208895 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 209166 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 209257 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 209461 has been marked as a duplicate of this bug. ***

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Fix released to Karmic, to be available via updates soon.

Changed in kdebase (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 209691 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 209958 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 211942 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 219993 has been marked as a duplicate of this bug. ***

Changed in kdebase:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.