Baby Coder In Need Of Help

The Partridge Family were neither partridges nor a family. Discuss.
Noah Muk
Posts: 9
Joined: January 11th, 2019, 4:10 am

Baby Coder In Need Of Help

Post by Noah Muk » February 14th, 2019, 8:34 pm

Help I am a new coder and I am on tutorial 13 Beginner C++ Game Programing and I keep getting this error at the end at the end of the lesson.

Program: ...uksy\Desktop\Chili Framework
2016\Debug\Engine.exe
File:c:\users\muksy\desktop\chili framework 2...\graphics.cpp
Line 315

Expression: y < int(Graphics::SereenHeight )

I might just be skipping something simple over but i if anyone could help it would be very much appreciated. :)

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

Re: Baby Coder In Need Of Help

Post by albinopapa » February 15th, 2019, 4:56 am

The devil is in the details as they say, the line: Expression: y < int(Graphics::SereenHeight ) gives you a clue where the problem lies...mostly.

When you use assert ( in this case chili has used: assert( y < int( Graphics::ScreenHeight ) ) you are saying "I assert that this is expression is true" and in your case, the assertion that y is less than Graphics::ScreenHeight ( probably 600 ) is false.

Did your program try drawing something off the bottom of the screen?
Did you forget to initialize a variable somewhere?

You can use the Call Stack window after the assertion break to look at values of variables from previous functions ( usually ) by double clicking on the function name within the Call Stack window.

Check the Game::ComposeFrame function after the assertion break then if all looks correct, follow the code down through each function.

If you still cannot find your error, upload a copy of your project and someone can run it and take a look to see where the issue is.
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

Noah Muk
Posts: 9
Joined: January 11th, 2019, 4:10 am

Re: Baby Coder In Need Of Help

Post by Noah Muk » February 18th, 2019, 7:49 pm

i don't know if this will help but when i run the program and the "keep calm and eat the poo poo" comes up i only get the error when i press enter. So i just tried using local windows debugger and it gave me this error when i pressed enter and i push the continue button on the top of the screen " Exception thrown: write access violation. this was 0x58AA9D8 " and it brings me to colors.h and says this " dword = color.dword; return *this; " and i have no clue what it means :shock: . thanks for the help though i will double check my code. also how do enable JIT my retry button doesn't do anything but close the window. also also how do you post your code on the wiki i feel like that is good info to know :)

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

Re: Baby Coder In Need Of Help

Post by albinopapa » February 19th, 2019, 8:55 am

Exception thrown: write access violation. this was 0x58AA9D8
The only time I've seen this particular error is either because you are running in Release mode, which means the error is somewhere else, but the compiler doesn't have enough debug information to point to the correct location ( debug mode records a lot of data whereas release mode only seems to be able to record class object data not local variables ).

If you are stuck, compress your project to a Zip/Rar file and upload here as an attachment to your post ( click on Full Editor and scroll down ) or upload your project to GitHub and share the repository link.

As far as enabling JIT, it should be on by default. If you press Retry, the control should go back to the compiler ( Visual Studio ) and have an arrow pointing either to the line with the error or the line after ( especially if it was a function call ). If you think it's disabled, check the Tools / Options menu, I don't recall where it is under the massive amount of settings though.

You also wouldn't post your code to the Wiki, instead you'd post here on the forums to get help.

If you have something to add to the Wiki to help others, you'd have to get permissions from chili to be a contributor I believe.
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

Noah Muk
Posts: 9
Joined: January 11th, 2019, 4:10 am

Re: Baby Coder In Need Of Help

Post by Noah Muk » February 20th, 2019, 1:42 am

i think this is the correct version of the framework because I'm stuck and I also couldn't find much JIT in the Tools/Options menu barrrrr. Thanks for taking a look at it! 8-)
Attachments
Chili Framework 2016.zip
(701 Bytes) Downloaded 138 times

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

Re: Baby Coder In Need Of Help

Post by albinopapa » February 20th, 2019, 7:00 am

Well, you need to include the Engine folder and all files in that folder as well as the .sln file. The .sln file just points to the .vcxproj file. The .vcxproj file lists all the files and settings that are a part of your project, so it wouldn't be useful to just include the .vcxproj file either. All the changes you've made and are working on are in the .h and .cpp files.
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

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

Re: Baby Coder In Need Of Help

Post by albinopapa » February 20th, 2019, 7:02 am

Tools / Options / Debugging / Just-In-Time

The chili framework uses native C++, so make sure at least Native is checked on the right, it shouldn't matter if Managed or Script are checked, as long as Native is checked.
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

Noah Muk
Posts: 9
Joined: January 11th, 2019, 4:10 am

Re: Baby Coder In Need Of Help

Post by Noah Muk » February 20th, 2019, 9:41 pm

Can you include more than one file at a time or just one at a time? it wont allow me to post the sln file or folder so should i just post everything in the folder or is there a way to post a folder?

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

Re: Baby Coder In Need Of Help

Post by chili » February 21st, 2019, 2:32 am

you put it in a zip file my dude
Chili

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

Re: Baby Coder In Need Of Help

Post by albinopapa » February 21st, 2019, 4:28 am

Here's the easy way, right click on the folder with your .sln file and the Engine folder ( not sure what you named it ). Go to SendTo then left click on Compressed ( zipped ) Folder, that should create a zip file with all the files and folders needed.
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

Post Reply