Bug 180494 - Dolphin crashes when dragging from an inactive view over FTP
Summary: Dolphin crashes when dragging from an inactive view over FTP
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
: 181310 181430 181524 181584 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-12 20:47 UTC by Alex Merry
Modified: 2009-04-30 11:04 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 Alex Merry 2009-01-12 20:47:23 UTC
Version:           r910156 (using Devel)
Compiler:          gcc version 4.3.2 (GCC) 
OS:                Linux
Installed from:    Compiled sources

Steps:
1. Open Dolphin
2. Visit FTP site
3. Click "Split"
4. Click on home folder in places.  Now the left side is grey and has the FTP site, the right side is white and has the home folder
5. Mouse down (click) on a file on the left (FTP, grey) side as though you are dragging it to the right side
6. Crash (before mouse button is released).

If the left side is selected before dragging, there is no crash until you click (a single click) on the left side again once the file dragged to the right pane has been transferred.  This causes the same crash.


Console output:
dolphin(7173)/kio (bookmarks) KBookmarkManager::KBookmarkManager: starting KDirWatch for  "/home/alex/.local/share//user-places.xbel"
dolphin(7173)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from  "/var/tmp/kdecache-alex/ksycoca4"
dolphin(7173): Shortcut for KAction  "close_tab" "Close Tab" set with QShortcut::setShortcut()! See KAction documentation.
dolphin(7173): Attempt to use QAction "show_info_panel" with KXMLGUIFactory!
dolphin(7173): Attempt to use QAction "show_folders_panel" with KXMLGUIFactory!
dolphin(7173): Attempt to use QAction "show_terminal_panel" with KXMLGUIFactory!
dolphin(7173): Attempt to use QAction "show_places_panel" with KXMLGUIFactory!
dolphin(7173)/kio KNFSShare::KNFSSharePrivate::findExportsFile: Could not find exports file! /etc/exports doesn't exist. Configure it in share/config/knfsshare, [General], exportsFile=....
dolphin(7173)/kdecore (KMimeType) KMimeTypeFactory::parseMagic: Now parsing  "/home/kde-devel/kde/share/mime/magic"
dolphin(7173)/kdecore (KMimeType) KMimeTypeFactory::parseMagic: Now parsing  "/usr/share/mime/magic"
dolphin(7173)/kdecore (KMimeType) KMimeTypeFactory::parseMagic: Now parsing  "/home/alex/.local/share/mime/magic"
dolphin(7173)/kio (KIOJob) KDirModel::indexForUrl: KUrl("file:///home/alex") not found
dolphin(7173)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::instance: instance(): ... initialised
dolphin(7173)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readConfig: readConfig(): local zone= "Europe/Guernsey"
dolphin(7173)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readZoneTab: readZoneTab( "/usr/share/zoneinfo/zone.tab" )
dolphin(7173)/kio (KIOJob) KDirModel::indexForUrl: KUrl("file:///home/alex") not found
dolphin(7173)/kio (KIOJob) KDirModel::indexForUrl: KUrl("ftp://ftp.randomguy3.me.uk") not found
ASSERT: "m_view->isActive() == m_urlNavigator->isActive()" in file /home/kde-devel/src/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp, line 202
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = dolphin path = <unknown> pid = 7173
sock_file=/home/alex/.kde/socket-glitch/kdeinit4__0



Backtrace:
Application: Dolphin (dolphin), signal SIGABRT
0x00007f538e14f001 in nanosleep () from /lib/libc.so.6

Thread 1 (Thread 0x7f539283e750 (LWP 7173)):
[KCrash Handler]
#5  0x00007f538e0e20c5 in raise () from /lib/libc.so.6
#6  0x00007f538e0e35e3 in abort () from /lib/libc.so.6
#7  0x00007f538ee2c751 in qt_message_output (msgType=QtFatalMsg, 
    buf=0x7fff9a970040 "ASSERT: \"m_view->isActive() == m_urlNavigator->isActive()\" in file /home/kde-devel/src/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp, line 202")
    at global/qglobal.cpp:2102
#8  0x00007f538ee2c860 in qFatal (msg=0x7f538ef716b8 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2303
#9  0x00007f538ee2cc6d in qt_assert (assertion=0x460870 "m_view->isActive() == m_urlNavigator->isActive()", file=0x4607e0 "/home/kde-devel/src/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp", 
    line=202) at global/qglobal.cpp:1872
#10 0x0000000000431aa5 in DolphinViewContainer::isActive (this=0x17711d0) at /home/kde-devel/src/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp:202
#11 0x0000000000431b20 in DolphinViewContainer::restoreView (this=0x17711d0, url=@0x7fff9a9724b0) at /home/kde-devel/src/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp:366
#12 0x00000000004320a8 in DolphinViewContainer::qt_metacall (this=0x17711d0, _c=QMetaObject::InvokeMetaMethod, _id=17, _a=0x7fff9a972400)
    at /home/kde-devel/build/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.moc:122
#13 0x00007f538ef34ac2 in QMetaObject::activate (sender=0x1774340, from_signal_index=28, to_signal_index=28, argv=0x7fff9a972400) at kernel/qobject.cpp:3019
#14 0x00007f538ef34f37 in QMetaObject::activate (sender=0x1774340, m=0x7f53922796c0, local_signal_index=1, argv=0x7fff9a972400) at kernel/qobject.cpp:3092
#15 0x00007f53920550b7 in KUrlNavigator::urlChanged (this=0x1774340, _t1=@0x7fff9a9724b0) at /home/kde-devel/build/KDE/kdelibs/kfile/kurlnavigator.moc:140
#16 0x00007f53920575b1 in KUrlNavigator::setUrl (this=0x1774340, url=@0x17e6458) at /home/kde-devel/src/KDE/kdelibs/kfile/kurlnavigator.cpp:1025
#17 0x00007f53920588ec in KUrlNavigator::qt_metacall (this=0x1774340, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fff9a972770) at /home/kde-devel/build/KDE/kdelibs/kfile/kurlnavigator.moc:109
#18 0x00007f538ef34ac2 in QMetaObject::activate (sender=0x17fe7d0, from_signal_index=28, to_signal_index=28, argv=0x7fff9a972770) at kernel/qobject.cpp:3019
#19 0x00007f538ef34f37 in QMetaObject::activate (sender=0x17fe7d0, m=0x7f5391d90c00, local_signal_index=1, argv=0x7fff9a972770) at kernel/qobject.cpp:3092
#20 0x00007f5391b57a1d in DolphinView::urlChanged (this=0x17fe7d0, _t1=@0x17e6458) at /home/kde-devel/build/KDE/kdebase/apps/dolphin/src/dolphinview.moc:222
#21 0x00007f5391b5b92c in DolphinView::setActive (this=0x17fe7d0, active=true) at /home/kde-devel/src/KDE/kdebase/apps/dolphin/src/dolphinview.cpp:178
#22 0x00007f5391b5ba02 in DolphinView::activate (this=0x17fe7d0) at /home/kde-devel/src/KDE/kdebase/apps/dolphin/src/dolphinview.cpp:875
#23 0x00007f5391b5bddd in DolphinView::qt_metacall (this=0x17fe7d0, _c=QMetaObject::InvokeMetaMethod, _id=36, _a=0x7fff9a9728e0)
    at /home/kde-devel/build/KDE/kdebase/apps/dolphin/src/dolphinview.moc:191
#24 0x00007f538ef34ac2 in QMetaObject::activate (sender=0x17e6440, from_signal_index=7, to_signal_index=7, argv=0x0) at kernel/qobject.cpp:3019
#25 0x00007f538ef34f37 in QMetaObject::activate (sender=0x17e6440, m=0x7f5391d8f620, local_signal_index=3, argv=0x0) at kernel/qobject.cpp:3092
#26 0x00007f5391b424c6 in DolphinController::activated (this=0x17e6440) at /home/kde-devel/build/KDE/kdebase/apps/dolphin/src/dolphincontroller.moc:151
#27 0x00007f5391b424dd in DolphinController::requestActivation (this=0x17e6440) at /home/kde-devel/src/KDE/kdebase/apps/dolphin/src/dolphincontroller.cpp:84
#28 0x00007f5391b5bfb2 in DolphinView::eventFilter (this=0x17fe7d0, watched=0x199e520, event=0x7fff9a9730c0) at /home/kde-devel/src/KDE/kdebase/apps/dolphin/src/dolphinview.cpp:845
#29 0x00007f538ef1ebad in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x1335990, receiver=0x199e520, event=0x7fff9a9730c0) at kernel/qcoreapplication.cpp:694
#30 0x00007f538f4026fb in QApplicationPrivate::notify_helper (this=0x1335990, receiver=0x199e520, e=0x7fff9a9730c0) at kernel/qapplication.cpp:3799
#31 0x00007f538f404392 in QApplication::notify (this=0x7fff9a974890, receiver=0x199e520, e=0x7fff9a9730c0) at kernel/qapplication.cpp:3768
#32 0x00007f5390976456 in KApplication::notify (this=0x7fff9a974890, receiver=0x199e520, event=0x7fff9a9730c0) at /home/kde-devel/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#33 0x00007f538ef20663 in QCoreApplication::notifyInternal (this=0x7fff9a974890, receiver=0x199e520, event=0x7fff9a9730c0) at kernel/qcoreapplication.cpp:583
#34 0x00007f538f3ffa7b in QCoreApplication::sendEvent (receiver=0x199e520, event=0x7fff9a9730c0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
#35 0x00007f538f4059f2 in QApplicationPrivate::setFocusWidget (focus=0x199e520, reason=Qt::MouseFocusReason) at kernel/qapplication.cpp:1999
#36 0x00007f538f4535ae in QWidget::setFocus (this=0x199e520, reason=Qt::MouseFocusReason) at kernel/qwidget.cpp:5376
#37 0x00007f538f402f2d in QApplication::notify (this=0x7fff9a974890, receiver=0x17feec0, e=0x7fff9a973950) at kernel/qapplication.cpp:3486
#38 0x00007f5390976456 in KApplication::notify (this=0x7fff9a974890, receiver=0x17feec0, event=0x7fff9a973950) at /home/kde-devel/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#39 0x00007f538ef20663 in QCoreApplication::notifyInternal (this=0x7fff9a974890, receiver=0x17feec0, event=0x7fff9a973950) at kernel/qcoreapplication.cpp:583
#40 0x00007f538f40e863 in QCoreApplication::sendSpontaneousEvent (receiver=0x17feec0, event=0x7fff9a973950) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:212
#41 0x00007f538f406fb9 in QApplicationPrivate::sendMouseEvent (receiver=0x17feec0, event=0x7fff9a973950, alienWidget=0x17feec0, nativeWidget=0x17711d0, buttonDown=0x7f538fe094a8, 
    lastMouseReceiver=@0x7f538fe094b0) at kernel/qapplication.cpp:2793
#42 0x00007f538f477a6f in QETWidget::translateMouseEvent (this=0x17711d0, event=0x7fff9a974420) at kernel/qapplication_x11.cpp:4042
#43 0x00007f538f47889f in QApplication::x11ProcessEvent (this=0x7fff9a974890, event=0x7fff9a974420) at kernel/qapplication_x11.cpp:3038
Comment 1 Christophe Marin 2009-01-19 16:18:19 UTC
*** Bug 181310 has been marked as a duplicate of this bug. ***
Comment 2 Dario Andres 2009-01-21 01:10:56 UTC
*** Bug 181430 has been marked as a duplicate of this bug. ***
Comment 3 Dario Andres 2009-01-21 01:11:31 UTC
The reporter of bug 181430 was using fish:/ + split view
Comment 4 thomas 2009-01-22 15:08:48 UTC
*** Bug 181584 has been marked as a duplicate of this bug. ***
Comment 5 thomas 2009-01-22 15:11:24 UTC
(gdb) dolphin(13186) MetaDataWidget::setFile: KUrl("file:///home/thomas")
dolphin(13186) MetaDataWidget::setFile: KUrl("fish://thomas@80.252.101.201:3389")
dolphin(13186) MetaDataWidget::setFile: KUrl("fish://thomas@80.252.101.201:3389")
dolphin(13186) MetaDataWidget::setFile: KUrl("fish://thomas@80.252.101.201:3389")
dolphin(13186) MetaDataWidget::setFile: KUrl("fish://thomas@xxx.xxx.xxx.xxx:3389/home/thomas/Händlermarketing-Plan 2009.pdf")
dolphin(13186) MetaDataWidget::setFile: KUrl("file:///home/thomas")
dolphin(13186) MetaDataWidget::setFile: KUrl("file:///home/thomas")
dolphin(13186) MetaDataWidget::setFile: KUrl("fish://thomas@xxx.xxx.xxx.xxx::3389/home/thomas/james_brown.wav")
dolphin(13186) MetaDataWidget::setFile: KUrl("fish://thomas@xxx.xxx.xxx.xxx::3389/home/thomas/meins.odt")
dolphin(13186) MetaDataWidget::setFile: KUrl("fish://thomas@xxx.xxx.xxx.xxx::3389/home/thomas/james_brown.mp3")
ASSERT: "m_view->isActive() == m_urlNavigator->isActive()" in file /build/buildd/kdebase-4.1.96/apps/dolphin/src/dolphinviewcontainer.cpp, line 202
KCrash: Application 'dolphin' crashing...
sock_file=/home/thomas/.kde/socket-quad/kdeinit4__0
Comment 6 Dario Andres 2009-01-23 11:02:29 UTC
*** Bug 181524 has been marked as a duplicate of this bug. ***
Comment 7 Dario Andres 2009-01-23 11:03:31 UTC
The reporter of bug 181524 was using  smb:/ + split view
Comment 8 hvm 2009-03-01 16:40:54 UTC
It has happened to me too:
Application: Dolphin (dolphin), signal SIGABRT

Thread 1 (Thread 0xb5dc26c0 (LWP 6649)):
[KCrash Handler]
#6  0xb7f46430 in __kernel_vsyscall ()
#7  0xb64ec8a0 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb64ee268 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb6790795 in qt_message_output () from /usr/lib/libQtCore.so.4
#10 0xb6790872 in qFatal () from /usr/lib/libQtCore.so.4
#11 0xb6790915 in qt_assert () from /usr/lib/libQtCore.so.4
#12 0x080740f7 in _start ()

Also, I think bug 177531 is related or the same as this one.
Comment 9 Christoph Feck 2009-04-11 13:01:07 UTC
The DolphinViewContainer activates and deactivates the KUrlNavigator bar and the DolphinView synchronously, so the assert should not fail.

But these two subwidgets change activation state without informing the container. Either more signals between the widgets are needed, or the active equality assert should be removed.
Comment 10 Frank Reininghaus 2009-04-30 11:03:22 UTC
(In reply to comment #9)
> The DolphinViewContainer activates and deactivates the KUrlNavigator bar and
> the DolphinView synchronously, so the assert should not fail.

The assert failure happens during the activation process, when the view is active already, but the URL navigator not yet (note frame #21 in the backtrace: DolphinView::setActive).

The root cause of the problem seems to be that DolphinView::setActive(bool) emits the urlChanged(const KUrl&) signal although the URL of the view has not changed at all. This signal is connected to the slot KUrlNavigator::setUrl(const KUrl&) (frame #16). This slot returns immediately if the URL is equal to the 'old' URL, that's why this crash does not happen if local directories are open in the split views.

However, in the case we have here, the 'old' and 'new' URL of the navigator are not equal because KDirLister has emitted a redirect signal before, adding a slash to the FTP URL (the crash does indeed not occur if a URL with slash at the end has been entered at the beginning). This redirect signal adds a slash to the navigator URL, but not the view URL, that's why the navigator thinks the URL has really changed now -> KUrlNavigator::setUrl(const KUrl&) does not return -> the whole thing goes on and ends up in DolphinViewContainer::isActive() where the assert is hit.

I'll commit a fix to trunk in a minute. I'm not going to backport it because I'm not 100% sure that it does not cause regressions (and distros seem to disable asserts in 4.2.x packages anyway).
Comment 11 Frank Reininghaus 2009-04-30 11:04:50 UTC
SVN commit 961519 by freininghaus:

Do not emit DolphinView's urlChanged(const KUrl&) signal if the view
is activated, as discussed with Peter. This fixes a crash on a failed
assert if the DolphinView's and the KUrlNavigator's URLs are slightly
different (i.e., if a slash has been added to the navigator's URL by
KDirLister).

I could not find any regressions caused by this change so far, but
even if there are side effects, the upcoming beta and RC releases
should give enough user feedback and time to fix them.

BUG: 180494


 M  +0 -4      dolphinview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=961519