Bug 168427 - Buggy endless "Move file" dialog when Undo Trash of non-existant file
Summary: Buggy endless "Move file" dialog when Undo Trash of non-existant file
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: David Faure
: 172171 184772 206519 219627 (view as bug list)
Depends on:
Reported: 2008-08-05 16:32 UTC by Dario Andres
Modified: 2010-06-04 22:11 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:

Screenshot showing the dialog bug and Dolphin window "Unable to move ... " message (113.69 KB, image/jpeg)
2008-08-05 16:33 UTC, Dario Andres

Note You need to log in before you can comment on or make changes to this bug.
Description Dario Andres 2008-08-05 16:32:16 UTC
Version:           Using KDE 4.1.1 (KDE 4.1.0 (4.1 >= 20080722)) (KDEmod) in ArchLinux i686 (using KDE 4.1.0)
Installed from:    Unlisted Binary Package
Compiler:          gcc 
OS:                Linux

Dolphin/Konqueror BUG: trying to undo trash of non-existant file (already deleted with "Empty Trash")
Crash when trying to Pause/Suspend or Cancel the buggy endless "Move file" dialog

Steps to reproduce

- Empty the trashcan

- Open a Dolphin window and move to trash some file.
- (an "Undo: Trash" action will appear in the "Edit" menu of that window)
- Now Empty the Trash again (from ANOTHER Dolphin window or from the TrashCan plasmoid)
- The "Undo Trash" action in menu remains there, (but the file isn't in the trashcan anymore)
- Selecting the "Undo Trash" action will popup a buggy "Move file" dialog that never ends.
(also the message "Could not rename file /home/user/.local/share/Trash/files/deletedfilename" will appear in Dolphin statusbar)
Cancelling or pausing/suspending the dialog will result in Dolphin/Konqueror crashing

See the screenshot for more details

Here are the backtraces:
When cancelling:

Aplicación: Dolphin (dolphin), señal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb62ad700 (LWP 4938)]
[KCrash handler]
#6  0xb70da350 in typeinfo for QPixmapData () from /usr/lib/libQtGui.so.4
#7  0xb77d0249 in KJob::kill (this=0x9fa21f0, verbosity=KJob::EmitResult)
    at /home/jan/Source/packages/kde41/work/kdelibs/src/kdelibs-4.1.0/kdecore/jobs/kjob.cpp:106
#8  0xb7b9e4df in KAbstractWidgetJobTracker::slotStop (this=0x9fee438, 
    at /home/jan/Source/packages/kde41/work/kdelibs/src/kdelibs-4.1.0/kdeui/jobs/kabstractwidgetjobtracker.cpp:80
#9  0xb7ba0caf in KWidgetJobTracker::Private::ProgressWidget::_k_stop (
    at /home/jan/Source/packages/kde41/work/kdelibs/src/kdelibs-4.1.0/kdeui/jobs/kwidgetjobtracker.cpp:642
#10 0xb7ba0d25 in KWidgetJobTracker::Private::ProgressWidget::qt_metacall (
    this=0x9fea468, _c=QMetaObject::InvokeMetaMethod, _id=13, _a=0xbff4df8c)
    at /home/jan/Source/packages/kde41/work/kdelibs/src/build/kdeui/kwidgetjobtracker_p.moc:101
#11 0xb760b8d7 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0xb760bbb9 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#13 0xb70240a6 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
#14 0xb6dd75f8 in ?? () from /usr/lib/libQtGui.so.4
#15 0x09bb39a8 in ?? ()
#16 0x00000000 in ?? ()
#0  0xb8034424 in __kernel_vsyscall ()

When pausing/suspending:

Aplicación: Dolphin (dolphin), señal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb621d700 (LWP 4997)]
[KCrash handler]
#6  KJob::suspend (this=0x8483f38)
    at /home/jan/Source/packages/kde41/work/kdelibs/src/kdelibs-4.1.0/kdecore/jobs/kjob.cpp:134
#7  0xb7b0e4a1 in KAbstractWidgetJobTracker::slotSuspend (this=0x86b0480, 
    at /home/jan/Source/packages/kde41/work/kdelibs/src/kdelibs-4.1.0/kdeui/jobs/kabstractwidgetjobtracker.cpp:86
#8  0xb7b0e79a in KWidgetJobTracker::Private::ProgressWidget::_k_pauseResumeClicked (this=0x8269998)
    at /home/jan/Source/packages/kde41/work/kdelibs/src/kdelibs-4.1.0/kdeui/jobs/kwidgetjobtracker.cpp:633
#9  0xb7b10d32 in KWidgetJobTracker::Private::ProgressWidget::qt_metacall (
    this=0x8269998, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0xbfebfeec)
    at /home/jan/Source/packages/kde41/work/kdelibs/src/build/kdeui/kwidgetjobtracker_p.moc:100
