[KPhotoAlbum] crash when calling external tools

vincent delft vincent_delft at yahoo.com
Fri Nov 9 05:58:03 CET 2007


Here after the output I've got when I try to open the
picture with showfoto or with kuickshow. 

[vi at myhost mysite]$ kphotoalbum
kio (KMimeType): WARNING: KServiceType::offers :
servicetype  not found
kphotoalbum: ERROR: id: -103, name: '&showFoto',
mimeType: '', offers.count(): 0
ASSERT: "offers.count() == 1" in ExternalPopup.cpp
(79)
KCrash: Application 'kphotoalbum' crashing...
[vi at myhost mysite]$ kphotoalbum
kio (KMimeType): WARNING: KServiceType::offers :
servicetype  not found
kphotoalbum: ERROR: id: -102, name: 'K&uickshow',
mimeType: '', offers.count(): 0
ASSERT: "offers.count() == 1" in ExternalPopup.cpp
(79)
KCrash: Application 'kphotoalbum' crashing...
[vi at myhost mysite]$




PS: 
For those who want to better understand, Jan has asked
me to modify the source code with the following patch:
"
Index: MainWindow/ExternalPopup.cpp
===================================================================
--- MainWindow/ExternalPopup.cpp        (revision
734030)
+++ MainWindow/ExternalPopup.cpp        (working copy)
@@ -26,6 +26,7 @@
 #include <krun.h>
 #include <klocale.h>
 #include <kfileitem.h>
+#include <kdebug.h>

 void MainWindow::ExternalPopup::populate(
DB::ImageInfoPtr current, const QStringList& imageList
)
 {
@@ -71,6 +72,9 @@
 {
     QString name = text( id );
     KTrader::OfferList offers =
KTrader::self()->query(
*(_appToMimeTypeMap[name].begin()),
QString::fromLatin1("Type == 'Application' and Name ==
'%1'").arg(name));
+    kdError() << "id: " << id << ", name: '" << name
<< "', mimeType: '" <<
*(_appToMimeTypeMap[name].begin()) << "',
offers.count(): " << offers.count() << endl;
+    for ( KTrader::OfferList::const_iterator it =
offers.begin(); it != offers.end(); ++it )
+        kdError() << " type: " << (**it).type() << ",
name: " << (**it).name() << endl;
     Q_ASSERT( offers.count() == 1 );
     KService::Ptr ptr = offers.first();
     KURL::List lst;
"







--- Jan Kundrát <jkt at gentoo.org> wrote:

> vincent delft wrote:
> > Here after all the data I've got.
> 
> Ah, it seems that kdDebug() doesn't do anything on
> your system. Please
> try changing kdDebug() to kdError(), recompile and
> report back what it
> prints.
> 
> Cheers,
> -jkt
> 
> -- 
> cd /local/pub && more beer > /dev/mouth
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the KPhotoAlbum mailing list