Bug 309421

Summary: accidently draged file to places while renaming
Product: dolphin Reporter: ruben.mueller
Component: view-engine: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: adotfive, FirasHanife
Priority: NOR Keywords: reproducible
Version: 2.1   
Target Milestone: ---   
Platform: Ubuntu Packages   
OS: Linux   
Latest Commit: Version Fixed In: 4.9.4
Attachments: New crash information added by DrKonqi

Description ruben.mueller 2012-11-02 13:22:08 UTC
Application: dolphin (2.1)
KDE Platform Version: 4.9.2
Qt Version: 4.8.3
Operating System: Linux 3.5.0-17-generic x86_64
Distribution: Ubuntu 12.10

-- Information about the crash:
- What I was doing when the application crashed:

accidently draged file to places while renaming
but hit esc to prevent this.

I decided not to send as duplicate as the other bug seemed to be fixed in
4.8.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f6600aab780 (LWP 2512))]

Thread 4 (Thread 0x7f65f9651700 (LWP 2514)):
#0  0x00007f6613442303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f660ab8cd84 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f660ab8cea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f661022fc16 in QEventDispatcherGlib::processEvents (this=0x7f65f40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f66102002bf in QEventLoop::processEvents (this=this@entry=0x7f65f9650dd0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f6610200548 in QEventLoop::exec (this=0x7f65f9650dd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f6610101b10 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f66101e09af in QInotifyFileSystemWatcherEngine::run (this=0x1b2adf0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f6610104aec in QThreadPrivate::start (arg=0x1b2adf0) at thread/qthread_unix.cpp:338
#9  0x00007f660b453e9a in start_thread (arg=0x7f65f9651700) at pthread_create.c:308
#10 0x00007f661344dcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f65f3fff700 (LWP 2515)):
#0  0x00007f6613442303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f660ab8cd84 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f660ab8cea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f661022fc16 in QEventDispatcherGlib::processEvents (this=0x7f65ec0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f66102002bf in QEventLoop::processEvents (this=this@entry=0x7f65f3ffedd0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f6610200548 in QEventLoop::exec (this=0x7f65f3ffedd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f6610101b10 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f66101e09af in QInotifyFileSystemWatcherEngine::run (this=0x2028060) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f6610104aec in QThreadPrivate::start (arg=0x2028060) at thread/qthread_unix.cpp:338
#9  0x00007f660b453e9a in start_thread (arg=0x7f65f3fff700) at pthread_create.c:308
#10 0x00007f661344dcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f65f2f37700 (LWP 2519)):
#0  0x00007f6613442303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f660ab8cd84 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f660ab8cea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f661022fc16 in QEventDispatcherGlib::processEvents (this=0x7f65e40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f66102002bf in QEventLoop::processEvents (this=this@entry=0x7f65f2f36dd0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f6610200548 in QEventLoop::exec (this=0x7f65f2f36dd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f6610101b10 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f66101e09af in QInotifyFileSystemWatcherEngine::run (this=0x243a510) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f6610104aec in QThreadPrivate::start (arg=0x243a510) at thread/qthread_unix.cpp:338
#9  0x00007f660b453e9a in start_thread (arg=0x7f65f2f37700) at pthread_create.c:308
#10 0x00007f661344dcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f6600aab780 (LWP 2512)):
[KCrash Handler]
#6  QTextEdit::mouseMoveEvent (this=0x27e8120, e=0x7fff1835b9c0) at ../../include/QtGui/private/../../../src/gui/image/qpixmapfilter_p.h:149
#7  0x00007f660f37d884 in QWidget::event (this=0x27e8120, event=0x7fff1835b9c0) at kernel/qwidget.cpp:8356
#8  0x00007f660f72cb66 in QFrame::event (this=0x27e8120, e=0x7fff1835b9c0) at widgets/qframe.cpp:557
#9  0x00007f66102016d6 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0x2518720, event=0x7fff1835b9c0) at kernel/qcoreapplication.cpp:1025
#10 0x00007f660f32de6c in QApplicationPrivate::notify_helper (this=this@entry=0x1a97d20, receiver=receiver@entry=0x2518720, e=e@entry=0x7fff1835b9c0) at kernel/qapplication.cpp:4558
#11 0x00007f660f332b6b in QApplication::notify (this=<optimized out>, receiver=0x2518720, e=0x7fff1835b9c0) at kernel/qapplication.cpp:4105
#12 0x00007f6610c3f1d6 in KApplication::notify (this=0x7fff1835c650, receiver=0x2518720, event=0x7fff1835b9c0) at ../../kdeui/kernel/kapplication.cpp:311
#13 0x00007f661020156e in QCoreApplication::notifyInternal (this=0x7fff1835c650, receiver=0x2518720, event=0x7fff1835b9c0) at kernel/qcoreapplication.cpp:915
#14 0x00007f660f32ecd3 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#15 QApplicationPrivate::sendMouseEvent (receiver=0x2518720, event=0x7fff1835b9c0, alienWidget=0x2518720, nativeWidget=0x2581830, buttonDown=0x7f660fe0a308 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3173
#16 0x00007f660f3ac554 in QETWidget::translateMouseEvent (this=this@entry=0x2581830, event=event@entry=0x7fff1835c140) at kernel/qapplication_x11.cpp:4622
#17 0x00007f660f3ab44f in QApplication::x11ProcessEvent (this=0x7fff1835c650, event=0x7fff1835c140) at kernel/qapplication_x11.cpp:3737
#18 0x00007f660f3d2fa2 in x11EventSourceDispatch (s=0x1a93af0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#19 0x00007f660ab8cab5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007f660ab8cde8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007f660ab8cea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007f661022fbf6 in QEventDispatcherGlib::processEvents (this=0x1a5ab10, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#23 0x00007f660f3d2c1e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#24 0x00007f66102002bf in QEventLoop::processEvents (this=this@entry=0x7fff1835c510, flags=...) at kernel/qeventloop.cpp:149
#25 0x00007f6610200548 in QEventLoop::exec (this=0x7fff1835c510, flags=...) at kernel/qeventloop.cpp:204
#26 0x00007f6610205708 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#27 0x00007f6613767907 in kdemain () from /usr/lib/kde4/libkdeinit/libkdeinit4_dolphin.so
#28 0x00007f661337b76d in __libc_start_main (main=0x4006a0, argc=5, ubp_av=0x7fff1835c788, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff1835c778) at libc-start.c:226
#29 0x00000000004006d1 in _start ()

