Excuse me... can someone please help me?[BEGINNER]

The Partridge Family were neither partridges nor a family. Discuss.
DarkBlood202
Posts: 5
Joined: October 9th, 2017, 8:49 pm

Excuse me... can someone please help me?[BEGINNER]

Post by DarkBlood202 » October 9th, 2017, 9:38 pm

Hello everyone who is reading this... I need your help because... Well... I'm a little bit screwed up.
I started to follow Chili's amazing tutorial series a few days ago. I've installed Visual Studio 2015 Community with no problem at all... Everything seems to be working just fine but then when I build and run the solution...
Image
This usually happens after 20~ seconds of running. Since I don't know much about C++ I have no idea of what to do... Something I've noticed is the fact that Memory Consumption increases really fast...

I attached the solution file (zipped) and my VisualStudio settings (just in case...)

Some extra information that may be useful (or maybe not...):

OS: Windows 7 Ultimate SP1 [64bit]
Processor: Intel(R)Core(TM)i7 CPU Q740 @1.73GHz(8CPUs)
RAM: 6144MB
DirectX Version: DirectX 11
Graphics Card: NVIDIA GeForce GT 330M(3767MB)

I would really appreciate someone to help me... This is really confusing and frustrating to me since I don't know what can I do to fix it...

Thanks for reading this... I really appreciate it.
Attachments
SolutionFile.zip
So... This is the solution file (zipped)
(112.24 KiB) Downloaded 99 times

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Excuse me... can someone please help me?[BEGINNER]

Post by albinopapa » October 9th, 2017, 11:43 pm

Strange, the line number specified would be the copying of the pixel data to the video card. I am using an A10 APU that steals 1GB (1,000 MB) from the main memory so I only have that much graphics ram to use and I don't get the same problem. Also, the memory usage stays around 6 MB according to Task Manager. In either case, I can see the reticle and move it around and the mem usage stays the same and there are no crashes.

When is the last time you updated your graphics driver?
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

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

Re: Excuse me... can someone please help me?[BEGINNER]

Post by chili » October 10th, 2017, 1:25 am

Sounds like a classic memory leak... will have to take a look at your solution.
Chili

DarkBlood202
Posts: 5
Joined: October 9th, 2017, 8:49 pm

Re: Excuse me... can someone please help me?[BEGINNER]

Post by DarkBlood202 » October 10th, 2017, 1:29 am

6MB? I don't understand how... Everytime I run the solution the Memory Usage goes from 300~MB to 2GB within a few seconds...
Uhm... I don't really know...
Still... Why does it happen? Do you know the reason? It's very confusing...

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

Re: Excuse me... can someone please help me?[BEGINNER]

Post by chili » October 10th, 2017, 1:34 am

Did you change the code at all or are you getting this problem with just the stock framework?
Chili

DarkBlood202
Posts: 5
Joined: October 9th, 2017, 8:49 pm

Re: Excuse me... can someone please help me?[BEGINNER]

Post by DarkBlood202 » October 10th, 2017, 1:36 am

I just wrote new code in the specific place I was supposed to do it... This is, the ComposeFrame() and the UpdateModel() As well as the... Member variables of game.h

Apart from that I didn't touch anything else...

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

Re: Excuse me... can someone please help me?[BEGINNER]

Post by chili » October 10th, 2017, 1:37 am

Hmm, I don't see anything in your code that would indicate a memory leak. I will run it later to make sure.

Does a fresh framework solution give you the same problem?
Chili

DarkBlood202
Posts: 5
Joined: October 9th, 2017, 8:49 pm

Re: Excuse me... can someone please help me?[BEGINNER]

Post by DarkBlood202 » October 10th, 2017, 1:43 am

Uhmmm Yes, It still happens.
And memory usage still increases without control...

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

Re: Excuse me... can someone please help me?[BEGINNER]

Post by chili » October 10th, 2017, 1:51 am

Well that means there is something about your configuration that is causing the framework to leak memory. Must be some rare permutation, because you are the first person who has had this problem out of literally thousands.

I think we will have to debug this on your machine to try and find the root cause. You should get Discord and message me on there. We can figure out a time we're both available (I'm at work right now) and get a screen sharing session going.

For right now... go into Game.cpp, line 36
it should say
gfx.EndFrame();
change that to
//gfx.EndFrame();

Your stuff will no longer appear on the screen, but that is fine. See if memory consumption still increases after that.
Chili

DarkBlood202
Posts: 5
Joined: October 9th, 2017, 8:49 pm

Re: Excuse me... can someone please help me?[BEGINNER]

Post by DarkBlood202 » October 10th, 2017, 2:07 am

Oh... Ok... I understand. Discord? Uhmm... I have an account there. Is that possible? Thank you so much! [and sorry for interrupting your work time...]

(I changed the code line... the memory consumption kept at 31MB and no errors shown up.)

Post Reply