Bug 334648 - [Frameworks] Dolphin crashes when trying to delete a file in Project Neon 5
Summary: [Frameworks] Dolphin crashes when trying to delete a file in Project Neon 5
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kjobwidgets
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.99.0
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: investigated, reproducible
: 334820 335221 335294 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-05-12 10:50 UTC by Rohan Garg
Modified: 2014-06-02 17:42 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rohan Garg 2014-05-12 10:50:20 UTC
Trying to delete a file ( local or remote ) makes dolphin crash with the following backtrace

Application: Dolphin (dolphin), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f20dd307800 (LWP 13018))]

Thread 3 (Thread 0x7f20c5a1b700 (LWP 13019)):
#0  0x00007f20dcb6dfbd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f20cf8b2b72 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f20cf8b464f in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f20c79c1b2b in QXcbEventReader::run (this=0x17a0db0) at qxcbconnection.cpp:1034
#4  0x00007f20d641ce11 in QThreadPrivate::start (arg=0x17a0db0) at thread/qthread_unix.cpp:345
#5  0x00007f20d1771182 in start_thread (arg=0x7f20c5a1b700) at pthread_create.c:312
#6  0x00007f20dcb7b30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f20bd2e7700 (LWP 13020)):
#0  0x00007f20dcb6dfbd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f20d1258fe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f20d12590ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f20d6701b57 in QEventDispatcherGlib::processEvents (this=0x7f20b80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:428
#4  0x00007f20d668827c in QEventLoop::processEvents (this=0x7f20bd2e6d90, flags=...) at kernel/qeventloop.cpp:136
#5  0x00007f20d668853d in QEventLoop::exec (this=0x7f20bd2e6d90, flags=...) at kernel/qeventloop.cpp:212
#6  0x00007f20d6415a98 in QThread::exec (this=0x198b1f0) at thread/qthread.cpp:511
#7  0x00007f20d6415c3a in QThread::run (this=0x198b1f0) at thread/qthread.cpp:578
#8  0x00007f20d641ce11 in QThreadPrivate::start (arg=0x198b1f0) at thread/qthread_unix.cpp:345
#9  0x00007f20d1771182 in start_thread (arg=0x7f20bd2e7700) at pthread_create.c:312
#10 0x00007f20dcb7b30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f20dd307800 (LWP 13018)):
[KCrash Handler]
#6  0x00007f20dcab6f79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007f20dcaba388 in __GI_abort () at abort.c:89
#8  0x00007f20d640a1a9 in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:1364
#9  0x00007f20d6407cce in QMessageLogger::fatal (this=0x7fffb7325e80, msg=0x7f20d675f3f8 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:669
#10 0x00007f20d6402440 in qt_assert (assertion=0x7f20da62afbe "job()", file=0x7f20da62af50 "/build/buildd/project-neon5-kjobwidgets-0.0+git20140512.0309+neon4~527b099~14.04/src/kdialogjobuidelegate.cpp", line=121) at global/qglobal.cpp:2124
#11 0x00007f20da618159 in KDialogJobUiDelegate::setWindow (this=0x7fffb7325f30, window=0x19a5900) at /build/buildd/project-neon5-kjobwidgets-0.0+git20140512.0309+neon4~527b099~14.04/src/kdialogjobuidelegate.cpp:121
#12 0x00007f20da910287 in KIO::JobUiDelegate::setWindow (this=0x7fffb7325f30, window=0x19a5900) at /build/buildd/project-neon5-kio-0.0+git20140512.0311+neon4~221aef7~14.04/src/widgets/jobuidelegate.cpp:131
#13 0x00007f20dc85674f in KonqOperations::askDeleteConfirmation (selectedUrls=..., method=1, confirmation=KonqOperations::DEFAULT_CONFIRMATION, widget=0x19a5900) at /build/buildd/project-neon5-kde-baseapps-0.0+git20140512.0306+neon4~66abf51~14.04/lib/konq/konq_operations.cpp:283
#14 0x00007f20dc5a07e0 in DolphinView::deleteSelectedItems (this=0x19a5900) at /build/buildd/project-neon5-kde-baseapps-0.0+git20140512.0306+neon4~66abf51~14.04/dolphin/src/views/dolphinview.cpp:686
#15 0x00007f20dc5ac998 in DolphinViewActionHandler::slotDeleteItems (this=0x18e4a60) at /build/buildd/project-neon5-kde-baseapps-0.0+git20140512.0306+neon4~66abf51~14.04/dolphin/src/views/dolphinviewactionhandler.cpp:324
#16 0x00007f20dc5b0676 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (DolphinViewActionHandler::*)()>::call(void (DolphinViewActionHandler::*)(), DolphinViewActionHandler*, void**) (f=(void (DolphinViewActionHandler::*)(DolphinViewActionHandler * const)) 0x7f20dc5ac970 <DolphinViewActionHandler::slotDeleteItems()>, o=0x18e4a60, arg=0x7fffb7326280) at /opt/project-neon5/include/QtCore/qobjectdefs_impl.h:508
#17 0x00007f20dc5b0351 in QtPrivate::FunctionPointer<void (DolphinViewActionHandler::*)()>::call<QtPrivate::List<>, void>(void (DolphinViewActionHandler::*)(), DolphinViewActionHandler*, void**) (f=(void (DolphinViewActionHandler::*)(DolphinViewActionHandler * const)) 0x7f20dc5ac970 <DolphinViewActionHandler::slotDeleteItems()>, o=0x18e4a60, arg=0x7fffb7326280) at /opt/project-neon5/include/QtCore/qobjectdefs_impl.h:527
#18 0x00007f20dc5afa11 in QtPrivate::QSlotObject<void (DolphinViewActionHandler::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x18e6550, r=0x18e4a60, a=0x7fffb7326280, ret=0x0) at /opt/project-neon5/include/QtCore/qobject_impl.h:151
#19 0x00007f20d66cfe33 in QtPrivate::QSlotObjectBase::call (this=0x18e6550, r=0x18e4a60, a=0x7fffb7326280) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:132
#20 0x00007f20d66cd152 in QMetaObject::activate (sender=0x18e5e70, signalOffset=3, local_signal_index=1, argv=0x7fffb7326280) at kernel/qobject.cpp:3666
#21 0x00007f20d66cca58 in QMetaObject::activate (sender=0x18e5e70, m=0x7f20d7db2a60 <QAction::staticMetaObject>, local_signal_index=1, argv=0x7fffb7326280) at kernel/qobject.cpp:3546
#22 0x00007f20d75739f0 in QAction::triggered (this=0x18e5e70, _t1=false) at .moc/moc_qaction.cpp:359
#23 0x00007f20d7572eba in QAction::activate (this=0x18e5e70, event=QAction::Trigger) at kernel/qaction.cpp:1175
#24 0x00007f20d7572c6d in QAction::event (this=0x18e5e70, e=0x7fffb73267e0) at kernel/qaction.cpp:1103
#25 0x00007f20d7582232 in QApplicationPrivate::notify_helper (this=0x1786cf0, receiver=0x18e5e70, e=0x7fffb73267e0) at kernel/qapplication.cpp:3501
#26 0x00007f20d757f87a in QApplication::notify (this=0x7fffb7327130, receiver=0x18e5e70, e=0x7fffb73267e0) at kernel/qapplication.cpp:2954
#27 0x00007f20d668b544 in QCoreApplication::notifyInternal (this=0x7fffb7327130, receiver=0x18e5e70, event=0x7fffb73267e0) at kernel/qcoreapplication.cpp:935
#28 0x00007f20d6d1f859 in QCoreApplication::sendEvent (receiver=0x18e5e70, event=0x7fffb73267e0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:237
#29 0x00007f20d6d53766 in QShortcutMap::dispatchEvent (this=0x1786dc8, e=0x7fffb7326c90) at kernel/qshortcutmap.cpp:689
#30 0x00007f20d6d527ad in QShortcutMap::tryShortcutEvent (this=0x1786dc8, o=0x19a14a0, e=0x7fffb7326c90) at kernel/qshortcutmap.cpp:360
#31 0x00007f20d757f798 in QApplication::notify (this=0x7fffb7327130, receiver=0x1abf1d0, e=0x7fffb7326c90) at kernel/qapplication.cpp:2937
#32 0x00007f20d668b544 in QCoreApplication::notifyInternal (this=0x7fffb7327130, receiver=0x1abf1d0, event=0x7fffb7326c90) at kernel/qcoreapplication.cpp:935
#33 0x00007f20d6d1f8b3 in QCoreApplication::sendSpontaneousEvent (receiver=0x1abf1d0, event=0x7fffb7326c90) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:240
#34 0x00007f20d6d1986a in QGuiApplicationPrivate::processKeyEvent (e=0x1e31f80) at kernel/qguiapplication.cpp:1803
#35 0x00007f20d6d18666 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1e31f80) at kernel/qguiapplication.cpp:1508
#36 0x00007f20d6d02e41 in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:579
#37 0x00007f20c7a1a3a6 in userEventSourceDispatch (source=0x17d4220) at eventdispatchers/qeventdispatcher_glib.cpp:78
#38 0x00007f20d1258e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007f20d1259048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007f20d12590ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007f20d6701b37 in QEventDispatcherGlib::processEvents (this=0x17de2b0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#42 0x00007f20c7a1a5b8 in QPAEventDispatcherGlib::processEvents (this=0x17de2b0, flags=...) at eventdispatchers/qeventdispatcher_glib.cpp:123
#43 0x00007f20d668827c in QEventLoop::processEvents (this=0x7fffb7327000, flags=...) at kernel/qeventloop.cpp:136
#44 0x00007f20d668853d in QEventLoop::exec (this=0x7fffb7327000, flags=...) at kernel/qeventloop.cpp:212
#45 0x00007f20d668bbfc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1188
#46 0x00007f20d6d183f0 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1436
#47 0x00007f20d757f09b in QApplication::exec () at kernel/qapplication.cpp:2746
#48 0x00007f20dceb2ddb in kdemain (argc=5, argv=0x7fffb7327268) at /build/buildd/project-neon5-kde-baseapps-0.0+git20140512.0306+neon4~66abf51~14.04/dolphin/src/main.cpp:95
#49 0x000000000040093f in main (argc=5, argv=0x7fffb7327268) at /build/buildd/project-neon5-kde-baseapps-0.0+git20140512.0306+neon4~66abf51~14.04/obj-x86_64-linux-gnu/dolphin/src/dolphin_dummy.cpp:3


