Bug 102807 - Kopete sometimes silently looses *all* messages.
Summary: Kopete sometimes silently looses *all* messages.
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: ICQ and AIM Plugins (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 105944 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-30 00:25 UTC by Gunter Ohrner
Modified: 2005-05-21 01:35 UTC (History)
2 users (show)

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 Gunter Ohrner 2005-03-30 00:25:34 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Debian testing/unstable Packages

Hi!

This does not seem to be a dublicate of #69545:

Sometimes Kopete suddenly swallows all incoming messages during a conversation. The strange thing is that the dialog often works for quite along time and then, all of a sudden, my communication partner still sees my messages, but I suddenly stop receiving his'. If I restart Kopete it works again for an unforseeable period. The next time this bug occurs I'll have to verify whether a simply reconnect will bring the connection alive as well, but I think it did. I could not yet determine a common factor which could have caused the message loss to start - it just works and suddenly it doesn't any more...

Is there anything I could do to pinpoint the cuase of the problem? May sniffing the traffic help? I could try to catch the messages during the time it stops working but I'll have to wait for the bug to re-appear.

Greetings,

  Gunter
Comment 1 Olivier Goffart 2005-03-30 10:38:27 UTC
What protocol are you talking about ?
Are you sure you have no connection problem ?

Try to sniff the traffic to know if messages are actually sent.
Comment 2 Gunter Ohrner 2005-03-30 20:41:41 UTC
Protocol: ICQ (That's why I filed the bug against the component "ICQ and AIM Plugins", please correct this if it's wrong.)

The connection was definitely ok.

I'll try to catch it with ethereal if it occurs the next time.

Greetings,

  Gunter
Comment 3 Miles Moeller 2005-04-01 18:04:46 UTC
I have the same problem! Mainly it happens after a short away time!
Comment 4 Gunter Ohrner 2005-04-03 19:38:01 UTC
Hi!

The problem did not occur again in the meantime. It stroke me that I was visting my brother when the problem was worst, and he uses a Windows desktop with ICS as a "NAT router". (Miles, are you using ICS as well?) Normally I use a direct connection to the internet or Linux based NAT routers.

So maybe this problem is more ICS related or a bad interaction between Kopete and/or ICQ and ICS after all...

If the problem doesn't occur again during the next few days I'll close this bug but keep an eye on it...

Greetings,

  Gunter
Comment 5 Johann-Nikolaus Andreae 2005-04-05 17:21:06 UTC
I have similar problem i can not recive any aim massage.
Sending massages works.
At the tcpdump i can see the incomming massages.
By a frend kopete lost only sam massages.
We both use kopete 0.10.
Comment 6 Matt Rogers 2005-04-07 01:51:59 UTC
need debug output from a debug enabled kopete and a packet dump to start working on this. 
Comment 7 Matt Rogers 2005-04-08 01:58:01 UTC
CVS commit by mattr: 

Fix the 'unknown wire format' bug. This caused a number of problems, such as:

No messages getting through after a long time.
Seeing people as online that are really offline
Not being able to change your online status.

Will backport so the fix is in KDE 3.4.1 shortly



BUG: 101713
BUG: 101303
BUG: 102807


  M +5 -1      coreprotocol.cpp   1.5
  M +7 -0      snacprotocol.cpp   1.3


--- kdenetwork/kopete/protocols/oscar/liboscar/coreprotocol.cpp  #1.4:1.5
@@ -212,5 +212,5 @@ int CoreProtocol::wireToTransfer( const 
                                 kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo 
                                         << "Not enough bytes to make a correct transfer. Have " << wire.size()
-                                        << " bytes. need " << flapLength << " bytes" << endl;
+                                        << " bytes. need " << flapLength + 6 << " bytes" << endl;
                                 m_state = NeedMore;
                                 return bytesParsed;
@@ -243,5 +243,8 @@ int CoreProtocol::wireToTransfer( const 
                                 }
                                 else
+                                {
                                         bytesParsed = 0;
+                                        m_state = NeedMore;
+                                }
                         }
                 }
@@ -284,2 +287,3 @@ bool CoreProtocol::okToProceed()
 
 #include "coreprotocol.moc"
+//kate: indent-mode csands; tab-width 4;

--- kdenetwork/kopete/protocols/oscar/liboscar/snacprotocol.cpp  #1.2:1.3
@@ -60,4 +60,11 @@ Transfer* SnacProtocol::parse( const QBy
         f.length = w;
         
+        if ( ( f.length + 6 ) > packet.size() )
+        {
+                kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Packet not big enough to parse!" << endl;
+                kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "packet size is " << packet.size()
+                        << " we need " << f.length + 6 << endl;
+                return 0;
+        }
         //snac parsing
         *m_din >> w;
Comment 8 Matt Rogers 2005-04-08 01:59:48 UTC
CVS commit by mattr: 

Backport the fix for the 'unknown wire format' bugs. The fix should be in KDE 3.4.1

CCBUGS: 101713, 101303, 102807


  M +5 -1      coreprotocol.cpp   1.2.4.1
  M +7 -0      snacprotocol.cpp   1.2.4.1


--- kdenetwork/kopete/protocols/oscar/liboscar/coreprotocol.cpp  #1.2:1.2.4.1
@@ -173,5 +173,5 @@ int CoreProtocol::wireToTransfer( const 
                                 kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo 
                                         << "Not enough bytes to make a correct transfer. Have " << wire.size()
-                                        << " bytes. need " << flapLength << " bytes" << endl;
+                                        << " bytes. need " << flapLength + 6 << " bytes" << endl;
                                 m_state = NeedMore;
                                 return bytesParsed;
@@ -204,5 +204,8 @@ int CoreProtocol::wireToTransfer( const 
                                 }
                                 else
+                                {
                                         bytesParsed = 0;
+                                        m_state = NeedMore;
+                                }
                         }
                 }
@@ -244,2 +247,3 @@ bool CoreProtocol::okToProceed()
 
 #include "coreprotocol.moc"
+//kate: indent-mode csands; tab-width 4;

--- kdenetwork/kopete/protocols/oscar/liboscar/snacprotocol.cpp  #1.2:1.2.4.1
@@ -60,4 +60,11 @@ Transfer* SnacProtocol::parse( const QBy
         f.length = w;
         
+        if ( ( f.length + 6 ) > packet.size() )
+        {
+                kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Packet not big enough to parse!" << endl;
+                kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "packet size is " << packet.size()
+                        << " we need " << f.length + 6 << endl;
+                return 0;
+        }
         //snac parsing
         *m_din >> w;
Comment 9 Thiago Macieira 2005-05-21 01:35:28 UTC
*** Bug 105944 has been marked as a duplicate of this bug. ***