Not sure if this is related to CEGUI buuuuuuuuuut.....
Posted: Fri Mar 25, 2005 13:04
well, i've been having great success gettign CEGUI and OPENGL working, im setting up a simple framework and some classes that will make it a lot easier to set up GUIS using CElayout editor and such.
Ive also recently started tryign to integrate Raknet (a very nice networking library) with all my code. however...
raknet requires (? maybe not REQUIRES but as far as i know at this point) a struct to send data through packets, and this struct needs the #pragma pack(1) .
so i wrote a .H file that contained my struct:
#pragma pakc(1)
struct CQubitB92{
unsigned int typeID;
unsigned int mLinearAngle;
}
since i just typed a lot of code, i decided to compile and give it a test (make sure no types since i did write it at 5 am
). it compiled, ran fine, etc.
until i exit. my program crashes on my applicatiosn destructor on this command:
if(CEGUI::System::getSingletonPtr())
delete CEGUI::System::getSingletonPtr();
the error message i get is: DAMAGE: after normal block (467) *numbers*
nowhere in my code do i even instatiate a instance of the struct. If i comment out #pragma pack(1), then the code works fine...
I'm not sure what is causign the problem, it could be me (i have never used the pack() thing before, just learned it a few hours ago) or something weird.
anywho, any ideas would be welcome. (btw, im on visual c++ 7.1, and i have the newest compilers for it, i downloaded the newest Visual Toolkit and got that workign with my IDE)
EDIT:
ok, after much more research/forum searching, i discovered that i should #pragma pack(push) .... #pragma pack(pop) and this gets rid of my problem. Still, anyone know why i was getting that problem above? im assuming now that memory was overwritten somewhere?
Ive also recently started tryign to integrate Raknet (a very nice networking library) with all my code. however...
raknet requires (? maybe not REQUIRES but as far as i know at this point) a struct to send data through packets, and this struct needs the #pragma pack(1) .
so i wrote a .H file that contained my struct:
#pragma pakc(1)
struct CQubitB92{
unsigned int typeID;
unsigned int mLinearAngle;
}
since i just typed a lot of code, i decided to compile and give it a test (make sure no types since i did write it at 5 am

until i exit. my program crashes on my applicatiosn destructor on this command:
if(CEGUI::System::getSingletonPtr())
delete CEGUI::System::getSingletonPtr();
the error message i get is: DAMAGE: after normal block (467) *numbers*
nowhere in my code do i even instatiate a instance of the struct. If i comment out #pragma pack(1), then the code works fine...
I'm not sure what is causign the problem, it could be me (i have never used the pack() thing before, just learned it a few hours ago) or something weird.
anywho, any ideas would be welcome. (btw, im on visual c++ 7.1, and i have the newest compilers for it, i downloaded the newest Visual Toolkit and got that workign with my IDE)
EDIT:
ok, after much more research/forum searching, i discovered that i should #pragma pack(push) .... #pragma pack(pop) and this gets rid of my problem. Still, anyone know why i was getting that problem above? im assuming now that memory was overwritten somewhere?