• Advertisement
Sign in to follow this  
  • entries
    271
  • comments
    969
  • views
    189289

Ughhh....

Sign in to follow this  

67 views

Hey everybody!

I'm just about to shoot myself for not seeing this error earlier, I couldn't understand why the server crashed, even when no client was connected to it, so I spent a couple hours today reading the raknet docs and trying to find my error, when in reality, it was a simple typo that fit in so well with all the other code that I didn't even notice it.

Who can spot the bug that crashes the server everytime this function is called?

void DENet::DoServerStuff()
{
Packet * p = server->Receive();

if(p != NULL) {
HandleServerPacket(p);

client->DeallocatePacket(p);
}
}




Answer: See the whole "client->DeallocatePacket(p);"? Turns out, it doesn't exist on the server because there's no needs for a client interface on the server, but I accidently wrote it in there, and it wasn't giving me any compile errors because it's there, it just isn't initailized.... Damn, I want my 3 hours back......
Sign in to follow this  


1 Comment


Recommended Comments

Hehe, oh how I love those trivial bugs that waste hours of our precious lifetimes as coders. [grin]

If it makes you feel any better, I had one just like this that wasted a good few hours of my day as well. [sad]

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement