Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    271
  • comments
    969
  • views
    189642

Ughhh....

Sign in to follow this  
Sir Sapo

76 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!