Bug 247618 - Dolphin crash (Multiple windows open & file transfer)
Summary: Dolphin crash (Multiple windows open & file transfer)
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords: investigated, reproducible
: 243985 245653 245878 246805 247459 247822 247849 247988 248276 249304 249514 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-13 10:03 UTC by Josh
Modified: 2010-09-01 21:41 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.5.1


Attachments
Use a QPointer for DolphinView's m_selectionModel member (1.59 KB, patch)
2010-08-19 11:21 UTC, Frank Reininghaus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josh 2010-08-13 10:03:58 UTC
Application: dolphin (1.5)
KDE Platform Version: 4.5.00 (KDE 4.5.0)
Qt Version: 4.7.0
Operating System: Linux 2.6.32-24-generic x86_64
Distribution: Ubuntu 10.04.1 LTS

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

I started a transfer from an external hard drive to my local disk ~5 minutes before the crash.  When the crash occured, I had 2 Dolphin windows open.  The transfer was unaffected by the crash.

The crash does not seem to be reproducible.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f71c0789760 (LWP 1778))]

Thread 2 (Thread 0x7f71ab4a7710 (LWP 1781)):
#0  0x00007f71c005ff83 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f71b7be84a9 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f71b7be88fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f71bc45abd6 in QEventDispatcherGlib::processEvents (this=0xdcdb40, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:414
#4  0x00007f71bc42d7b2 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5  0x00007f71bc42db9c in QEventLoop::exec (this=0x7f71ab4a6db0, flags=) at kernel/qeventloop.cpp:201
#6  0x00007f71bc33923d in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f71bc40d6d8 in QInotifyFileSystemWatcherEngine::run (this=0xdcff70) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f71bc33c1be in QThreadPrivate::start (arg=0xdcff70) at thread/qthread_unix.cpp:266
#9  0x00007f71ba16e9ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#10 0x00007f71c006c6fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f71c0789760 (LWP 1778)):
[KCrash Handler]
#6  indexOfMethodRelative<4> (baseObject=0x7fff8396d528, signal=0xdb85d9 "selectionChanged(QItemSelection,QItemSelection)", normalizeStringData=false) at kernel/qmetaobject.cpp:498
#7  QMetaObjectPrivate::indexOfSignalRelative (baseObject=0x7fff8396d528, signal=0xdb85d9 "selectionChanged(QItemSelection,QItemSelection)", normalizeStringData=false) at kernel/qmetaobject.cpp:601
#8  0x00007f71bc44617c in QObject::disconnect (sender=0x2344490, signal=<value optimized out>, receiver=0xf95850, method=<value optimized out>) at kernel/qobject.cpp:2734
#9  0x00007f71bf62164b in DolphinView::setUrl (this=0xf95850, url=<value optimized out>) at ../../../../apps/dolphin/src/dolphinview.cpp:562
#10 0x00007f71c035027e in DolphinViewContainer::slotUrlNavigatorLocationChanged (this=0xf81ca0, url=...) at ../../../../apps/dolphin/src/dolphinviewcontainer.cpp:388
#11 0x00007f71c0350a57 in DolphinViewContainer::qt_metacall (this=0xf81ca0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff8396d880) at ./dolphinviewcontainer.moc:136
#12 0x00007f71bc4467a7 in QMetaObject::activate (sender=0xf827a0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1835158) at kernel/qobject.cpp:3280
#13 0x00007f71bfd64215 in KUrlNavigator::urlChanged (this=0x7fff8396d528, _t1=<value optimized out>) at ./kurlnavigator.moc:160
#14 0x00007f71bfd68447 in KUrlNavigator::setLocationUrl (this=0xf827a0, newUrl=<value optimized out>) at ../../kfile/kurlnavigator.cpp:1055
#15 0x00007f71bfd69def in KUrlNavigator::qt_metacall (this=0xf827a0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff8396dbe0) at ./kurlnavigator.moc:136
#16 0x00007f71bc4467a7 in QMetaObject::activate (sender=0xf91cd0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1835158) at kernel/qobject.cpp:3280
#17 0x00007f71bfd5c986 in KUrlNavigatorButton::clicked (this=0x7fff8396d528, _t1=<value optimized out>, _t2=Qt::LeftButton) at ./kurlnavigatorbutton_p.moc:126
#18 0x00007f71bfd5ce0f in KUrlNavigatorButton::mouseReleaseEvent (this=0xf91cd0, event=0x7fff8396e4e0) at ../../kfile/kurlnavigatorbutton.cpp:309
#19 0x00007f71bd0cf69e in QWidget::event (this=0xf91cd0, event=0x7fff8396e4e0) at kernel/qwidget.cpp:8157
#20 0x00007f71bd079cdc in QApplicationPrivate::notify_helper (this=0xad2590, receiver=0xf91cd0, e=0x7fff8396e4e0) at kernel/qapplication.cpp:4389
#21 0x00007f71bd07ffee in QApplication::notify (this=0x7fff8396f1f0, receiver=0xf91cd0, e=0x7fff8396e4e0) at kernel/qapplication.cpp:3952
#22 0x00007f71bddceeb6 in KApplication::notify (this=0x7fff8396f1f0, receiver=0xf91cd0, event=0x7fff8396e4e0) at ../../kdeui/kernel/kapplication.cpp:310
#23 0x00007f71bc42ea8c in QCoreApplication::notifyInternal (this=0x7fff8396f1f0, receiver=0xf91cd0, event=0x7fff8396e4e0) at kernel/qcoreapplication.cpp:732
#24 0x00007f71bd07ea9e in QCoreApplication::sendEvent (receiver=0xf91cd0, event=0x7fff8396e4e0, alienWidget=0xf91cd0, nativeWidget=0xf827a0, buttonDown=<value optimized out>, 
    lastMouseReceiver=<value optimized out>, spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#25 QApplicationPrivate::sendMouseEvent (receiver=0xf91cd0, event=0x7fff8396e4e0, alienWidget=0xf91cd0, nativeWidget=0xf827a0, buttonDown=<value optimized out>, 
    lastMouseReceiver=<value optimized out>, spontaneous=true) at kernel/qapplication.cpp:3051
