Bug 127336

Summary: crashs when making a simple dcop call
Product: [Applications] konversation Reporter: Caio Begotti <caio1982>
Component: generalAssignee: Konversation Developers <konversation-devel>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Konversation's backtrace after crash when making a DCOP call
same backtrace but with full debug information

Description Caio Begotti 2006-05-15 01:23:58 UTC
Version:           0.19 build #3100 (using KDE KDE 3.5.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

When you make a dcop call in some terminal it kills the IRC client. The entire call is "dcop konversation Konversation getNickname freenode". Maybe it's some random environment problem because one friend didn't notice this bug using the very same version but actually others did in #konversation channel.
Comment 1 Bram Schoenmakers 2006-05-16 15:51:01 UTC
Could you please post a backtrace? That way it's more easy to fix this bug.
Comment 2 Caio Begotti 2006-05-16 16:00:52 UTC
I'm sorry, Bram. In fact I've saved it locally but just forgot to upload the file.
Comment 3 Caio Begotti 2006-05-16 16:02:05 UTC
Created attachment 16121 [details]
Konversation's backtrace after crash when making a DCOP call
Comment 4 Shintaro Matsuoka 2006-05-18 08:31:06 UTC
The backtrace doesn't help because it doesn't contain some debug symbols.
Could you compile Konversation from source with the option "--enable-debug=full" and generate a backtrace with the compiled Konversation?
( ./configure --enable-debug=full )

I'm sorry for the inconvenience.
Comment 5 Caio Begotti 2006-05-20 16:21:23 UTC
Another backtrace, this time with full debug symbols and info
Comment 6 Caio Begotti 2006-05-20 16:22:47 UTC
Created attachment 16185 [details]
same backtrace but with full debug information
Comment 7 Thiago Macieira 2006-05-20 18:15:04 UTC
Pasting the backtrace:
#5  0xb72c4f03 in QString::QString () from /usr/lib/libqt-mt.so.3
#6  0x080fce8e in Server::getNickname (this=0x0) at server.cpp:2790
#7  0x0809903a in KonvDCOP::getNickname (this=0x8335588, server=@0x7)
    at konvdcop.cpp:185
#8  0x08163694 in KonvIface::process (this=0x83355d4, fun=@0xbff154a4, 
    data=@0xbff1549c, replyType=@0xbff15494, replyData=@0xbff1548c)
    at konviface_skel.cpp:208
#9  0xb752ab2a in DCOPClient::receive () from /usr/lib/libDCOP.so.4
#10 0xb752c140 in DCOPClient::find () from /usr/lib/libDCOP.so.4
#11 0xb752c798 in DCOPClient::find () from /usr/lib/libDCOP.so.4
#12 0xb753983d in KDE_IceProcessMessages () from /usr/lib/libDCOP.so.4
#13 0xb7524879 in DCOPClient::processSocketData () from /usr/lib/libDCOP.so.4
#14 0xb752ceb6 in DCOPClient::qt_invoke () from /usr/lib/libDCOP.so.4
#15 0xb6faa54b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#16 0xb6faae52 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#17 0xb733cf7f in QSocketNotifier::activated () from /usr/lib/libqt-mt.so.3
#18 0xb6fca80a in QSocketNotifier::event () from /usr/lib/libqt-mt.so.3
#19 0xb6f4087a in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#20 0xb6f40a76 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#21 0xb76d502e in KApplication::notify () from /usr/lib/libkdecore.so.4
#22 0x080bad90 in QApplication::sendEvent (receiver=0x7, event=0xbff15ad0)
    at qapplication.h:520
#23 0xb6f32435 in QEventLoop::activateSocketNotifiers ()
   from /usr/lib/libqt-mt.so.3
#24 0xb6ee5d06 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#25 0xb6f59255 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#26 0xb6f5917a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#27 0xb6f3f38d in QApplication::exec () from /usr/lib/libqt-mt.so.3
#28 0x08112e4f in main (argc=428, argv=0x1ac) at main.cpp:109
Comment 8 Shintaro Matsuoka 2006-05-20 20:42:17 UTC
SVN commit 542960 by shin:

make KonvDCOP::getNickname() check if the given server name is valid.
CCBUG: 127336

 M  +8 -2      konvdcop.cpp  


--- trunk/extragear/network/konversation/src/konvdcop.cpp #542959:542960
@@ -180,9 +180,15 @@
     kdDebug() << "KonvDCOP::unregisterEventHook(): hook id " << hookId << " not found!" << endl;
 }
 
-QString KonvDCOP::getNickname (const QString &server)
+QString KonvDCOP::getNickname (const QString &serverName)
 {
-    return static_cast<KonversationApplication *>(kapp)->getServerByName(server)->getNickname();
+    Server* server = static_cast<KonversationApplication *>(kapp)->getServerByName(serverName);
+    if ( !server )
+    {
+        error( i18n( "getNickname: Server %1 is not found." ).arg( serverName ) );
+        return QString();
+    }
+    return server->getNickname();
 }
 
 QString KonvDCOP::getAnyNickname ()
Comment 9 Adam Tulinius 2006-06-03 21:02:46 UTC
i can confirm the bug. (konvi 0.19+ #3108)
Comment 10 Eike Hein 2006-07-03 03:27:30 UTC
*** Bug has been marked as fixed ***.