Always getting error

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Morseton
Posts: 8
Joined: July 4th, 2012, 10:29 pm

Always getting error

Post by Morseton » July 4th, 2012, 10:33 pm

I have started watching these series, but I'm having troubles...
Unhandled exception at 0x0040182f in Chili DirectX Framework.exe: 0xC0000005: Access violation reading location 0x00000000.

On the video(lesson 5) Chili fixes this, I did it exacly the same way that the video shows, but I still get the error...
on my Game.h I have:

Code: Select all

private:
	D3DGraphics gfx;
	KeyboardClient kbd;
	/********************************/
	/*  User Variables              */
	int x;
	int y;
	/********************************/
};
and on the game.cpp I have

Code: Select all

Game::Game( HWND hWnd,const KeyboardServer& kServer )
:	gfx( hWnd ),
	kbd( kServer ),
	x( 400 ),
	y( 300 )
{}
and on the codes, I have tryed deleting some to see if the error went off, but it didn't:

Code: Select all

void Game::ComposeFrame()
{

	gfx.PutPixel( x,y,255,255,255 );
	gfx.PutPixel( x+3,y,255,255,255 );
	gfx.PutPixel( x+4,y,255,255,255 );
	gfx.PutPixel( x+5,y,255,255,255 );

	gfx.PutPixel( x-3,y,255,255,255 );
	gfx.PutPixel( x-4,y,255,255,255 );
	gfx.PutPixel( x-5,y,255,255,255 );

	gfx.PutPixel( x,y+3,255,255,255 );
	gfx.PutPixel( x,y+4,255,255,255 );
	gfx.PutPixel( x,y+5,255,255,255 );

	gfx.PutPixel( x,y-3,255,255,255 );
	gfx.PutPixel( x,y-4,255,255,255 );
	gfx.PutPixel( x,y-5,255,255,255 );
}

What am I doing wrong?

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Always getting error

Post by LuX » July 4th, 2012, 11:16 pm

Well, if you did exactly as in the tutorial, you shouldn't have a problem. Problem solved.

Other than that, I think you are drawing outside the screen somewhere. Upload the whole file.
ʕ •ᴥ•ʔ

Morseton
Posts: 8
Joined: July 4th, 2012, 10:29 pm

Re: Always getting error

Post by Morseton » July 5th, 2012, 1:28 pm

today I've opened the framework, and it was working fine... But now, I'm trying to do a square with PutPixel, so downloaded the framework again to get a clean one, and I got the error again, so deleted all the codes I made on that clean framework, and the error was still there :s this is really strange...

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Always getting error

Post by LuX » July 5th, 2012, 1:39 pm

It might be a far fetch, but have a go with this version of the framework http://www.planetchili.net/forum/viewto ... 1013#p1569 . If I didn't know any better I would say you are running low on memory. What are your computer specs?
ʕ •ᴥ•ʔ

Morseton
Posts: 8
Joined: July 4th, 2012, 10:29 pm

Re: Always getting error

Post by Morseton » July 5th, 2012, 1:49 pm

I think you are right... It might be the memory, my computer isn't that great, it only has 1GB RAM, and a crappy graphic

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Always getting error

Post by chili » July 5th, 2012, 1:58 pm

Sounds like you need the ghillie build of the framework.
Chili

Morseton
Posts: 8
Joined: July 4th, 2012, 10:29 pm

Re: Always getting error

Post by Morseton » July 5th, 2012, 5:32 pm

Finished lesson 10 without the error, nice, but this lesson was hard, damn, took me some time xD
btw, just a quick question, why does Visual c++ create many MSBuild.exe processes?

Post Reply