#26 0x00007f71bd101335 in QETWidget::translateMouseEvent (this=0xf827a0, event=<value optimized out>) at kernel/qapplication_x11.cpp:4403
#27 0x00007f71bd0ffc6c in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff8396ee00) at kernel/qapplication_x11.cpp:3536
#28 0x00007f71bd12be82 in x11EventSourceDispatch (s=0xad5f70, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#29 0x00007f71b7be48c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#30 0x00007f71b7be8748 in ?? () from /lib/libglib-2.0.so.0
#31 0x00007f71b7be88fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#32 0x00007f71bc45ab83 in QEventDispatcherGlib::processEvents (this=0xaa9560, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#33 0x00007f71bd12b7ee in QGuiEventDispatcherGlib::processEvents (this=0x7fff8396d528, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#34 0x00007f71bc42d7b2 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#35 0x00007f71bc42db9c in QEventLoop::exec (this=0x7fff8396f130, flags=) at kernel/qeventloop.cpp:201
#36 0x00007f71bc431c4b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#37 0x00007f71c0354e6f in kdemain (argc=<value optimized out>, argv=<value optimized out>) at ../../../../apps/dolphin/src/main.cpp:98
#38 0x00007f71bffa4c4d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, 
    rtld_fini=<value optimized out>, stack_end=0x7fff8396f708) at libc-start.c:226
#39 0x00000000004006b9 in _start ()

Reported using DrKonqi
Comment 1 Josh 2010-08-13 10:28:15 UTC
Edit: The file transfer did stop.  It stalled and didn't report any errors so I thought it was fine, but it did stop transferring.
Comment 2 Frank Reininghaus 2010-08-18 19:50:52 UTC
Thanks for the bug report! Looks like it might be related to bug 245653 and bug 243985.
Comment 3 Frank Reininghaus 2010-08-19 01:19:57 UTC
I get a very similar backtrace in current trunk (see below) if I do the following (see bug 245878 comment 1):

1. Open Dolphin (I've set it to remember view properties for all folders). 
2. Switch to Icons View (if it's not already in that view mode).
3. Open a subfolder of ~.
4. Switch to Columns View.
5. Open a subfolder of the folder which is open in the view.
6. Switch back to Icons View.
7. Go "Back".

It seems that DolphinView's m_selectionModel became a dangling pointer (because the column's selection model has been deleted) which leads to a crash when trying to disconnect its signal. It might help to make it a QPointer or another type of smart pointer.

#6  0x00007f20c6a8ce0b in QObject::disconnect (sender=0x8a5e00, signal=0x88a4b9 "selectionChanged(QItemSelection,QItemSelection)", receiver=0xa0fff0, method=
    0xa8c109 "slotSelectionChanged(QItemSelection,QItemSelection)") at kernel/qobject.cpp:2722