#10 0xb757b8d7 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0xb757bbb9 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0xb6f940a6 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
#13 0xb6d475f8 in ?? () from /usr/lib/libQtGui.so.4
#14 0x08280538 in ?? ()
#15 0x00000000 in ?? ()
#0  0xb7fa4424 in __kernel_vsyscall ()

IMPORTANT: Konqueror will do the same, except that the "Unable to move" message will appear as a popup message box instead of appearing in the statusbar


So this is a KIO/KJob bug combined with some Dolphin/Konqueror bug (available non-sense action (undete some non-existant file)) I don't know if the last will be easy to "fix".
Comment 1 Dario Andres 2008-08-05 16:33:01 UTC
Created attachment 26651 [details]
Screenshot showing the dialog bug and Dolphin window "Unable to move ... " message
Comment 2 Dario Andres 2008-08-05 16:35:53 UTC
With "Unable to move ... " message I meant "Could not rename"
Comment 3 George Kiagiadakis 2008-08-08 09:52:23 UTC

*** This bug has been marked as a duplicate of 168691 ***
Comment 4 Rafael Fernández López 2008-08-10 16:34:04 UTC
This is not a duplicate despite they have the same/similar backtraces. The issue is a different one.
Comment 5 Rafael Fernández López 2008-08-13 01:39:45 UTC
SVN commit 846100 by ereslibre:

Simplify the list of urls when needed (moving, trashing, deleting). I am okay with a method renaming.

BUG: 168691
BUG: 168427
CCMAIL: peter.penz@gmx.at
CCMAIL: faure@kde.org

 M  +2 -0      konq_operations.cpp  
 M  +22 -1     konqmimedata.cpp  
 M  +12 -0     konqmimedata.h  

WebSVN link: http://websvn.kde.org/?view=rev&revision=846100
Comment 6 Dario Andres 2008-10-29 01:02:35 UTC
I've discovered another situation that triggers this crash (may not be related) (I'm using KDE 4.1.2 but this bugfix wasn't backported to the 4.1branch)

- Open Dolphin, using the right click , create a new empty file.
(An Undo copy operation will appear in the Edit menu)
- Rename that file.
- Go to Edit / Undo: Copy File

A prompt dialog will appear : "Do you really want to delete this item? /path/Text File"

If you click "Delete", a buggy endless move dialog will appear, and a message "File X doesn't exists" will appear in Dolphin statusbar.

When you cancel this dialog , Dolphin crashes.

The backtrace is the same:

Aplicación: Dolphin (dolphin), señal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb5f2e700 (LWP 3800)]
[KCrash handler]
#6  0x00000000 in ?? ()
#7  0xb7be3093 in KJob::kill (this=0x8892150, verbosity=KJob::EmitResult)
    at /home/jan/Dev/packages/kdemod-core/work/kdelibs/src/kdelibs-4.1.2/kdecore/jobs/kjob.cpp:106
#8  0xb795d7eb in KAbstractWidgetJobTracker::slotStop (this=0x86b7fd8, 
    at /home/jan/Dev/packages/kdemod-core/work/kdelibs/src/kdelibs-4.1.2/kdeui/jobs/kabstractwidgetjobtracker.cpp:80
#9  0xb79602b3 in KWidgetJobTracker::Private::ProgressWidget::_k_stop (
    at /home/jan/Dev/packages/kdemod-core/work/kdelibs/src/kdelibs-4.1.2/kdeui/jobs/kwidgetjobtracker.cpp:642
#10 0xb796034b in KWidgetJobTracker::Private::ProgressWidget::qt_metacall (
    this=0x86d3af0, _c=QMetaObject::InvokeMetaMethod, _id=13, _a=0xbf83c07c)
    at /home/jan/Dev/packages/kdemod-core/work/kdelibs/src/build/kdeui/kwidgetjobtracker_p.moc:101
#11 0xb7e93b03 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0xb7e93dd1 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#13 0xb709c6d2 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
#14 0xb6e298ca in ?? () from /usr/lib/libQtGui.so.4
#15 0x088846e0 in ?? ()
#16 0x00000000 in ?? ()
#0  0xb7f22424 in __kernel_vsyscall ()
Comment 7 Dario Andres 2008-12-13 18:58:01 UTC
I can reproduce this bug using current trunk:

Qt: 4.4.3
KDE: 4.1.85 (KDE 4.1.85 (KDE 4.2 Beta2))
kdelibs svn rev. 896338 / kdebase svn rev. 896338

