Ogniok
Member
|
crash
Hi
Yesterday I sent my game to a friend, but he said it isn't working. Everything worked on my computer(I were always starting the game from Visual C++), but when I started the game by clicking on EXE file it crashed after 3-4 seconds. I attached debbuger to the game's process and it crashes showing error:
Code:
Unhandled exception at 0x01750314 in TowerDefense.exe: 0xC0000005: Access violation reading location 0x00000000.
and following line of code is highlited:
Code:
Vec2 xz ( )C {return Vec2(x,z );} // return as Vec2(x,z)
in file Vector.h (It's line 377).
If I start the game trough Visual C++ the game do not crash. What is weirder, it only happens when i build my project with DX10+ configuration. Other configurations works fine. Is that engine bug? How can if fix this.
Thanks in advance for help.
(This post was last modified: 03-06-2013 07:25 PM by Ogniok.)
|
|
03-06-2013 07:24 PM |
|
Esenthel
Administrator
|
RE: Vec::xz() crash - possible bug?
It is a bug in your codes, please check the callstack.
|
|
03-06-2013 07:35 PM |
|
Ogniok
Member
|
RE: Vec::xz() crash - possible bug?
Why doesn't it works only in DX10+ then? And only when I open it by EXE. Visual Studio Debugger says the code was called in:
Code:
> TowerDefense.exe!EE::Game::Obj::updateArea() + 0xa4 bytes C++
Disassembly:
Code:
0053030A mov ecx,offset EE::Game::World+2B4h (9AC60Ch)
0053030F call EE::_Grid::get (3DD8B9h)
00530314 mov eax,dword ptr [eax] //This line is selected
00530316 push edi
00530317 push esi
|
|
03-06-2013 07:42 PM |
|
Rubeus
Member
|
RE: Vec::xz() crash - possible bug?
The access violation implies you are accessing a null pointer. Try adding checks to make sure your data is valid. It looks to me like you are trying to access an area that is not currently loaded in memory. I could be wrong, though.
(This post was last modified: 03-06-2013 07:55 PM by Rubeus.)
|
|
03-06-2013 07:54 PM |
|
Ogniok
Member
|
RE: Vec::xz() crash - possible bug?
I know what is this error. But the application crashes in Game::Obj::updateArea() function, which I do not modified.
|
|
03-06-2013 07:56 PM |
|
Esenthel
Administrator
|
RE: crash
my guess is that you have a bug somewhere that corrupts some memory/data
I suggest that you verify your codes, and comment out half of the functionality, and try to limit what's causing the problem.
|
|
03-06-2013 09:59 PM |
|