Register    Login    Forum    Search    FAQ

Board index » Everything




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
 Post Posted: October 9th, 2017, 9:38 pm 
 

Joined: October 9th, 2017, 8:49 pm
Posts: 5
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:
File comment: So... This is the solution file (zipped)
SolutionFile.zip [112.24 KiB]
Downloaded 8 times
Top 
 Profile  
Reply with quote  
 Post Posted: October 9th, 2017, 11:43 pm 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2843
Location: Oklahoma, United States
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


Top 
 Profile  
Reply with quote  
 Post Posted: October 10th, 2017, 1:25 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3487
Location: Japan
Sounds like a classic memory leak... will have to take a look at your solution.

_________________
Chili


Top 
 Profile  
Reply with quote  
 Post Posted: October 10th, 2017, 1:29 am 
 

Joined: October 9th, 2017, 8:49 pm
Posts: 5
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...


Top 
 Profile  
Reply with quote  
 Post Posted: October 10th, 2017, 1:34 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3487
Location: Japan
Did you change the code at all or are you getting this problem with just the stock framework?

_________________
Chili


Top 
 Profile  
Reply with quote  
 Post Posted: October 10th, 2017, 1:36 am 
 

Joined: October 9th, 2017, 8:49 pm
Posts: 5
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...


Top 
 Profile  
Reply with quote  
 Post Posted: October 10th, 2017, 1:37 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3487
Location: Japan
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


Top 
 Profile  
Reply with quote  
 Post Posted: October 10th, 2017, 1:43 am 
 

Joined: October 9th, 2017, 8:49 pm
Posts: 5
Uhmmm Yes, It still happens.
And memory usage still increases without control...


Top 
 Profile  
Reply with quote  
 Post Posted: October 10th, 2017, 1:51 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3487
Location: Japan
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


Top 
 Profile  
Reply with quote  
 Post Posted: October 10th, 2017, 2:07 am 
 

Joined: October 9th, 2017, 8:49 pm
Posts: 5
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.)


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

Board index » Everything


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron