Bug 166543

Summary: Dolphin crashes when you enter ftp:/ instead of ftp:// or ftp: in url adress
Product: [Applications] dolphin Reporter: Mathieu Tournier <mathieutournier>
Component: generalAssignee: Peter Penz <peter.penz19>
Status: RESOLVED FIXED    
Severity: crash CC: frank78ac, nt, Regnaron
Priority: NOR    
Version: 16.12.2   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Mathieu Tournier 2008-07-14 16:09:36 UTC
Version:           1.1.1 (using 4.1.60 (KDE 4.1.60 (KDE 4.2 >= 20080709)), Kubuntu packages)
Compiler:          gcc
OS:                Linux (i686) release 2.6.24-19-generic

Just enter "ftp:/" in url adress... Dolphin crashes
Comment 1 Frank Reininghaus 2008-07-14 18:38:10 UTC
Thanks for the bug report. I can confirm this on SVN trunk rev. 832407: Just enter ftp:/ in the location bar, press Enter and Dolphin crashes with the backtrace below.

Note that the sequence of function calls in lines #18-#24 is repeated over and over again, looks like there is an infinite recursion going on. Probably related to (or even a duplicate of) bug #166281.

(gdb) bt
#0  0xb73a3bd7 in QString::replace (this=0xbf39e4d4, before=@0xbf39e4cc, after=@0xbf39e4c8, cs=Qt::CaseSensitive) at tools/qstring.cpp:1563
#1  0xb73a66f2 in QString::normalized (this=0xbf39e5d8, mode=QString::NormalizationForm_KC, version=QChar::Unicode_3_2) at tools/qstring.cpp:5576
#2  0xb740f22b in qt_nameprep (source=@0x89b3298) at io/qurl.cpp:3038
#3  0xb740f941 in qt_from_ACE (domain=@0x89b3298) at io/qurl.cpp:3116
#4  0xb740fa68 in QUrlPrivate::canonicalHost (this=0x89b3288) at io/qurl.cpp:3165
#5  0xb740fd95 in QUrlPrivate::authority (this=0x89b3288, options=@0xbf39e6c8) at io/qurl.cpp:3199
#6  0xb7410e6d in QUrlPrivate::toEncoded (this=0x89b3288, options=@0xbf39e73c) at io/qurl.cpp:3616
#7  0xb7411c11 in QUrlPrivate::validate (this=0x89b3288) at io/qurl.cpp:3440
#8  0xb7412069 in QUrl::isValid (this=0x8364b50) at io/qurl.cpp:3795
#9  0xb76ac959 in KUrl::_setEncodedUrl (this=0x8364b50, url=@0xbf39e7b4) at /home/kde-devel/kde/src/KDE/kdelibs/kdecore/io/kurl.cpp:1497
#10 0xb76b0034 in KUrl (this=0x8364b50, str=@0xbf39e810) at /home/kde-devel/kde/src/KDE/kdelibs/kdecore/io/kurl.cpp:370
#11 0xb7e03440 in KUrlCompletionPrivate::MyURL::init (this=0xbf39e888, _url=@0xbf39e950, cwd=@0xbf39e89c)
    at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kurlcompletion.cpp:477
#12 0xb7e0375d in MyURL (this=0xbf39e888, _url=@0xbf39e950, cwd=@0xbf39e89c) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kurlcompletion.cpp:444
#13 0xb7e037c9 in KUrlCompletion::replacedPath (text=@0xbf39e950, replaceHome=true, replaceEnv=true)
    at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kurlcompletion.cpp:1390
