Ugh...

Published July 28, 2005
Advertisement
Ran into a massive bug today, in the form of an elusive segmentation fault. I was going to reformat most of the games code, but I guess I'll do that now. Sadly, that means no new screenshots or demos for awhile.

As for what is actually causing the segmentation fault, I'm not quite sure. I checked all of my pointers to see if they were all initialized, which they were, so it doesn't appear to be a wild pointer. I'm thinking it has something to due with the massive amount of global variables in my program (you can tell I have no clue).

I've also decided to try out Code::Blocks. I can safely use it with my dev-C++ project file, so that is good. I'm hoping it will help with various tasks that dev-c++ lacks at, namely debugging.

Also, if anyone knows of any free memory debuggers, post here.

I'm starting to understand why Rob Loach likes C# so much, but I can't seem to get SDL.Net working[sad].

Edit: Well this is weird. I just compiled it with Code::Blocks and it works.
Previous Entry T3h Tanks!!11!1!
0 likes 6 comments

Comments

TraderJack
What grade of high school / college are you in (if you are not in either, then my bad, it was my impression that I read somewhere that you were)?

-IV
July 28, 2005 04:17 PM
Stompy9999
10th grade.
July 28, 2005 04:33 PM
Sir Sapo
Whenever I get a segmentation fault in SDL, 90% of the time it meant that SDL couldn't load a resource(images, sound , etc). I'd check to make sure everything is okay where you initialize your media.
July 28, 2005 04:52 PM
TraderJack
Going to be, or was in?

-IV
July 28, 2005 05:54 PM
Patbert
Dev-C++ does have dubious debugging tools. The profiler told me my getX() function took longer than all my render functions put together.
July 28, 2005 07:29 PM
TraderJack
Oh man, Dev-C++ onboard debugger just friggin sucks, man. I just prefer making a little readout in the top-left corner of the screen of all variables I wish to monitor, and if there are alot I need to look at, I make it so that when I hold down some random-ass key (like that `/~ key to the left of '1') it turns to a readout screen with all the variables I need to monitor. And it looks cool.

-IV
July 28, 2005 08:48 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement