Program crashes on startup

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
npissoawsome
Posts: 114
Joined: June 8th, 2012, 3:01 pm

Program crashes on startup

Post by npissoawsome » October 8th, 2012, 9:07 pm

My game runs fine when I run it through visual studio (debug and release) but when I actually go find the .exe and run it, it crashes on startup. Does anyone know how I could possibly debug this, or any ideas on what could cause it?

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Program crashes on startup

Post by Asimov » October 8th, 2012, 9:56 pm

Hi npissoawsome,

My guess is this. Seeing as it works in Release and debug and then the exe crashes is it looking for an image file or a sound file that you haven't copied into your release or debug folders?
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

Shaki
Posts: 104
Joined: June 13th, 2012, 12:20 am

Re: Program crashes on startup

Post by Shaki » October 8th, 2012, 10:20 pm

in game.cpp go to the constructor that is made there ( the Game::Game( HWND ...etc ) one ) and look at the loading functions, what Asimov says is true, so you need to take the files from the solution folder and plop them beside the exe.

User avatar
npissoawsome
Posts: 114
Joined: June 8th, 2012, 3:01 pm

Re: Program crashes on startup

Post by npissoawsome » October 8th, 2012, 10:47 pm

bravo, spot on my bmp's weren't in my folder, I was under the impression that they got compiled into the .exe

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Program crashes on startup

Post by Asimov » October 8th, 2012, 10:54 pm

Hi npissoawsome,

With Chillies help I have got my images loading from a resource file, which means they are compiled into my exe. I want to do the same with sounds later, but content to carry on with the game for now heh heh.
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

Post Reply