Reproducible: Always

Steps to Reproduce:
1. Try to delete a file
2. Dolphin crashes
Comment 1 Frank Reininghaus 2014-05-15 14:45:07 UTC
*** Bug 334820 has been marked as a duplicate of this bug. ***
Comment 2 Frank Reininghaus 2014-05-20 14:00:44 UTC
I'll reassign to kjobwidgets - it contains the function KDialogJobUiDelegate::setWindow(QWidget*), where this assert is hit:

Q_ASSERT(job());

The KDE 4.x version of that function does not have the assert as far as I can see.

If the assert is wanted (is it?), then the client code which uses that function must be changed. I haven't written the code in KIO and lib/konq that uses KDialogJobUiDelegate, but it seems that it has always used the class without a job to ask for delete confirmations.

(And moreover, I do not see any way at first sight how a user of these functions/classes could achieve that there is a job when asking for a delete confirmation).

(In reply to comment #0)
> #10 0x00007f20d6402440 in qt_assert (assertion=0x7f20da62afbe "job()",
> file=0x7f20da62af50
> "/build/buildd/project-neon5-kjobwidgets-0.0+git20140512.
> 0309+neon4~527b099~14.04/src/kdialogjobuidelegate.cpp", line=121) at
> global/qglobal.cpp:2124
> #11 0x00007f20da618159 in KDialogJobUiDelegate::setWindow
> (this=0x7fffb7325f30, window=0x19a5900) at
> /build/buildd/project-neon5-kjobwidgets-0.0+git20140512.
> 0309+neon4~527b099~14.04/src/kdialogjobuidelegate.cpp:121
Comment 3 Frank Reininghaus 2014-05-20 14:07:36 UTC
@David: you added the assert in

https://git.reviewboard.kde.org/r/111081/

http://quickgit.kde.org/?p=kdelibs.git&a=commit&h=119b6630f8403262f9a8e0cb2ee408a3cc803e54

Maybe you can have a look?
Comment 4 Frank Reininghaus 2014-05-22 20:54:38 UTC
*** Bug 335221 has been marked as a duplicate of this bug. ***
Comment 5 Frank Reininghaus 2014-05-25 08:55:54 UTC
*** Bug 335294 has been marked as a duplicate of this bug. ***
Comment 6 Romário Rios 2014-05-30 12:58:38 UTC
I've also experienced the same problem. I'm running openSUSE 13.1.

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

Thread 3 (Thread 0x7fc0323c2700 (LWP 9145)):
#0  0x00007fc04716db3d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fc039d840e2 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007fc039d8577f in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007fc0340edd59 in QXcbEventReader::run (this=0xf7a010) at qxcbconnection.cpp:1034
#4  0x00007fc040e1106f in QThreadPrivate::start (arg=0xf7a010) at thread/qthread_unix.cpp:345
#5  0x00007fc03c2760db in start_thread (arg=0x7fc0323c2700) at pthread_create.c:309
#6  0x00007fc04717690d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7fc02d615700 (LWP 9146)):
#0  0x00007fc04716db3d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fc03bd65604 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fc03bd6570c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fc04104677b in QEventDispatcherGlib::processEvents (this=0x1384340, flags=...) at kernel/qeventdispatcher_glib.cpp:428
#4  0x00007fc040fed95b in QEventLoop::exec (this=this@entry=0x7fc02d614d50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007fc040e0c3aa in QThread::exec (this=<optimized out>) at thread/qthread.cpp:511
#6  0x00007fc040e1106f in QThreadPrivate::start (arg=0x1316660) at thread/qthread_unix.cpp:345
#7  0x00007fc03c2760db in start_thread (arg=0x7fc02d615700) at pthread_create.c:309
#8  0x00007fc04717690d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7fc0478c1880 (LWP 9144)):
[KCrash Handler]
#6  QObject::setProperty (this=this@entry=0x0, name=name@entry=0x7fc044d72415 "widget", value=...) at kernel/qobject.cpp:3789
#7  0x00007fc044d6526b in KJobWidgets::setWindow (job=0x0, widget=0x1240fc0) at /usr/src/debug/kjobwidgets-4.99.0git~20140512~47c7564/src/kjobwidgets.cpp:29
#8  0x00007fc04506317c in KIO::JobUiDelegate::setWindow(QWidget*) () from /usr/lib64/libKF5KIOWidgets.so.5
#9  0x00007fc046e738f0 in KonqOperations::askDeleteConfirmation(KUrl::List const&, int, KonqOperations::ConfirmationType, QWidget*) () from /opt/kf5/lib64/libkonq.so.SOVERSION
#10 0x00007fc046bede61 in DolphinView::deleteSelectedItems() () from /opt/kf5/lib64/libdolphinprivate.so.SOVERSION
#11 0x00007fc04101e4a3 in call (a=0x7fff7d0f01b0, r=0x1072380, this=0x1073a00) at ../../src/corelib/kernel/qobject_impl.h:132
#12 QMetaObject::activate (sender=sender@entry=0x106a2b0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff7d0f01b0) at kernel/qobject.cpp:3666
#13 0x00007fc04101ee57 in QMetaObject::activate (sender=sender@entry=0x106a2b0, m=m@entry=0x7fc0425cdec0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff7d0f01b0) at kernel/qobject.cpp:3546
#14 0x00007fc041f0ba02 in QAction::triggered (this=this@entry=0x106a2b0, _t1=false) at .moc/moc_qaction.cpp:359
#15 0x00007fc041f0def8 in QAction::activate (this=0x106a2b0, event=<optimized out>) at kernel/qaction.cpp:1175
#16 0x00007fc041f0e024 in QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1103
#17 0x00007fc041f12ecc in QApplicationPrivate::notify_helper (this=this@entry=0xf60700, receiver=receiver@entry=0x106a2b0, e=e@entry=0x7fff7d0f0470) at kernel/qapplication.cpp:3501
#18 0x00007fc041f17c46 in QApplication::notify (this=0x7fff7d0f0b40, receiver=0x106a2b0, e=0x7fff7d0f0470) at kernel/qapplication.cpp:3284
#19 0x00007fc040fefa45 in QCoreApplication::notifyInternal (this=0x7fff7d0f0b40, receiver=0x106a2b0, event=event@entry=0x7fff7d0f0470) at kernel/qcoreapplication.cpp:935
#20 0x00007fc0417d2281 in sendEvent (event=0x7fff7d0f0470, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:237
#21 QShortcutMap::dispatchEvent (this=this@entry=0xf607d8, e=e@entry=0x7fff7d0f0730) at kernel/qshortcutmap.cpp:689
#22 0x00007fc0417d239c in QShortcutMap::tryShortcutEvent (this=0xf607d8, o=<optimized out>, e=e@entry=0x7fff7d0f0730) at kernel/qshortcutmap.cpp:360
#23 0x00007fc041f17b06 in QApplication::notify (this=0x7fff7d0f0b40, receiver=0x1336410, e=0x7fff7d0f0730) at kernel/qapplication.cpp:2937
#24 0x00007fc040fefa45 in QCoreApplication::notifyInternal (this=0x7fff7d0f0b40, receiver=receiver@entry=0x1336410, event=event@entry=0x7fff7d0f0730) at kernel/qcoreapplication.cpp:935
#25 0x00007fc0417a387b in sendSpontaneousEvent (event=0x7fff7d0f0730, receiver=0x1336410) at ../../src/corelib/kernel/qcoreapplication.h:240
#26 QGuiApplicationPrivate::processKeyEvent (e=0x11e7830) at kernel/qguiapplication.cpp:1813
#27 0x00007fc0417a7b75 in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0x11e7830) at kernel/qguiapplication.cpp:1518
#28 0x00007fc04178e8a8 in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:579
#29 0x00007fc034128170 in userEventSourceDispatch (source=<optimized out>) at eventdispatchers/qeventdispatcher_glib.cpp:78
#30 0x00007fc03bd65316 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#31 0x00007fc03bd65668 in ?? () from /usr/lib64/libglib-2.0.so.0
#32 0x00007fc03bd6570c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#33 0x00007fc04104675c in QEventDispatcherGlib::processEvents (this=0xf66270, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#34 0x00007fc040fed95b in QEventLoop::exec (this=this@entry=0x7fff7d0f0a00, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#35 0x00007fc040ff4fb6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1188
#36 0x00007fc04749effb in kdemain () from /opt/kf5/lib64/libkdeinit4_dolphin.so
#37 0x00007fc0470b0be5 in __libc_start_main (main=0x400830 <main>, argc=5, argv=0x7fff7d0f0c78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff7d0f0c68) at libc-start.c:269
#38 0x0000000000400861 in _start ()
Comment 7 Frank Reininghaus 2014-05-30 13:18:47 UTC
Thanks, but I think that further backtraces are not needed - it seems pretty clear why the crash happens.

FWIW, I proposed a patch for kjobwidgets that fixes the issue some time ago, but I'm not sure if it's the 'correct' approach: https://git.reviewboard.kde.org/r/118269/
Comment 8 David Faure 2014-06-01 15:31:22 UTC
Git commit cb08c792826a698080e2a74f0a033c3a8dd86411 by David Faure.
Committed on 01/06/2014 at 15:28.
Pushed by dfaure into branch 'master'.

Make window()/setWindow() work without a job, for the case of askDeleteConfirmation

M  +14   -5    src/kdialogjobuidelegate.cpp

http://commits.kde.org/kjobwidgets/cb08c792826a698080e2a74f0a033c3a8dd86411
Comment 9 Luiz Angelo De Luca 2014-06-02 17:42:05 UTC
Confirming the fix. Thanks