<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>165485</bug_id>
          
          <creation_ts>2008-07-01 15:25:46 +0000</creation_ts>
          <short_desc>Crash when dragging and dropping from sftp kioslave to places bar</short_desc>
          <delta_ts>2009-04-28 14:56:13 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kio</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivo Anjo">ivo</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          <cc>alex.wauck+kdebugs</cc>
    
    <cc>echidnaman</cc>
    
    <cc>ervin</cc>
    
    <cc>kdedevel</cc>
    
    <cc>krohar</cc>
    
    <cc>missive</cc>
    
    <cc>mpartap</cc>
    
    <cc>rpogomes</cc>
    
    <cc>tjabo.kloppenburg</cc>
    
    <cc>tom</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>618871</commentid>
    <comment_count>0</comment_count>
    <who name="Ivo Anjo">ivo</who>
    <bug_when>2008-07-01 15:25:46 +0000</bug_when>
    <thetext>Version:            (using KDE 4.0.83)
Installed from:    Unlisted Binary Package
OS:                Linux

Not sure if this is dolphin or kdelibs, but when I drag a folder from a sftp kioslave to the places bar on dolphin, it crashes.

Backtrace:
Application: Dolphin (dolphin), signal SIGABRT
KDE4Daily is generating a backtrace - please be patient :)
KDESVNTRUNKr825042
------

[Thread debugging using libthread_db enabled]
[New Thread 0xb6009720 (LWP 4717)]
0xb7fdc402 in __kernel_vsyscall ()

#1  0xb640ccb6 in nanosleep () from /lib/tls/i686/cmov/libc.so.6

#2  0xb640cac7 in sleep () from /lib/tls/i686/cmov/libc.so.6

#3  0xb7aaab0b in KCrash::startDrKonqi (argv=0xbfe38f34, argc=17) at /home/kde4daily/src/kdelibs/kdeui/util/kcrash.cpp:361

#4  0xb7aab382 in KCrash::defaultCrashHandler (sig=6) at /home/kde4daily/src/kdelibs/kdeui/util/kcrash.cpp:286

#6  0xb7fdc402 in __kernel_vsyscall ()

#7  0xb63a2085 in raise () from /lib/tls/i686/cmov/libc.so.6

#8  0xb63a3a01 in abort () from /lib/tls/i686/cmov/libc.so.6

#9  0xb7e27895 in qt_message_output () from /home/kde4daily/install/qt-copy/lib/libQtCore.so.4

#10 0xb7e27919 in qFatal () from /home/kde4daily/install/qt-copy/lib/libQtCore.so.4

#11 0xb7e27d71 in qt_assert () from /home/kde4daily/install/qt-copy/lib/libQtCore.so.4

#12 0xb75776f7 in KSharedPtr&lt;KMimeType&gt;::operator-&gt; (this=0xbfe3b62c) at /home/kde4daily/src/kdelibs/kdecore/util/ksharedptr.h:116

#13 0xb7596eee in KFilePlacesModel::dropMimeData (this=0x81741e8, data=0x8425950, action=Qt::MoveAction, row=-1, column=-1, parent=@0xbfe3b6c0) at /home/kde4daily/src/kdelibs/kfile/kfileplacesmodel.cpp:557

#14 0xb717ae4a in QAbstractItemView::dropEvent () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#15 0xb7199c0a in QListView::dropEvent () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#16 0xb75a038d in KFilePlacesView::dropEvent (this=0x8239790, event=0xbfe3bf7c) at /home/kde4daily/src/kdelibs/kfile/kfileplacesview.cpp:589

#17 0xb6cd2861 in QWidget::event () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#18 0xb7040048 in QFrame::event () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#19 0xb70d748d in QAbstractScrollArea::viewportEvent () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#20 0xb717a159 in QAbstractItemView::viewportEvent () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#21 0xb70d9f7a in QAbstractScrollAreaPrivate::viewportEvent () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#22 0xb70d9fac in QAbstractScrollAreaFilter::eventFilter () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#23 0xb7f24a18 in QCoreApplicationPrivate::sendThroughObjectEventFilters () from /home/kde4daily/install/qt-copy/lib/libQtCore.so.4

#24 0xb6c747f7 in QApplicationPrivate::notify_helper () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#25 0xb6c763a6 in QApplication::notify () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#26 0xb7a441e3 in KApplication::notify (this=0xbfe3e29c, receiver=0x823abf8, event=0xbfe3bf7c) at /home/kde4daily/src/kdelibs/kdeui/kernel/kapplication.cpp:311

#27 0xb7f2668a in QCoreApplication::notifyInternal () from /home/kde4daily/install/qt-copy/lib/libQtCore.so.4

#28 0xb7f2a1c9 in QCoreApplication::sendEvent () from /home/kde4daily/install/qt-copy/lib/libQtCore.so.4

#29 0xb6cfd0f9 in QX11Data::xdndHandleDrop () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#30 0xb6cfd4b3 in QDragManager::drop () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#31 0xb6d001eb in QDragManager::eventFilter () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#32 0xb7f24aef in QCoreApplicationPrivate::sendThroughApplicationEventFilters () from /home/kde4daily/install/qt-copy/lib/libQtCore.so.4

#33 0xb6c746c4 in QApplicationPrivate::notify_helper () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#34 0xb6c752f1 in QApplication::notify () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#35 0xb7a441e3 in KApplication::notify (this=0xbfe3e29c, receiver=0x8440c48, event=0xbfe3c548) at /home/kde4daily/src/kdelibs/kdeui/kernel/kapplication.cpp:311

#36 0xb7f2668a in QCoreApplication::notifyInternal () from /home/kde4daily/install/qt-copy/lib/libQtCore.so.4

#37 0xb6c80669 in QCoreApplication::sendSpontaneousEvent () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#38 0xb6c79166 in QApplicationPrivate::sendMouseEvent () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#39 0xb6cf3221 in QETWidget::translateMouseEvent () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#40 0xb6cf08be in QApplication::x11ProcessEvent () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#41 0xb6d1cefd in x11EventSourceDispatch () from /home/kde4daily/install/qt-copy/lib/libQtGui.so.4

#42 0xb62efbf8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0

#43 0xb62f2e5e in __ () from /usr/lib/libglib-2.0.so.0

#44 0x080c2bf8 in __ ()

#45 0x00000000 in __ ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619088</commentid>
    <comment_count>1</comment_count>
    <who name="Peter Penz">peter.penz19</who>
    <bug_when>2008-07-01 21:44:50 +0000</bug_when>
    <thetext>Crash confirmed. It works with FTP but not with SFTP.

@Kevin: I could fix the crash by checking whether the returned mimetype pointer is null, but the problem is that the place won&apos;t be added in this case... What should we do if
 KMimeType::Ptr mimetype = KMimeType::mimeType(KIO::NetAccess::mimetype(url, 0));
returns 0? Or might this be an issue in the SFTP slave and each slave must be able to return a mimetype?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619296</commentid>
    <comment_count>2</comment_count>
    <who name="Kevin Ottens">ervin</who>
    <bug_when>2008-07-02 12:00:25 +0000</bug_when>
    <thetext>&gt; Or might this be an issue in the SFTP slave and each slave must be able to
&gt; return a mimetype?


Double checked with David, it&apos;s a bug in the sftp slave.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>632038</commentid>
    <comment_count>3</comment_count>
    <who name="Rui G.">rpogomes</who>
    <bug_when>2008-08-01 16:05:24 +0000</bug_when>
    <thetext>I can still confirm it in kde 4.1 both Opensuse 11.0 and Kubuntu 8.04.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>632045</commentid>
    <comment_count>4</comment_count>
    <who name="andrea zucchelli">zukka77</who>
    <bug_when>2008-08-01 16:12:19 +0000</bug_when>
    <thetext>I&apos;ve the same problem on archlinux</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>639728</commentid>
    <comment_count>5</comment_count>
    <who name="Jonathan Thomas">echidnaman</who>
    <bug_when>2008-08-21 15:21:01 +0000</bug_when>
    <thetext>Noting that adding a local folder to Places, then changing to sftp works ok.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>653397</commentid>
    <comment_count>6</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2008-10-13 20:15:50 +0000</bug_when>
    <thetext>*** Bug 171130 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>653400</commentid>
    <comment_count>7</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2008-10-13 20:17:26 +0000</bug_when>
    <thetext>*** Bug 172645 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>653957</commentid>
    <comment_count>8</comment_count>
    <who name="Simon St James">kdedevel</who>
    <bug_when>2008-10-15 20:06:23 +0000</bug_when>
    <thetext>Ah - I just did the &quot;check for NULL mimetype&quot; &quot;fix&quot; here:

