About Store Forum Documentation Contact



Post Reply 
Random exception loading a world.
Author Message
gusrbehfdl Offline
Member

Post: #1
Random exception loading a world.
Hello,
I copied and edited some code(no major changes) from tutorial codes and made MyGame project.
starting from last few days, when I debug my project, this exception comes up right before my world shows up(after intro/menu).
here is the message I get,

Unhandled exception at 0x011c7974 in MyGame.exe: 0xC0000005: Access violation reading location 0xfeeeff5e.

if I exit out(shift + f5) and try it again, it works fine.
but now whenever I debug, I have to run it twice...

program seems to stop at this point(world.h)

void update (C Vec &pos) {update(pos.xz());} // update, 'pos'= center of action (in meters)


and this is My world updating code which I copied from tutorial

Game::World.update(Cam.at); // update the world to given position

I have no idea whats wrong, can someone help me?
12-18-2010 11:22 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Random exception loading a world.
you should copy more codes, most likely you have a bug somewhere
12-18-2010 11:41 PM
Find all posts by this user Quote this message in a reply
gusrbehfdl Offline
Member

Post: #3
RE: Random exception loading a world.
It will be too long if I copy the entire codes(if you don't mind, I will. just because this bug bothers me pretty bad).

but here's my updating method

Bool UpdateGame()
{
if(BL.update())return true; // this needs to be at the start of 'Update' function

if(Kb.bp(KB_ESC))StateMenu.set(1.0);

Game::World.update(Cam.at); // update the world to given position
//seems like World.update causes the bug but why?
UpdateCamera();
UpdateMouse();

return true;
}

I didn't modify any built in code(world.h or etc).

if you need to see more, can you possibly direct me which part I should show to you?
what can possibly cause this kind of bug? I don't even know where to look from...
and again, there's no major change from tutorial codes I just mixed them together.
12-19-2010 03:33 AM
Find all posts by this user Quote this message in a reply
Post Reply