Summary: | Crash when dragging and dropping from sftp kioslave to places bar | ||
---|---|---|---|
Product: | [Unmaintained] kio | Reporter: | Ivo Anjo <ivo> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | alex.wauck+kdebugs, echidnaman, ervin, kdedevel, krohar, missive, mpartap, rpogomes, tjabo.kloppenburg, tom |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Ivo Anjo
2008-07-01 15:25:46 UTC
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'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? > Or might this be an issue in the SFTP slave and each slave must be able to
> return a mimetype?
Double checked with David, it's a bug in the sftp slave.
I can still confirm it in kde 4.1 both Opensuse 11.0 and Kubuntu 8.04.1 I've the same problem on archlinux Noting that adding a local folder to Places, then changing to sftp works ok. *** Bug 171130 has been marked as a duplicate of this bug. *** *** Bug 172645 has been marked as a duplicate of this bug. *** Ah - I just did the "check for NULL mimetype" "fix" here: http://websvn.kde.org/?view=rev&revision=871810 in response to http://bugs.kde.org/show_bug.cgi?id=170927 but now that I've read the comments here, I wonder if this was the right move. In the case of BUG:170927, though, we're dealing with a URL that doesn't exist, and so presumably can't have a mimetype. Should I leave it, revert it, kDebug() a warning, ... ? :) I'd be tempted to say "revert" since AFAIK this problem is triggered by a bug in the ioslave... OTOH the said ioslave isn't fixed yet, and we probably want to avoid a crash. So let's keep your modification in, just please add a kWarning() call before the "continue;" in the if(). Not exactly ideal since URLs won't get added in this case, and the user won't have a clear feedback, but that's still better than a crash. 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&revision=871866 I don't see what's the kioslave bug there. You ask for the mimetype of a url that doesn't exist, you get an empty string. What is wrong is to do KMimeType::mimeType(empty string). Well, you can do it, but you'd better check for NULL indeed ;) 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's what was added in the aforementioned commit. Do we know why the mimetype can'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. *** Bug 178769 has been marked as a duplicate of this bug. *** 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&revision=907549 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. *** Bug 190914 has been marked as a duplicate of this bug. *** |