Bug 161681 - Crash when trying to view the content of a directory
Summary: Crash when trying to view the content of a directory
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-06 01:19 UTC by Karai Csaba
Modified: 2009-01-26 16:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karai Csaba 2008-05-06 01:19:56 UTC
Version:            (using Devel)
Installed from:    Compiled sources
OS:                Linux

Hi!

I am a Krusader developer and I get into a bug in dolphinpart.

Situation:
- the user tries to view a directory with Krusader's viewer
- Krusader searches the default service for showing directories

KService::Ptr ptr = KMimeTypeTrader::self()->preferredService( mimetype, "KParts/ReadOnlyPart" );

- it's dolphinpart

The crash:

==14047==
==14047== Invalid read of size 4
==14047==    at 0x5501E96: QWidget::window() const (in /usr/lib/libQtGui.so.4.4.0)
==14047==    by 0x758B745: (within /usr/lib/kde4/dolphinpart.so)
==14047==    by 0x758C911: QObject* KPluginFactory::createPartInstance<DolphinPart>(QWidget*, QObject*, QList<QVariant> const&) (in /usr/lib/kde4/dolphinpart.so)
==14047==    by 0x41F6966: KPluginFactory::create(char const*, QWidget*, QObject*, QList<QVariant> const&, QString const&) (in /usr/lib/libkdecore.so.5.1.0)
==14047==    by 0x81FE2E6: PanelViewer::getPart(QString) (kpluginfactory.h:342)
==14047==    by 0x81FF12A: PanelViewer::openUrl(KUrl const&, KrViewer::Mode) (panelviewer.cpp:69)
==14047==    by 0x80E058D: PanelPopup::update(KUrl) (panelpopup.cpp:532)
==14047==    by 0x80E0F79: PanelPopup::tabSelected(int) (panelpopup.cpp:505)
==14047==    by 0x80E1278: PanelPopup::qt_metacall(QMetaObject::Call, int, void**) (panelpopup.moc:88)
==14047==    by 0x4F684C9: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/libQtCore.so.4.4.0)
==14047==    by 0x4F68A41: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.4.0)
==14047==    by 0x5A25022: QButtonGroup::buttonClicked(int) (in /usr/lib/libQtGui.so.4.4.0)
==14047==  Address 0x4 is not stack'd, malloc'd or (recently) free'd
Comment 1 Peter Penz 2008-05-06 06:31:48 UTC
I've set David Faure to CC...
Comment 2 Dario Andres 2009-01-20 01:36:52 UTC
Can you still reproduce this bug with a recent KDE (4.1.4 / 4.2beta2 / 4.2rc1 / 4.2svn / 4.3svn) ? Thanks :)
Comment 3 David Faure 2009-01-26 16:44:32 UTC
I see, you're passing a null parent widget, and dolphinpart does parentWidget->window().

I'll fix this in dolphinpart, but I would suggest passing a parent widget anyway (well unless you put it into a layout later on, like Qt4 examples do...)
Comment 4 David Faure 2009-01-26 16:45:43 UTC
SVN commit 916972 by dfaure:

Don't crash if parentWidget is 0 (even though I don't recommend setting it to 0, the dirlister mainwindow won't be set if you reparent the widget later on)
BUG: 161681


 M  +3 -1      dolphinpart.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=916972