I have created a patch with some debugging output added to the beta4-rc. I
need the people who can reproduce this bug to do it with the debugging
output and send that output to me. I can't reproduce this bug, and after 6
months of lying dormant it needs to be fixed.

-- 
Extra cheese comes at a cost. Bradley Arsenault.
# HG changeset patch
# User Bradley Arsenault <[email protected]>
# Date 1230061555 14400
# Branch beta4-rc
# Node ID 7af8ab0bb299869eb7a8666d6c46587658390bcf
# Parent  8a1d2e4e3e638fa7c3ff33838a28858890a86db5
Added debug information to Engine and NetEngine in order to solve remaining bug.

diff -r 8a1d2e4e3e63 -r 7af8ab0bb299 src/Engine.cpp
--- a/src/Engine.cpp    Sun Nov 23 01:00:51 2008 +0100
+++ b/src/Engine.cpp    Tue Dec 23 15:45:55 2008 -0400
@@ -339,14 +339,16 @@
                                }
 
                                // We proceed network:
+                               std::cout<<"Engine::run() Testing lan info. 
Frame = "<<gui.game.stepCounter<<std::endl;
                                networkReadyToExecute=net->allOrdersRecieved();
+                               std::cout<<"Engine::run() 
Result="<<networkReadyToExecute<<std::endl;
 
 
                                if(networkReadyToExecute)
                                {
                                        sendBumpUp=false;
                                        if(!net->matchCheckSums())
-                                       {       
+                                       {
                                                std::cout<<"Game 
desychronized."<<std::endl;
                                                
gui.game.dumpAllData("glob2.world-desynchronization.dump.txt");
                                                assert(false);
@@ -364,6 +366,7 @@
                                }
                                else if(!sendBumpUp)
                                {
+                                       std::cout<<"Engine::run(): Activating a 
latency increase"<<std::endl;
                                        sendBumpUp=true;
                                        net->increaseLatencyAdjustment();
                                }
diff -r 8a1d2e4e3e63 -r 7af8ab0bb299 src/NetEngine.cpp
--- a/src/NetEngine.cpp Sun Nov 23 01:00:51 2008 +0100
+++ b/src/NetEngine.cpp Tue Dec 23 15:45:55 2008 -0400
@@ -42,6 +42,7 @@
 
 void NetEngine::advanceStep(Uint32 checksum)
 {
+       std::cout<<"NetEngine::advanceStep(): step="<<step<<"; 
checksum="<<checksum<<"; 
localOrderSendCountdown="<<localOrderSendCountdown<<std::endl;
        step+=1;
        if(localOrderSendCountdown == 0)
        {
@@ -163,6 +164,7 @@
 
 void NetEngine::flushAllOrders()
 {
+       std::cout<<"NetEngine::flushAllOrders(): "<<outgoing.empty()<<std::endl;
        while(!outgoing.empty())
        {
                boost::shared_ptr<Order> localOrder;
@@ -221,12 +223,14 @@
 
 bool NetEngine::matchCheckSums()
 {
+       std::cout<<"NetEngine::matchCheckSums(): step="<<step<<std::endl;
        Uint32 checksum = static_cast<unsigned int>(-1);
        for(int p=0; p<numberOfPlayers; ++p)
        {
                if(!orders[p].empty())
                {
                        Uint32 playerCheckSum = orders[p].front()->gameCheckSum;
+                       std::cout<<"\tplayer "<<p<<" has checksum 
"<<playerCheckSum<<std::endl;
                        if(playerCheckSum != static_cast<unsigned int>(-1))
                        {
                                if(checksum == static_cast<unsigned int>(-1))
@@ -245,6 +249,7 @@
 
 void NetEngine::increaseLatencyAdjustment()
 {
+       std::cout<<"NetEngine::increaseLatencyAdjustment(): 
currentLatency="<<currentLatency<<std::endl;
        boost::shared_ptr<AdjustLatency> latency(new 
AdjustLatency(currentLatency+1));
        addLocalOrder(latency);
 }
_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to