Bug 116063 - valgrind complains about akregator plugin when konqi's rmb popup menu pops up
Summary: valgrind complains about akregator plugin when konqi's rmb popup menu pops up
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: akregator konqueror plugin (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-10 14:20 UTC by Andreas Leuner
Modified: 2005-11-18 08:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Leuner 2005-11-10 14:20:21 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

Hi,

when valgrinding konqueror, there is the following in the log after I invoke the rmb popupmenu for the first time:

The following patch remedies this:

Index: akregatorplugin.cpp
===================================================================
--- akregatorplugin.cpp (Revision 477188)
+++ akregatorplugin.cpp (Arbeitskopie)
@@ -49,7 +49,8 @@
 K_EXPORT_COMPONENT_FACTORY( libakregatorkonqplugin, AkregatorMenuFactory("akregatorkonqplugin") )

 AkregatorMenu::AkregatorMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList& /* list */ )
-    : KonqPopupMenuPlugin( popupmenu, name), PluginBase(), m_conf(0)
+    : KonqPopupMenuPlugin( popupmenu, name), PluginBase(), m_conf(0),
+    m_part(0)

----------------------------------------------------------------

With this, valgrind stays quiet about akregatorkonqplugin.

Andreas Leuner
 {
     kdDebug() << "AkregatorMenu::AkregatorMenu()" << endl;
     if ( QCString( kapp->name() ) == "kdesktop" && !kapp->authorize("editable_desktop_icons" ) )
Comment 1 Andreas Leuner 2005-11-10 14:27:41 UTC
Wow this got a bit confused :-) Was a bit in a hurry...

Nevermind the stuff under my name. Also you need to have a fileview open to see this behaviour. Third, I forgot to include the valgrind log :-(

Here it is:

Conditional jump or move depends on uninitialised value(s)
   at 0x75A0984: Akregator::AkregatorMenu::AkregatorMenu(KonqPopupMenu*, char const*, QStringList const&) (akregatorplugin.cpp:68)
   by 0x75A254D: KGenericFactory<Akregator::AkregatorMenu, KonqPopupMenu>::createObject(QObject*, char const*, char const*, QStringList const&) (kgenericfactory.tcc:166)
   by 0x4A96140: KLibFactory::create(QObject*, char const*, char const*, QStringList const&) (klibloader.cpp:83)
   by 0x4158027: KonqPopupMenuPlugin* KParts::ComponentFactory::createInstanceFromFactory<KonqPopupMenuPlugin>(KLibFactory*, QObject*, char const*, QStringList const&) (qmetaobject.h:164)
   by 0x4157F7E: KonqPopupMenuPlugin* KParts::ComponentFactory::createInstanceFromLibrary<KonqPopupMenuPlugin>(char const*, QObject*, char const*, QStringList const&, int*) (componentfactory.h:147)
   by 0x415747F: KonqPopupMenu::addPlugins() (qcstring.h:850)
   by 0x41529DF: KonqPopupMenu::setup(unsigned) (konq_popupmenu.cc:938)
   by 0x414F6BB: KonqPopupMenu::init(QWidget*, unsigned, unsigned) (konq_popupmenu.cc:227)
   by 0x414F63C: KonqPopupMenu::KonqPopupMenu(KBookmarkManager*, QPtrList<KFileItem> const&, KURL const&, KActionCollection&, KNewMenu*, QWidget*, unsigned, unsigned) (konq_popupmenu.cc:219)
   by 0x40DC3A1: KonqMainWindow::slotPopupMenu(KXMLGUIClient*, QPoint const&, QPtrList<KFileItem> const&, KParts::URLArgs const&, unsigned, bool) (konqbookmarkmanager.h:11)
   by 0x40DBC49: KonqMainWindow::slotPopupMenu(KXMLGUIClient*, QPoint const&, QPtrList<KFileItem> const&, KParts::URLArgs const&, unsigned) (konq_mainwindow.cc:4536)
   by 0x40E597C: KonqMainWindow::qt_invoke(int, QUObject*) (qucom_p.h:316)
   by 0x4F470A8: QObject::activate_signal(QConnectionList*, QUObject*) (qobject.cpp:2356)
   by 0x41E15F9: KParts::BrowserExtension::popupMenu(KXMLGUIClient*, QPoint const&, QPtrList<KFileItem> const&, KParts::URLArgs const&, unsigned) (browserextension.moc:444)
   by 0x7D20474: KonqBaseListViewWidget::popupMenu(QPoint const&, bool) (konq_dirpart.h:57)
   by 0x7D20184: KonqBaseListViewWidget::slotPopupMenu(QListViewItem*, QPoint const&, int) (konq_listviewwidget.cc:915)
   by 0x7D2362F: KonqBaseListViewWidget::qt_invoke(int, QUObject*) (qucom_p.h:316)
   by 0x7D293FD: KonqTreeViewWidget::qt_invoke(int, QUObject*) (konq_treeviewwidget.moc:118)
   by 0x4F470A8: QObject::activate_signal(QConnectionList*, QUObject*) (qobject.cpp:2356)
   by 0x52C2DCA: QListView::contextMenuRequested(QListViewItem*, QPoint const&, int) (moc_qlistview.cpp:515)
   by 0x5038931: QListView::contentsContextMenuEvent(QContextMenuEvent*) (qlistview.cpp:4449)
   by 0x506F7BA: QScrollView::viewportContextMenuEvent(QContextMenuEvent*) (qscrollview.cpp:1885)
   by 0x506EAC6: QScrollView::eventFilter(QObject*, QEvent*) (qscrollview.cpp:1542)
   by 0x50373CC: QListView::eventFilter(QObject*, QEvent*) (qlistview.cpp:3863)
   by 0x4F44984: QObject::activate_filters(QEvent*) (qobject.cpp:903)
   by 0x4F44802: QObject::event(QEvent*) (qobject.cpp:735)
   by 0x4F7F5AC: QWidget::event(QEvent*) (qwidget.cpp:4659)
   by 0x4EE374C: QApplication::internalNotify(QObject*, QEvent*) (qapplication.cpp:2635)
   by 0x4EE3311: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:2478)
   by 0x49C80D1: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:550)
   by 0x4E765A5: QApplication::sendSpontaneousEvent(QObject*, QEvent*) (qapplication.h:499)
   by 0x4E6F45F: QETWidget::translateMouseEvent(_XEvent const*) (qapplication_x11.cpp:4301)
   by 0x4E6CFF8: QApplication::x11ProcessEvent(_XEvent*) (qapplication_x11.cpp:3448)
   by 0x4E881CA: QEventLoop::processEvents(unsigned) (qeventloop_x11.cpp:192)
   by 0x4EF7DE0: QEventLoop::enterLoop() (qeventloop.cpp:198)

