Bug 54117 - crash when resending a message to a user
Summary: crash when resending a message to a user
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: Jabber Plugin (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Till Gerken
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-05 06:44 UTC by Pupeno
Modified: 2003-02-06 17:56 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 Pupeno 2003-02-05 06:44:43 UTC
Version:           recent cvs (using KDE KDE 3.0.5)
Installed from:    Mandrake RPMs
Compiler:          gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk) Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java --host=i586-mandrake-linux-gnu --with-system-zlib Thread model: posix
OS:          Linux

I open a jabber chat window, I close it, I open it again to the same user, and Kopete crashes.
Running on KDE 3.0.5a I didn't get a useful backtrace.
Thanks
Comment 1 Till Gerken 2003-02-06 17:56:54 UTC
Subject: kdenonbeta/kopete/protocols/jabber

CVS commit by gerken: 

Showstopper fix, JMM still needs reworking for next release to fit
new KMM and chatwindow code. Thanks to Brunes and Bille for their help.

CCMAIL: 54117-done@bugs.kde.org


  M +2 -2      jabbermessagemanager.cpp   1.8
  M +1 -11     jabberprotocol.cpp   1.143


--- kdenonbeta/kopete/protocols/jabber/jabbermessagemanager.cpp  #1.7:1.8
@@ -49,6 +49,6 @@ JabberMessageManager::JabberMessageManag
         // in order to use auto-deletion, we have to create a chat window
         // first or we will self-destruct ourselves right away
-        newChatView();
-        setCanBeDeleted(true);
+        //newChatView();
+        //setCanBeDeleted(true);
 
 }

--- kdenonbeta/kopete/protocols/jabber/jabberprotocol.cpp  #1.142:1.143
@@ -1253,15 +1253,5 @@ void JabberProtocol::slotMessageManagerD
                          << endl;
 
-        for(JabberMessageManagerMap::iterator it = messageManagerMap.begin();
-                it != messageManagerMap.end(); it++)
-        {
-                // static cast required unfortunately
-                if(it.data() == (JabberMessageManager *)manager)
-                {
-                        kdDebug(JABBER_DEBUG_GLOBAL) << "[JabberProtocol] slotMessageManagerDeleted() "
-                                         << "found a match in " << it.key() << endl;
-                        messageManagerMap.remove(it);
-                }
-        }
+        messageManagerMap.remove(manager->user()->contactId());
 
 }