Quote
Unhandled exception at 0x004137d6 in openGL.exe: 0xC0000005: Access violation reading location 0xccccccd0.
This is the class where the problem is showing
class Tile
{
public:
Tile();
Tile(unsigned int ground);
virtual ~Tile();
void clear();
void setGround(unsigned int ground) { this->ground = ground; }
unsigned int getGround() { return ground; } // something wrong here!
protected:
unsigned int ground;
};
It's used ni this function that also display the problem
void Core::render_screen()
{
/* .......... */
Tile *tiles[20][20];
Tile *objs[20][20];
Tile *pPlayer[20][20];
Tile *walls[20][20];
/* ......... */
if (tiles[x][y])
{
render->texture(x * 32, y * 32, pPlayer[x][y]->getGround());
render->texture(x * 32, y * 32, objs[x][y]->getGround());
render->texture(x * 32, y * 32, walls[x][y]->getGround());
render->texture(x * 32, y * 32, tiles[x][y]->getGround());
}
/* .........*/
}
Inside the if(tiles[x][y]) is where the current problem is pointing.The debugger say this:
Quote
Lots of stuff loaded and unloaded...
'openGL.exe': Unloaded 'C:\WINDOWS\system32\mcd32.dll'
First-chance exception at 0x004137d6 in openGL.exe: 0xC0000005: Access violation reading location 0xccccccd0.
Unhandled exception at 0x004137d6 in openGL.exe: 0xC0000005: Access violation reading location 0xccccccd0.
'openGL.exe': Unloaded 'C:\WINDOWS\system32\mcd32.dll'
First-chance exception at 0x004137d6 in openGL.exe: 0xC0000005: Access violation reading location 0xccccccd0.
Unhandled exception at 0x004137d6 in openGL.exe: 0xC0000005: Access violation reading location 0xccccccd0.

New Topic/Question
Reply




MultiQuote



|