Bug 178889 - Now Listening plugin crashes or behaves strangly because of inconsistent commenting
Summary: Now Listening plugin crashes or behaves strangly because of inconsistent comm...
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-27 14:26 UTC by Erik van 't Wout
Modified: 2008-12-29 06:52 UTC (History)
0 users

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 Erik van 't Wout 2008-12-27 14:26:11 UTC
Version:           4.1.85 (4.2 beta 2) (using Devel)
Compiler:          gcc-4.1.2 
OS:                Linux
Installed from:    Compiled sources

While hacking around in the now-listening plugin, I found the following inconsistency in the sources (4.1.85), which can cause a crash, or strange behaviour:

kdenetwork-4.1.85/kopete/plugins/nowlistening/nowlisteningplugin.cpp, lines 111-114:

// set up known media players
d->m_mediaPlayerList.append( new NLKscd() );
//d->m_mediaPlayerList.append( new NLNoatun() );
d->m_mediaPlayerList.append( new NLJuk() );


kdenetwork-4.1.85/kopete/plugins/nowlistening/nowlisteningpreferences.cpp, lines 53-56:

// Fill the media player listbox.
preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Kscd"));
preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Noatun"));
preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Juk"));


Since Noatun support is disabled in *plugin.cpp and enabled in *preferences.cpp (and the whole thing is QList and index based), this will (in certain circumstances) cause the wrong plugin being used and in the worst case cause a crash (if the last plugin is selected in the configuration dialog).
Comment 1 Alan Jones 2008-12-29 06:52:14 UTC
SVN commit 902769 by skyphyr:

BUG: 178889
Noatun support is deprecated so we should tidy up unneeded references.


 M  +0 -1      CMakeLists.txt  
 M  +3 -3      DESIGN  
 M  +1 -1      README  
 D             nlnoatun.cpp  
 D             nlnoatun.h  
 M  +1 -1      nowlisteningguiclient.cpp  
 M  +0 -2      nowlisteningplugin.cpp  
 M  +0 -1      nowlisteningpreferences.cpp  


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