Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Dark GDK and Raknet Crash Problem

Author
Message
Grayvyn
15
Years of Service
User Offline
Joined: 30th Oct 2008
Location: Southern California
Posted: 19th Jan 2009 07:51
I am trying to get a basic client/server game/demo going. I am using the older GDK from before Nov 2008 and the latest Raknet library. Whenever I try to access the packet data, the program crashes. Oddly, it works if I don't call any other function. It almost like the stack or something is getting corrupted.



Keep in mind I simplified the code to make it easier to read and track down the bug. If I comment out all the log() function calls then it works fine. Any function call screws it up so I know it not my log() or any other packet processing code.

This code works fine if I take Dark GDK out and make the program a console mode exe.

Thanks for the help.

<a href=www.rpgwo.com>RPG World Online</a>
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 19th Jan 2009 09:16
I don't know why it would change, but it looks like the packet pointer's getting messed up.
Grayvyn
15
Years of Service
User Offline
Joined: 30th Oct 2008
Location: Southern California
Posted: 21st Jan 2009 06:23
I was able to figure out my problem.

I set the "Struct Member Alignment" in the project properties to "1 byte" so my packet structs are a small as possible. That also seemed to change the sizes in the Raknet include files thus the .lib file was not in sync and there was either over or under writing of memory happening, I believe.

I set it back to "default" and it all works fine now.

For my structs to be packets, I will use the "#pragma pack" directive like this...



That should work fine now.

<a href=www.rpgwo.com>RPG World Online</a>

Login to post a reply

Server time is: 2024-09-30 15:21:51
Your offset time is: 2024-09-30 15:21:51