#14 0xb7296550 in KUrlNavigator::setUrl (this=0x81bad40, url=@0xbf39eb20) at /home/kde-devel/kde/src/KDE/kdelibs/kfile/kurlnavigator.cpp:1007
#15 0x0806f64b in DolphinViewContainer::setUrl (this=0x81bb4b8, newUrl=@0xbf39eb20) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp:172
#16 0x08069c8d in DolphinMainWindow::changeUrl (this=0x80a9e60, url=@0xbf39eb20) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/dolphinmainwindow.cpp:175
#17 0x0806bf90 in DolphinMainWindow::qt_metacall (this=0x80a9e60, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbf39eabc) at /home/kde-devel/kde/build/KDE/kdebase/apps/dolphin/src/dolphinmainwindow.moc:159
#18 0xb7473051 in QMetaObject::activate (sender=0x81bad40, from_signal_index=28, to_signal_index=28, argv=0xbf39eabc) at kernel/qobject.cpp:3010
#19 0xb74735db in QMetaObject::activate (sender=0x81bad40, m=0xb72a3e14, local_signal_index=1, argv=0xbf39eabc) at kernel/qobject.cpp:3080
#20 0xb7293770 in KUrlNavigator::urlChanged (this=0x81bad40, _t1=@0xbf39eb20) at /home/kde-devel/kde/build/KDE/kdelibs/kfile/kurlnavigator.moc:137
#21 0xb7296a88 in KUrlNavigator::setUrl (this=0x81bad40, url=@0xbf39ed40) at /home/kde-devel/kde/src/KDE/kdelibs/kfile/kurlnavigator.cpp:1071
#22 0x0806f64b in DolphinViewContainer::setUrl (this=0x81bb4b8, newUrl=@0xbf39ed40) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp:172
#23 0x08069c8d in DolphinMainWindow::changeUrl (this=0x80a9e60, url=@0xbf39ed40) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/dolphinmainwindow.cpp:175
#24 0x0806bf90 in DolphinMainWindow::qt_metacall (this=0x80a9e60, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbf39ecdc) at /home/kde-devel/kde/build/KDE/kdebase/apps/dolphin/src/dolphinmainwindow.moc:159
#25 0xb7473051 in QMetaObject::activate (sender=0x81bad40, from_signal_index=28, to_signal_index=28, argv=0xbf39ecdc) at kernel/qobject.cpp:3010
#26 0xb74735db in QMetaObject::activate (sender=0x81bad40, m=0xb72a3e14, local_signal_index=1, argv=0xbf39ecdc) at kernel/qobject.cpp:3080
#27 0xb7293770 in KUrlNavigator::urlChanged (this=0x81bad40, _t1=@0xbf39ed40) at /home/kde-devel/kde/build/KDE/kdelibs/kfile/kurlnavigator.moc:137
#28 0xb7296a88 in KUrlNavigator::setUrl (this=0x81bad40, url=@0xbf39ef60) at /home/kde-devel/kde/src/KDE/kdelibs/kfile/kurlnavigator.cpp:1071
#29 0x0806f64b in DolphinViewContainer::setUrl (this=0x81bb4b8, newUrl=@0xbf39ef60) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp:172
#30 0x08069c8d in DolphinMainWindow::changeUrl (this=0x80a9e60, url=@0xbf39ef60) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/dolphinmainwindow.cpp:175
#31 0x0806bf90 in DolphinMainWindow::qt_metacall (this=0x80a9e60, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbf39eefc) at /home/kde-devel/kde/build/KDE/kdebase/apps/dolphin/src/dolphinmainwindow.moc:159
#32 0xb7473051 in QMetaObject::activate (sender=0x81bad40, from_signal_index=28, to_signal_index=28, argv=0xbf39eefc) at kernel/qobject.cpp:3010
#33 0xb74735db in QMetaObject::activate (sender=0x81bad40, m=0xb72a3e14, local_signal_index=1, argv=0xbf39eefc) at kernel/qobject.cpp:3080
#34 0xb7293770 in KUrlNavigator::urlChanged (this=0x81bad40, _t1=@0xbf39ef60) at /home/kde-devel/kde/build/KDE/kdelibs/kfile/kurlnavigator.moc:137
#35 0xb7296a88 in KUrlNavigator::setUrl (this=0x81bad40, url=@0xbf39f180) at /home/kde-devel/kde/src/KDE/kdelibs/kfile/kurlnavigator.cpp:1071
#36 0x0806f64b in DolphinViewContainer::setUrl (this=0x81bb4b8, newUrl=@0xbf39f180) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp:172
#37 0x08069c8d in DolphinMainWindow::changeUrl (this=0x80a9e60, url=@0xbf39f180) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/dolphinmainwindow.cpp:175
#38 0x0806bf90 in DolphinMainWindow::qt_metacall (this=0x80a9e60, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbf39f11c) at /home/kde-devel/kde/build/KDE/kdebase/apps/dolphin/src/dolphinmainwindow.moc:159
---Type <return> to continue, or q <return> to quit---          
Comment 2 Peter Penz 2008-07-19 17:20:54 UTC
SVN commit 834752 by ppenz:

If an invalid URL has been set, the check whether the URL has already been entered failed because KUrl::equals() always returns false if at least one URL is invalid (even if both invalid URLs are equal). This has lead to an endless recursion in Dolphin as Dolphin relies on that invoking KUrlNavigator::setUrl() with the same URL twice does not emit 2 urlsChanged() signals.

BUG: 166543
BUG: 166281

 M  +3 -1      kurlnavigator.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=834752
Comment 3 Peter Penz 2008-07-19 17:21:54 UTC
SVN commit 834753 by ppenz:

Backport of 834752 for 4.1: If an invalid URL has been set, the check whether the URL has already been entered failed because KUrl::equals() always returns false if at least one URL is invalid (even if both invalid URLs are equal). This has lead to an endless recursion in Dolphin as Dolphin relies on that invoking KUrlNavigator::setUrl() with the same URL twice does not emit 2 urlsChanged() signals.

CCBUG: 166543
CCBUG: 166281

 M  +3 -1      kurlnavigator.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=834753
Comment 4 Peter Penz 2008-07-19 17:29:07 UTC
*** Bug 165886 has been marked as a duplicate of this bug. ***
Comment 5 Alexander Jenisch 2008-09-16 14:25:16 UTC
since this might be related, i'm not creating a new bug report:

dolphin also crashes if you enter ftp:\\ instead of ftp://.
Comment 6 Oliver Putz 2008-09-16 15:32:03 UTC
@Alexander: Thanks for the bugreport. It looks to me as if your bug is indeed related. However, as ftp:/ (the problem for this bugreport) works fine for in a current svn build me [but ftp:\\ does not], I created a new bugreport for the ftp:\\ case. (Say hello to bug #171160 :))