But, because now is Plasma which displays the progress info dialog/plasmoid in the Systray plasmoid, the buggy move "dialog/plasmoid/extender" remains and clicking "pause" or "stop" do nothing (I ended with a plasma crash, but it's unrelated)
Comment 8 David Faure 2008-12-15 10:54:44 UTC
The buggy plasmoid is not my responsibility ;-)
Comment 9 Dario Andres 2008-12-15 11:44:39 UTC
@David: yes, I know, but, the "action" (to Move an non-existant file) isn't created in Dolphin ? (the question is: Which component is the responsible of validating the "actions" to avoid this type of errors?)
I think the "notification" plasmoid only shows what it is forced to show. (by other components)
Thanks :)
Comment 10 Davide Bettio 2008-12-22 20:44:27 UTC
This is a KIO bug.
Comment 11 Dario Andres 2009-01-04 20:16:11 UTC
I can still reproduce this bug here using:

Qt: 4.4.3 + qt-copy-patches-889120
KDE: 4.1.87 (KDE 4.1.87 (KDE 4.2 >= 20090101))
kdelibs svn rev. 905636 / kdebase svn rev. 905636
on ArchLinux x86_64 - Kernel

Plasma can now stop/pause file operations, however, it can't cancel this buggy operation, and the "Moving" plasmoid remains there.(but it doesn't trigger a crash)

@Peter: can the original buggy action (to Undo a Trash from an already deleted file) be sanitized from Dolphin ?
Comment 12 Peter Penz 2009-01-04 20:45:46 UTC
> @Peter: can the original buggy action (to Undo a Trash
> from an already deleted file) be sanitized from Dolphin ?

Only with some ugly workarounds that should not be added in my opinion...

I can reproduce the issue mentioned in comment #6 when inline renaming is used. The issue here is that no undo action will be generated for the renaming operation. Hm, this is tricky to solve as inline renaming is done in KFileItemDelegate (kdelibs) and there is no access to KonqOperations::rename() (which adds the operation to the undo queue). I'll need to take a look on this, but this is out of scope of the original report (I've opened a new bug 179642).
Comment 13 Dario Andres 2009-01-04 20:48:14 UTC
And what about the steps in comment 0 (different situation), I can reproduce the bug using that steps too.
Anyways, thanks for looking into this :)
Comment 14 Peter Penz 2009-01-04 21:03:19 UTC
Yes, I can also reproduce the issue on trunk with the steps in comment 0, but this requires some "David Faure magic" ;-) I get a similar backtrace like in comment 0.
Comment 15 Dario Andres 2009-02-09 22:23:16 UTC
There are some similar bugs (the same crash situation: canceling an invalid operation file-dialog):
bug 171415, bug 172171, bug 179883

Not sure how to handle them. May be filing a new bug report for kdelibs or kio to report the root of the issue.
Comment 16 Dario Andres 2009-02-18 21:10:32 UTC
*** Bug 184772 has been marked as a duplicate of this bug. ***
Comment 17 Dario Andres 2009-02-18 23:14:36 UTC
Still valid here using:

Qt: 4.5.0-rc1
KDE: 4.2.63 (KDE 4.2.63 (KDE 4.3 >= 20090212))
kdelibs svn rev. 927117 / kdebase svn rev. 927117
on ArchLinux i686 - Kernel
Comment 18 Dario Andres 2009-05-07 00:25:55 UTC
Here using:

Qt: 4.5.1 (qt-copy  960517)
KDE: 4.2.71 (KDE 4.2.71 (KDE 4.3 >= 20090428))
kdelibs svn rev. 963904 / kdebase svn rev. 963904
on ArchLinux i686 - Kernel

Now, stopping the buggy operation from the Plasma notification doesn't crash Plasma but crashes Dolphin with a different backtrace (involving KUiServerJobTracker::Private::_k_killJob)
Comment 19 lerdo 2009-09-07 00:59:46 UTC
*** Bug 206519 has been marked as a duplicate of this bug. ***
Comment 20 Dario Andres 2009-12-22 14:21:13 UTC
It seems that can be also reproduced from Plasma.

- Have a Trash widget and a FolderView widget in your Desktop
- Create a file in the FolderView
- Move it to trash
- Click on the Trash widget and select Empty
The trash is now empty
- Right click on the FolderView and select "Undo Trash"
An error message appears, Click OK
The buggy endless dialog appears
- If you stop it, Plasma crashes with the backtrace detailed at bug 219627

Comment 21 Dario Andres 2009-12-22 14:21:14 UTC
*** Bug 219627 has been marked as a duplicate of this bug. ***
Comment 22 Aaron J. Seigo 2010-06-04 22:07:34 UTC
*** Bug 172171 has been marked as a duplicate of this bug. ***
Comment 23 Aaron J. Seigo 2010-06-04 22:11:28 UTC
with my last commits to kdelibs/kdeui/jobs/ this is no longer reproducable. rejoice! :) if anyone can reproduce it after an update there, please let me know (with an updated backtrace), but it no longer happens here. yay! :)