This seems to indicate m_part could have been uninitialized. Inserting a member initializer for it (like the patch does) helps.
Comment 2 Frank Osterfeld 2005-11-18 08:45:32 UTC
SVN commit 481204 by osterfeld:

initialize m_part properly to null, silencing valgrind.
Spotted by Andreas Leuner
BUG: 116063


 M  +1 -1      akregatorplugin.cpp  


--- branches/KDE/3.5/kdeaddons/konq-plugins/akregator/akregatorplugin.cpp #481203:481204
@@ -49,7 +49,7 @@
 K_EXPORT_COMPONENT_FACTORY( libakregatorkonqplugin, AkregatorMenuFactory("akregatorkonqplugin") )
 
 AkregatorMenu::AkregatorMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList& /* list */ )
-    : KonqPopupMenuPlugin( popupmenu, name), PluginBase(), m_conf(0)
+    : KonqPopupMenuPlugin( popupmenu, name), PluginBase(), m_conf(0), m_part(0)
 {
     kdDebug() << "AkregatorMenu::AkregatorMenu()" << endl;
     if ( QCString( kapp->name() ) == "kdesktop" && !kapp->authorize("editable_desktop_icons" ) )
Comment 3 Frank Osterfeld 2005-11-18 08:47:07 UTC
SVN commit 481205 by osterfeld:

forwardport of #116063 (initialize m_part to stop valgrind from complaining)
CCBUG: 116063


 M  +1 -1      akregatorplugin.cpp  


--- trunk/KDE/kdeaddons/konq-plugins/akregator/akregatorplugin.cpp #481204:481205
@@ -50,7 +50,7 @@
 K_EXPORT_COMPONENT_FACTORY( libakregatorkonqplugin, AkregatorMenuFactory("akregatorkonqplugin") )
 
 AkregatorMenu::AkregatorMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList& /* list */ )
-    : KonqPopupMenuPlugin( popupmenu, name), PluginBase(), m_conf(0)
+    : KonqPopupMenuPlugin( popupmenu, name), PluginBase(), m_conf(0), m_part(0)
 {
     kdDebug() << "AkregatorMenu::AkregatorMenu()" << endl;
     if ( Q3CString( kapp->name() ) == "kdesktop" && !KAuthorized::authorizeKAction("editable_desktop_icons" ) )