Possible duplicates by query: bug 268533, bug 267850, bug 262675, bug 237717.

Reported using DrKonqi
Comment 1 Frank Reininghaus 2012-11-04 18:20:42 UTC
Thanks for the bug report! I can confirm this crash. It's somewhat related to bug 308018 - the KItemListRoleEditor (the object which handles inline renaming) gets deleted in a nested event loop which is run inside one of its functions. As soon as we return from the loop, we get a crash. I might have an idea how to fix this.
Comment 2 Frank Reininghaus 2012-11-05 21:09:53 UTC
Git commit 951cb9c35d7a9ef814b3de5b359915968da9b881 by Frank Reininghaus.
Committed on 05/11/2012 at 22:03.
Pushed by freininghaus into branch 'KDE/4.9'.

Prevent crashes caused by nested event loops run when renaming inline

When renaming inline and starting a drag or invoking the context menu,
a nested event loop will be run. If the role editor loses focus and
emits roleEditingFinished(), we must prevent that deleteLater() is
called because this would delete the role editor inside a nested event
loop which is run from one of its own functions. We would get a crash
when returning from that event loop otherwise.
Related: bug 308018
FIXED-IN: 4.9.4

M  +9    -2    dolphin/src/kitemviews/kstandarditemlistwidget.cpp
M  +47   -2    dolphin/src/kitemviews/private/kitemlistroleeditor.cpp
M  +12   -0    dolphin/src/kitemviews/private/kitemlistroleeditor.h

http://commits.kde.org/kde-baseapps/951cb9c35d7a9ef814b3de5b359915968da9b881
Comment 3 Firas Hanife 2012-11-05 21:46:31 UTC
Created attachment 75035 [details]
New crash information added by DrKonqi

dolphin (2.1) on KDE Platform 4.9.2 using Qt 4.8.3

- What I was doing when the application crashed:
I was renaming a file when I accidently dragged it into the left side bar and the application crashed

-- Backtrace (Reduced):
#5  0x00007f79eea7ee21 in QTextEdit::mouseMoveEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4
#6  0x00007f79ee66bf24 in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#7  0x00007f79eea16626 in QFrame::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#8  0x00007f79ef48dc66 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#9  0x00007f79ee61c73c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
Comment 4 Frank Reininghaus 2012-11-28 13:07:37 UTC
*** Bug 310801 has been marked as a duplicate of this bug. ***
Comment 5 Frank Reininghaus 2012-12-09 13:36:33 UTC
Unfortunately, it still does not always work as expected in KDE 4.9.4 (see bug 311409). Sometimes, the drag does not stop when dropping the text on the Places Panel.