Debug / Release problem.

Nov 18, 2009 at 3:37am
Ok so I'm using SDL / openGL but I don't really think this is the issue. The game runs fine. Everything happens correctly. Running it inside visual studio on either release or debug works. But if I create a release build and set it up properly to make it so i can just load the exe to run outside visual studio I have this problem..

Well the game starts menu loads. You go into the game and it starts. You see all the images and everything (so i know everything is loading fine, and I have every dll file i need), but after around 1 - 4 seconds it just crashes and windows gives me the .exe has stopped working.

I can't figure this out for the life of me as I can see everything for a few seconds and then it dies. I pretty sure I have everything I need in here. The .dll's, all the images / fonts / sounds. Is there anything extra I need apart from that?

Thanks :) (This has been tested on XP, Vista and 7)
Nov 18, 2009 at 5:11am
Then obviously it has nothing to do with missing resources. You should check that loop (I'm assuming the program crashes while in a loop waiting for input) to see if there's something unstable going on in there, like a very big memory leak, or perhaps something uninitialized.
Since you're working with SDL and OGL, you probably can compile for Linux. If you can't find the bug, you could try running it through Valgrind.
Nov 20, 2009 at 10:13am
Well I'm presuming It's a possible memory leak. This project was made in a group which means I'll have to go over some other peoples code. I'm going to take a look into what this Valgrind is though.
Nov 20, 2009 at 10:28am
Do you know any free windows memory leak detectors?
Nov 20, 2009 at 10:37am
Nov 20, 2009 at 5:57pm
i have not worked on sdl but i want to know cant you debug your application?

for memory leak you can use boundschecker. its not free but a trial version will help you.
Also there is a function in vc++ which tells if your application has memory leak. i forget the name, but if you want i will search for you.
Last edited on Nov 20, 2009 at 5:58pm
Nov 20, 2009 at 6:17pm
closed account (S6k9GNh0)
... Is there not an open-source memory leak detector somewhere?
Nov 20, 2009 at 6:46pm
yes there is... Boehm-Demers-Weiser garbage collector. This can be used for detecting memory leaks also if i am correct.
http://www.hpl.hp.com/personal/Hans_Boehm/gc/
which is used by many compilers, operating systems including windows.

You can write your own memory leak detector also in no time. override new/malloc, in your overridden function allocate memory, store the starting address in a list. on each free/delete, delete that address from the list. if at the end of the program, the list is not empty that means there is memory leak as all the allocation is not freed. :D
Last edited on Nov 20, 2009 at 6:51pm
Nov 22, 2009 at 3:37am
i want to know cant you debug your application?
Of course I can debug my own. But this is a pretty decent sized project (written by 3 people) - and the area that was written with a possible bug I haven't really looked into myself. Not a major issue.
Topic archived. No new replies allowed.