Sign in to follow this  
  • entries
    686
  • comments
    1952
  • views
    386008

Ugh...

Sign in to follow this  
Stompy9999

87 views

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.
Sign in to follow this  


6 Comments


Recommended Comments

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

Share this comment


Link to comment
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.

Share this comment


Link to comment
Dev-C++ does have dubious debugging tools. The profiler told me my getX() function took longer than all my render functions put together.

Share this comment


Link to comment
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

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now