#7  0x00007f20ca4aa325 in DolphinView::setUrl (this=0xa0fff0, url=...) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/views/dolphinview.cpp:562
#8  0x00007f20ca9a7a1d in DolphinViewContainer::slotUrlNavigatorLocationChanged (this=0x7a8f60, url=...) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp:440
#9  0x00007f20ca9a8745 in DolphinViewContainer::qt_metacall (this=0x7a8f60, _c=QMetaObject::InvokeMetaMethod, _id=19, _a=0x7fff25f28270)
    at /home/kde-devel/kde/build/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.moc:139
#10 0x00007f20c6a7992b in QMetaObject::metacall (object=0x7a8f60, cl=QMetaObject::InvokeMetaMethod, idx=46, argv=0x7fff25f28270) at kernel/qmetaobject.cpp:237
#11 0x00007f20c6a8e73d in QMetaObject::activate (sender=0x91c790, m=0x7f20ca220620, local_signal_index=1, argv=0x7fff25f28270) at kernel/qobject.cpp:3272
#12 0x00007f20c9fefd05 in KUrlNavigator::urlChanged (this=0x91c790, _t1=...) at /home/kde-devel/kde/build/KDE/kdelibs/kfile/kurlnavigator.moc:160
#13 0x00007f20c9fee3d9 in KUrlNavigator::goBack (this=0x91c790) at /home/kde-devel/kde/src/KDE/kdelibs/kfile/kurlnavigator.cpp:842
#14 0x00007f20ca99a0af in DolphinMainWindow::goBack (this=0x763a60) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/dolphinmainwindow.cpp:832
Comment 4 Frank Reininghaus 2010-08-19 11:21:58 UTC
Created attachment 50728 [details]
Use a QPointer for DolphinView's m_selectionModel member

This patch fixes it for me. I don't know if it's the "right" way to fix it though: there's still more things going wrong in the Columns View (see bug 245878 comment 2 - this crash remains even with my patch).
Comment 5 Frank Reininghaus 2010-08-19 11:38:58 UTC
*** Bug 245653 has been marked as a duplicate of this bug. ***
Comment 6 Frank Reininghaus 2010-08-19 11:39:08 UTC
*** Bug 243985 has been marked as a duplicate of this bug. ***
Comment 7 Frank Reininghaus 2010-08-19 11:39:14 UTC
*** Bug 247459 has been marked as a duplicate of this bug. ***
Comment 8 Frank Reininghaus 2010-08-19 11:39:20 UTC
*** Bug 247849 has been marked as a duplicate of this bug. ***
Comment 9 Frank Reininghaus 2010-08-19 11:41:14 UTC
*** Bug 247988 has been marked as a duplicate of this bug. ***
Comment 10 Frank Reininghaus 2010-08-19 11:41:29 UTC
*** Bug 248276 has been marked as a duplicate of this bug. ***
Comment 11 Frank Reininghaus 2010-08-19 11:43:50 UTC
*** Bug 246805 has been marked as a duplicate of this bug. ***
Comment 12 Peter Penz 2010-08-19 16:57:11 UTC
SVN commit 1165532 by ppenz:

Fix crash in column view because of a dangling pointer to a selection model. Thanks a lot to Frank Reininghaus for finding a way how to reproduce the issue and analyzing the root cause. Keeping the selection model as part of the DolphinView is not required anymore at all, as the restoring of selected items is done by m_selectedItems in the meantime.

CCBUG: 247618 


 M  +21 -22    dolphinview.cpp  
 M  +0 -1      dolphinview.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1165532
Comment 13 Peter Penz 2010-08-19 17:08:23 UTC
SVN commit 1165533 by ppenz:

Backport of SVN commit 1165532: Fix crash in column view because of a dangling pointer to a selection model.
Thanks a lot to Frank Reininghaus for finding a way how to reproduce the issue
and analyzing the root cause. Keeping the selection model as part of the
DolphinView is not required anymore at all, as the restoring of selected items
is done by m_selectedItems in the meantime.

BUG: 247618 



 M  +21 -22    dolphinview.cpp  
 M  +0 -1      dolphinview.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1165533
Comment 14 Peter Penz 2010-08-20 08:08:15 UTC
*** Bug 245878 has been marked as a duplicate of this bug. ***
Comment 15 Frank Reininghaus 2010-09-01 21:40:35 UTC
*** Bug 247822 has been marked as a duplicate of this bug. ***
Comment 16 Frank Reininghaus 2010-09-01 21:40:48 UTC
*** Bug 249304 has been marked as a duplicate of this bug. ***
Comment 17 Frank Reininghaus 2010-09-01 21:41:14 UTC
*** Bug 249514 has been marked as a duplicate of this bug. ***