Me and my project group at a course in Game Design have created a game influenced by bzFlag. It's basically "done", even though we'd like to fix a lot of stuff in it as it is today. The game is a multiplayer game, with a dedicated server, and is actually playable, as is.
However, we chose Irrlicht as our scene-graph manager (/game engine) and it's been working great. The game was developed on Windows 2000, but I'm a linux guy myself, so of course I ported it (which wasn't a problem since the network and sound code was written in SDL (cross platform) and all graphics in Irrlicht) to Linux as fast as I could.
Now to the problem. I've searched the forum, and haven't found any answers to this question.
I get some kind of pointer error when I delete the pointer to the device.
The warning is:
glibc stops the program when it receives the warning, but after some debugging I managed to narrow the crash down to these line of code. The crashing codes are inside the === chars:error wrote:*** glibc detected *** corrupted double-linked list: 0x0828ca20 ***
(I'm sorry for the large print out, but I thought I'd give the whole picture up to the crash.)
Code: Select all
int main(int argc, char* argv[])
{
MyEventReceiver receiver;
// Create device
device = createDevice (video::EDT_OPENGL, core::dimension2d<s32>(windowX, windowY), 32, false, false, true, &receiver);
device->setResizeAble(false);
// Check if device could be created. If not, terminate.
if (device == 0)
{
return 1;
}
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
/***************
- Create Menu -
The menu will be visible when the game starts.
Here the user will be able to read instructions and
start a new game
***************/
IGUIEnvironment* env = device->getGUIEnvironment();
IGUISkin* skin = env->getSkin();
.
:
.
/*********
Add background image.
*********/
IGUIImage* img = env->addImage(
driver->getTexture("../media/menu/menubg.jpg"),
position2d<int>(0,0));
/*********
Add a fader for fading in from a color to the menu. The fader HAS to be created before adding the buttons.
*********/
IGUIInOutFader* fader = env->addInOutFader();
fader->setColor(video::SColor(0,2,2,2));
fader->fadeIn(2000);
.
:
.
/****************************
Create the variables to check for timeout upon connection
****************************/
.
:
.
/******
Menu is finished, start with the rest of the program,
drop the old stuff and create a new device
*******/
fader->drop();
img->drop();
env->drop();
====================================
device->drop();
device = createDevice (video::EDT_OPENGL, core::dimension2d<s32>(windowX, windowY), 32, false, false, true, &receiver);
====================================
/*************
Create the camera
*************/
scene::ICameraSceneNode *camera = device->getSceneManager()->addCameraSceneNode();
camera->setFOV(PI/2.0f);
scene::ISceneNode *cameraLookAtNode = smgr->addEmptySceneNode(); //node the camera is set to look at
A guy in out group tried it on WinXP, and it crashed for him.. When another friend tried it in XP it worked.
I'm very confused and don't really know what to do.. gdb just outputs this backtrace:
Code: Select all
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7abc3b1 in raise () from /lib/tls/libc.so.6
#2 0xb7abddcd in abort () from /lib/tls/libc.so.6
#3 0xb7aef777 in __fsetlocking () from /lib/tls/libc.so.6
#4 0xb7af5597 in malloc_usable_size () from /lib/tls/libc.so.6
#5 0xb7af570b in malloc_usable_size () from /lib/tls/libc.so.6
#6 0xb7af5c5f in malloc_usable_size () from /lib/tls/libc.so.6
#7 0xb7af5f59 in free () from /lib/tls/libc.so.6
#8 0xb7f19a3a in _nv000039gl () from //usr//lib/opengl/nvidia/lib/libGL.so.1
#9 0x08274e50 in ?? ()
#10 0xb7455926 in _nv000064gl () from //usr//lib/opengl/nvidia/lib/libGLcore.so.1
#11 0x00000000 in ?? ()