Version: (using KDE 3.5.8) Installed from: FreeBSD Ports Compiler: gcc version 3.4.6 [FreeBSD] 20060305 OS: FreeBSD Any Kde app doing (Ksqiurrel in my case): KMountPoint::currentMountPoints(KMountPoint::NeedMountOptions) will crash when there is mounted device not listed in fstab (mounted manually or by hal for example). Backtrace: #0 0x28bec9ba in KMountPoint::currentMountPoints (infoNeeded=3) at kmountpoint.cpp:252 #1 0x08128e6e in SQ_MountView::reload (this=0x8564b00, current=true) at sq_mountview.cpp:105 #2 0x08129543 in SQ_MountView::slotRefresh (this=0x8564b00) at sq_mountview.cpp:243 #3 0x08129679 in SQ_MountView::setColumns (this=0x8564b00, cols=0) at sq_mountview.cpp:178 #4 0x081298d3 in SQ_MountView::setupColumns (this=0x8564b00) at sq_mountview.cpp:195 #5 0x08129d1d in SQ_MountView (this=0x8564b00, parent=0x0, name=0x0) at sq_mountview.cpp:66 #6 0x080f01ed in KSquirrel::eventFilter (this=0x81db800, o=0x8336800, e=0x0) at ksquirrel.cpp:250 #7 0x29070e70 in QObject::activate_filters (this=0x8336800, e=0xbfbfe370) at kernel/qobject.cpp:903 #8 0x29070f36 in QObject::event (this=0x8336800, e=0xbfbfe370) at kernel/qobject.cpp:735 #9 0x290a61f2 in QWidget::event (this=0x8336800, e=0xbfbfe370) at kernel/qwidget.cpp:4659 #10 0x29017375 in QApplication::internalNotify (this=0x0, receiver=0x8336800, e=0xbfbfe370) at kernel/qapplication.cpp:2636 #11 0x2901750a in QApplication::notify (this=0xbfbfe760, receiver=0x8336800, e=0xbfbfe370) at kernel/qapplication.cpp:2524 #12 0x28ae7d6a in KApplication::notify (this=0xbfbfe760, receiver=0x8336800, event=0xbfbfe370) at kapplication.cpp:550 #13 0x290a40f2 in QWidget::show (this=0x8336800) at qapplication.h:496 #14 0x290a3d95 in QWidget::showChildren (this=0x0, spontaneous=false) at kernel/qwidget.cpp:4125 #15 0x290a3f3a in QWidget::show (this=0x81db800) at kernel/qwidget.cpp:3984 #16 0x2915b499 in QMainWindow::show (this=0x81db800) at widgets/qmainwindow.cpp:1507 #17 0x288fd25a in KMainWindow::show (this=0x81db800) at kmainwindow.cpp:383 #18 0x080f9b30 in KSquirrel::continueLoading (this=0x81db800) at ksquirrel.cpp:1398 #19 0x080f9fe5 in KSquirrel::preCreate (this=0x81db800) at ksquirrel.cpp:1309 #20 0x080faf1c in KSquirrel (this=0x81db800, parent=0x0, name=0x82408c0 "č#\027\bŔ\b$\b") at ksquirrel.cpp:163 #21 0x080fd5d1 in main (argc=1, argv=0xbfbfe900) at qcstring.h:291 This happends due to null pointer dereference here: if (infoNeeded & NeedMountOptions) { struct fstab *ft = getfsfile(mounted[i].f_mntonname); QString options = QFile::decodeName(ft->fs_mntops); mp->m_mountOptions = QStringList::split(',', options); } ft will be null for devices not listed in /etc/fstab.
Have you experienced this bug with an updated KDE version? Thanks :)
(In reply to comment #1) > Have you experienced this bug with an updated KDE version? Thanks :) > I`m using 3.5.10 right now and it still happends. Ksqiurrel launches fine when there no external devices mounted, after I plug-in my pendrive ksquirrel will crash as described earlier - same backtrace.
The same bug is also present in KDE 4. currentMountPoints() incorrectly uses /etc/fstab instead of /etc/mtab. See kmountpoint.cpp, line 310 in r952145.
SVN commit 976429 by cfeck: Do not dereference null fstab entry CCBUG: 158073 CCMAIL: faure@kde.org M +6 -2 kmountpoint.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=976429
Comment #4 fixes the crash, changing description and severity.
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? Thank you for helping us make KDE software even better for everyone!
Currently the code in kmountpoint: if (infoNeeded & NeedMountOptions) { struct fstab *ft = getfsfile(mounted[i].f_mntonname); if (ft != nullptr) { QString options = QFile::decodeName(ft->fs_mntops); mp->d->m_mountOptions = options.split(QLatin1Char(',')); } else { // TODO: get mount options if not mounted via fstab, see mounted[i].f_flags } } so, it would need a FreeBSD dev to implement that.