http://websvn.kde.org/?view=rev&amp;revision=871810

in response to 

http://bugs.kde.org/show_bug.cgi?id=170927 

but now that I&apos;ve read the comments here, I wonder if this was the right move.  In the case of BUG:170927, though, we&apos;re dealing with a URL that doesn&apos;t exist, and so presumably can&apos;t have a mimetype.  Should I leave it, revert it, kDebug() a warning, ... ? :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>654012</commentid>
    <comment_count>9</comment_count>
    <who name="Kevin Ottens">ervin</who>
    <bug_when>2008-10-15 22:20:22 +0000</bug_when>
    <thetext>I&apos;d be tempted to say &quot;revert&quot; since AFAIK this problem is triggered by a bug in the ioslave... OTOH the said ioslave isn&apos;t fixed yet, and we probably want to avoid a crash.

So let&apos;s keep your modification in, just please add a kWarning() call before the &quot;continue;&quot; in the if(). Not exactly ideal since URLs won&apos;t get added in this case, and the user won&apos;t have a clear feedback, but that&apos;s still better than a crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>654018</commentid>
    <comment_count>10</comment_count>
    <who name="Simon St James">kdedevel</who>
    <bug_when>2008-10-15 22:38:49 +0000</bug_when>
    <thetext>SVN commit 871866 by sstjames:

At least log a kWarning() when the mimetype cannot be resolved rather than failing completely silently, as requested by ervin.

CCBUG:165485

 M  +3 -1      kfileplacesmodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&amp;revision=871866
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>654064</commentid>
    <comment_count>11</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2008-10-16 02:17:38 +0000</bug_when>
    <thetext>I don&apos;t see what&apos;s the kioslave bug there. You ask for the mimetype of a url that doesn&apos;t exist, you get an empty string. What is wrong is to do KMimeType::mimeType(empty string). Well, you can do it, but you&apos;d better check for NULL indeed ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>676002</commentid>
    <comment_count>12</comment_count>
    <who name="Alexander Wauck">alex.wauck+kdebugs</who>
    <bug_when>2008-12-05 17:56:22 +0000</bug_when>
    <thetext>In SVN trunk, I get this debug message:
dolphin(7880) KFilePlacesModel::dropMimeData: URL not added to Places as mimetype could not be determined!

I assume that&apos;s what was added in the aforementioned commit.  Do we know why the mimetype can&apos;t be determined?  Why can it be determined on FTP but not SFTP?  If nobody knows, I guess I could go dig through the code and try to find out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>688096</commentid>
    <comment_count>13</comment_count>
    <who name="Jonathan Thomas">echidnaman</who>
    <bug_when>2008-12-28 04:00:58 +0000</bug_when>
    <thetext>*** Bug 178769 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>696145</commentid>
    <comment_count>14</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2009-01-08 12:58:36 +0000</bug_when>
    <thetext>SVN commit 907549 by dfaure:

Fix implementation of mimetype() command so that it shares more code with get(), which
 - fixes the lack of ERR_IS_DIRECTORY handling (#165485)
 - actually emits the mimetype, for files ;-)
Will backport for 4.2.
BUG: 165485


 M  +11 -27    kio_sftp.cpp  
 M  +7 -6      kio_sftp.h  


WebSVN link: http://websvn.kde.org/?view=rev&amp;revision=907549
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>704985</commentid>
    <comment_count>15</comment_count>
    <who name="">missive</who>
    <bug_when>2009-01-24 17:12:19 +0000</bug_when>
    <thetext>Is it possible that a similar fix could handle Bug 169906?

I never saw a crash, but as of r915653 it is still not possible to drag a webdavs URL to the places bar.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>749031</commentid>
    <comment_count>16</comment_count>
    <who name="Dario Andres">andresbajotierra</who>
    <bug_when>2009-04-28 14:56:13 +0000</bug_when>
    <thetext>*** Bug 190914 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>