| Summary: | crash while trying to browse manpages | ||
|---|---|---|---|
| Product: | [Applications] dolphin | Reporter: | Ivo Anjo <ivo> |
| Component: | general | Assignee: | David Faure <faure> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | fabian, faure, kde, manolis, Regnaron, s.illes79 |
| Priority: | NOR | ||
| Version First Reported In: | 16.12.2 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
backtrace
Patch for kio_man to display folders according to manpage sections KIO_Man patch for directories according to sections |
||
|
Description
Ivo Anjo
2007-12-16 17:43:30 UTC
Created attachment 22578 [details]
backtrace
Please paste backtraces directly in the description field, it makes it easier for us to look for duplicate bugs.
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1238636848 (LWP 3929)]
[New Thread -1261900912 (LWP 3930)]
[KCrash handler]
#6 0xffffe402 in __kernel_vsyscall ()
#7 0xb6606df0 in raise () from /lib/tls/i686/cmov/libc.so.6
#8 0xb6608641 in abort () from /lib/tls/i686/cmov/libc.so.6
#9 0xb7e12fad in qt_message_output ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#10 0xb7e13031 in qFatal ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#11 0xb7e1319d in qt_assert ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#12 0xb7789113 in KDirModelPrivate::_k_slotNewItems (this=0x827afa8,
items=@0x870d1f0)
at /storage/tmp/kde4dev/kdelibs/kio/kio/kdirmodel.cpp:297
#13 0xb7789844 in KDirModel::qt_metacall (this=0x827afc8,
_c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbfba6a9c)
at /storage/tmp/kde4dev/kdelibs-build/kio/kdirmodel.moc:75
#14 0xb7ee2bc0 in QMetaObject::activate ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#15 0xb7ee3035 in QMetaObject::activate ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#16 0xb7770e1c in KDirLister::newItems (this=0x8279810, _t1=@0x870d1f0)
at /storage/tmp/kde4dev/kdelibs-build/kio/kdirlister.moc:252
#17 0xb7771482 in KDirLister::Private::emitItems (this=0x81ac8f8)
at /storage/tmp/kde4dev/kdelibs/kio/kio/kdirlister.cpp:2184
#18 0xb7776493 in KDirListerCache::slotEntries (this=0x8279e00,
job=0x8641300, entries=@0xbfba77a4)
at /storage/tmp/kde4dev/kdelibs/kio/kio/kdirlister.cpp:961
#19 0xb777bf56 in KDirListerCache::qt_metacall (this=0x8279e00,
_c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbfba7108)
at /storage/tmp/kde4dev/kdelibs-build/kio/kdirlister_p.moc:96
#20 0xb7ee2bc0 in QMetaObject::activate ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#21 0xb7ee3035 in QMetaObject::activate ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#22 0xb774e4b9 in KIO::ListJob::entries (this=0x8641300, _t1=0x8641300,
_t2=@0xbfba77a4)
at /storage/tmp/kde4dev/kdelibs-build/kio/jobclasses.moc:762
#23 0xb7757e53 in KIO::ListJobPrivate::slotListEntries (this=0x85d5ea8,
list=@0xbfba77a4) at /storage/tmp/kde4dev/kdelibs/kio/kio/job.cpp:2283
#24 0xb77581b2 in KIO::ListJob::qt_metacall (this=0x8641300,
_c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbfba76cc)
at /storage/tmp/kde4dev/kdelibs-build/kio/jobclasses.moc:749
#25 0xb7ee2bc0 in QMetaObject::activate ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#26 0xb7ee3035 in QMetaObject::activate ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#27 0xb77fde10 in KIO::SlaveInterface::listEntries (this=0x86054a8,
_t1=@0xbfba77a4)
at /storage/tmp/kde4dev/kdelibs-build/kio/slaveinterface.moc:176
#28 0xb77ffd39 in KIO::SlaveInterface::dispatch (this=0x86054a8, _cmd=106,
rawdata=@0xbfba7804)
at /storage/tmp/kde4dev/kdelibs/kio/kio/slaveinterface.cpp:194
#29 0xb7800703 in KIO::SlaveInterface::dispatch (this=0x86054a8)
at /storage/tmp/kde4dev/kdelibs/kio/kio/slaveinterface.cpp:88
#30 0xb77f2af2 in KIO::Slave::gotInput (this=0x86054a8)
at /storage/tmp/kde4dev/kdelibs/kio/kio/slave.cpp:318
#31 0xb77f3efe in KIO::Slave::qt_metacall (this=0x86054a8,
_c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbfba78fc)
at /storage/tmp/kde4dev/kdelibs-build/kio/slave.moc:74
#32 0xb7ee2bc0 in QMetaObject::activate ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#33 0xb7ee3035 in QMetaObject::activate ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#34 0xb772878f in KIO::Connection::readyRead (this=0x8289010)
at /storage/tmp/kde4dev/kdelibs-build/kio/connection.moc:83
#35 0xb772976f in KIO::ConnectionPrivate::dequeue (this=0x8481698)
at /storage/tmp/kde4dev/kdelibs/kio/kio/connection.cpp:82
#36 0xb772a6a9 in KIO::Connection::qt_metacall (this=0x8289010,
_c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x8539f08)
at /storage/tmp/kde4dev/kdelibs-build/kio/connection.moc:71
#37 0xb7ede588 in QMetaCallEvent::placeMetaCall ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#38 0xb7ee38ef in QObject::event ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#39 0xb6bd5ce1 in QApplicationPrivate::notify_helper ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtGui.so.4
#40 0xb6bd5fe2 in QApplication::notify ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtGui.so.4
#41 0xb7a6fb6b in KApplication::notify (this=0xbfba8630, receiver=0x8289010,
event=0x81a41e0)
at /storage/tmp/kde4dev/kdelibs/kdeui/kernel/kapplication.cpp:319
#42 0xb7ed141e in QCoreApplication::notifyInternal ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#43 0xb7ed47ed in QCoreApplication::sendEvent ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#44 0xb7ed18f5 in QCoreApplicationPrivate::sendPostedEvents ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#45 0xb7ed1a4b in QCoreApplication::sendPostedEvents ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#46 0xb7efae61 in postEventSourceDispatch ()
from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#47 0xb6567df2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#48 0xb656adcf in ?? () from /usr/lib/libglib-2.0.so.0
#49 0x080b4e78 in ?? ()
#50 0x00000000 in ?? ()
#0 0xffffe402 in __kernel_vsyscall ()
*** Bug 152838 has been marked as a duplicate of this bug. *** man:ls works in konqueror but crashes dolphin (in KDirModel). The kio_man ioslave must do something strange when asked to list something that is in fact a leaf page. I'll have a look and I'll make kdirmodel more verbose about what's happening before asserting. I think this is the same as bug #156221, as I can reproduce bug #156221 with man:programname too. I get an assert: "ASSERT: "result.second" in file /build/buildd/kde4libs-4.0.4/kio/kio/kdirmodel.cpp,line 306". My personal guess is that this happens because the lacking of a slash after the "man:". Try going in konqueror to "man:/ls" you'll see the manpage, same goes for "man:ls". Now in dolphin for the first one you'll get a list of manpages (bug: http://bugs.kde.org/show_bug.cgi?id=153833, happens because dolphin can call the listDir there), but it crashes when the slash is ommitted. As I got the error too when I tried to set the UDS_URL of the files in the listDir() function to urls that do work (man:/ls instead of man:/ls/ls, when clicking on ls while browsing man:/ls) I got this crash too. Seemed to be that the UDS_URL had to be relative to the current directory. (behaviour see this mailinglist email: http://lists.kde.org/?l=kde-core-devel&m=120358738121246&w=2). So I guess this somehow failes when accessed without the slash. The real fix would be not to use UDS_URL at all, it's just too troublesome. I'll have a look later if nobody does it before. I've removed all the UDS_URL's in kio_man.cpp, which doesn't result into getting the bug away, so there is something else causing an alike error. When you make the listDir function in kio_man.cpp give an empty directory (no files in the UDSEntryList) the error doesn't occur. When looking at the function "QPair<int /*row*/, KDirModelNode*> KIO::KDirModelPrivate::nodeForUrl(const KUrl& _url, bool returnLastParent)" in kdelibs/kio/kio/kdirmodel.cpp You can see it will give the null on the result.second (over which the assert falls) when the file url's base-path doesn't start with the path of the actual page. (when the path is empty it assumes "/") So somehow it sees all files in a directory like "man:ls" as of a lower level. My guess is that it assumes "/" for the directory, but doesn't for the file (only assumes for the directory in the function) so the error occurs. *** Bug 156610 has been marked as a duplicate of this bug. *** SVN commit 808334 by dfaure: Fix QString::at(0) usage on empty string, which makes kio_man crash (in debug mode) when dolphin lists man: CCBUG: 154173 M +3 -3 kio_man.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=808334 kio_man is really a weird beast... it declares that everything (man:, man:(1), man:ls) is a file... (so in konqueror everything appears as HTML pages) and yet it allows listing the first two (so in dolphin you can get a normal directory listing). ... but that means, when listing man:(1) we are really listing a file as if it was a directory, which confuses KDirModel greatly. For man:ls this is fixable by kio_man not accepting to list that as a directory, it doesn't contain anything anyway (fix coming up). But if we really want man:(1) to be both a file and a listable directory, then that fix isn't enough... SVN commit 813980 by dfaure: Don't even try listing man:ls as a directory, it's not supposed to be one. This doesn't solve the problem for man:(1) being both a file and a directory (!) though... CCBUG: 154173 M +18 -2 kio_man.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=813980 It didn't crash when you call man:/, that's why I have a patch local that displays the directories of the sections so you can get to man:/(3) and then get the pages in konqueror (for allowing man:/(1)/ls it requires some adjusting at URL rewriting). (btw, should I post this patch somewhere? or is it at best to just get out the directory support of kio_man) Listing man:/(1) under man:/ and supporting the URL man:/(1)/ls is exactly what's missing in kio_man for correct directory-based usage. It has to offer a more hierarchical view otherwise it makes no sense for dolphin/kdirmodel. Please post your patch here :) Created attachment 24994 [details]
Patch for kio_man to display folders according to manpage sections
This patch adds directories to kio_man for all sections of manpages.
I originally made it for the 4.0 branch, but since the little changes between
4.0 and 4.1 on kio_man it was an port almost as easy as just applying the patch
on the new file.
Thanks. Obviously we also need to support listing those new dirs :-) (currently dolphin shows an error when entering those dirs) Created attachment 25025 [details]
KIO_Man patch for directories according to sections
Sorry, I messed a bit up by changing the patch from the 4.0 to 4.1 branch, this
one should work.
Note: This bug is related: http://bugs.kde.org/show_bug.cgi?id=153833 (after these commits it's more or less fixed too) *** Bug 153833 has been marked as a duplicate of this bug. *** SVN commit 821388 by dfaure: Show folders for the manpage sections when listing man:/ in dolphin, and support for listing those dirs (URL like "man:/(1)"). Fixes crashes when browsing man:/ in dolphin. Patch by Stas Verberkt / LegolasV. Thanks! BUG: 154173 M +23 -3 kio_man.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=821388 |