aMule Forum
English => en_Bugs => Topic started by: Stu Redman on May 15, 2008, 01:09:41 AM
-
I just switched from 8442 to 8502, and I noticed that at disconnection of Kad, Kad graph goes bananas (> 65000 nodes), see picture.
-
It takes no active disconnect to break. My nodes are at 65060. ;)
-
Well, the contact counter is set with theStats::AddKadNode() / theStats::RemoveKadNode(), which are called in CContact::CContact() / CContact::~CContact().
However a debug log entry reveals that for some CContact a destruct is called, but no construct. ??? So the count becomes negative, thus 65xxx (since it's unsigned short).
I'm suspecting something rotten concerning the assigning, pushing and popping of full CContact objects (not pointers) in the UDPFirewallTester.
-
Got it. :)
Malapraxis got close in 8555, but this version still jumps to 65xxx on disconnect.
I added a copy construct (there was none before!) and also removed copy() and the overloaded = operator. No need to overload it when all it does is copy each single member. That's what the compiler generates anyway, and it's not robust when adding new members.